edu.cmu.aura.service
Class DynamicAttribute

java.lang.Object
  |
  +--edu.cmu.aura.service.Attribute
        |
        +--edu.cmu.aura.service.DynamicAttribute

public class DynamicAttribute
extends Attribute

DynamicAttribute represents dynamic service attributes. These attributes are that change frequently and may have the following meta-attributes associated with them:

See Also:
AttributeReq

Constructor Summary
DynamicAttribute()
          Creates a DynamicAttribute.
DynamicAttribute(java.lang.String name, java.lang.Object value)
          Creates a DynamicAttribute.
DynamicAttribute(java.lang.String name, java.lang.Object value, long lastUpdate, double confidence)
          Creates a DynamicAttribute.
 
Method Summary
 java.lang.Object getAccuracyMax()
          Gets the maxumum of the accuracy bound associated with this attribute.
 java.lang.Object getAccuracyMin()
          Gets the minumum of the accuracy bound associated with this attribute.
 double getConfidence()
          Gets the confidence associated with this attribute.
 long getInterval()
          Gets the interval associated with this attribute.
 TimeInstant getLastUpdate()
          Gets the time this attribute was last updated.
 void setAccuracy(java.lang.Object accuracyMin, java.lang.Object accuracyMax)
          Sets the accuracy associated with this attribute.
 void setConfidence(double confidence)
          Sets the confidence associated with this attribute.
 void setInterval(long interval)
          Sets the interval associated with this attribute.
 void setLastUpdate(long lastUpdate)
          Sets the time this attribute was last updated.
 java.lang.String toString()
          Converts this attribute to a String.
 
Methods inherited from class edu.cmu.aura.service.Attribute
getName, getValue, setName, setValue
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DynamicAttribute

public DynamicAttribute()
Creates a DynamicAttribute.


DynamicAttribute

public DynamicAttribute(java.lang.String name,
                        java.lang.Object value)
Creates a DynamicAttribute.

Parameters:
name - the name of this attribute
value - the value of this attribute

DynamicAttribute

public DynamicAttribute(java.lang.String name,
                        java.lang.Object value,
                        long lastUpdate,
                        double confidence)
Creates a DynamicAttribute.

Parameters:
name - the name of this attribute
value - the value of this attribute
lastUpdate - the lastUpdate time of this attribute
confidence - the confidence of this attribute
Method Detail

getLastUpdate

public TimeInstant getLastUpdate()
Gets the time this attribute was last updated.

Returns:
the time this attribute was last updated

setLastUpdate

public void setLastUpdate(long lastUpdate)
Sets the time this attribute was last updated.

Parameters:
lastUpdate - the time this attribute was last updated

getInterval

public long getInterval()
Gets the interval associated with this attribute.

Returns:
the interval associated with this attribute

setInterval

public void setInterval(long interval)
Sets the interval associated with this attribute.

Parameters:
interval - the interval associated with this attribute

getConfidence

public double getConfidence()
Gets the confidence associated with this attribute.

Returns:
the confidence associated with this attribute

setConfidence

public void setConfidence(double confidence)
Sets the confidence associated with this attribute.

Parameters:
confidence - the confidence associated with this attribute

getAccuracyMin

public java.lang.Object getAccuracyMin()
Gets the minumum of the accuracy bound associated with this attribute.

Returns:
minumum of the accuracy bound associated with this attribute

getAccuracyMax

public java.lang.Object getAccuracyMax()
Gets the maxumum of the accuracy bound associated with this attribute.

Returns:
maxumum of the accuracy bound associated with this attribute

setAccuracy

public void setAccuracy(java.lang.Object accuracyMin,
                        java.lang.Object accuracyMax)
Sets the accuracy associated with this attribute.

Parameters:
accuracyMin - the minimum of the accuracy bound associated with this attribute
accuracyMax - the maximum of the accuracy bound associated with this attribute

toString

public java.lang.String toString()
Converts this attribute to a String.

Overrides:
toString in class Attribute
Returns:
a String representation of this attribute