public interface PropertyAtom extends Property
Property.PropertyBoolean, Property.PropertyConcept, Property.PropertyConceptReference, Property.PropertyContainedConcept, Property.PropertyDateTime, Property.PropertyDouble, Property.PropertyInt, Property.PropertyLong, Property.PropertyString
HISTORY_POLICY_ALL_VALUES, HISTORY_POLICY_CHANGES_ONLY
Modifier and Type | Method and Description |
---|---|
void |
getHistoryTimeInterval(long time,
long[] interval)
Sets
interval[0] to t1 and interval[1] to t2
where t1 and t2 are timestamps in the current property history
and t1 <=time <= t2 |
java.lang.String |
getString()
Gets the
String representation of the value of this PropertyAtom . |
java.lang.String |
getString(long time)
Gets the
String representation of the value of this PropertyAtom at the given time. |
java.lang.String |
getStringAtIdx(int idx)
Gets the
String representation of the value of this PropertyAtom at the given history index. |
long |
getTimeAtIdx(int idx)
Gets the time at which the value at the given history index was set.
|
long |
howCurrent()
Gets the timestamp of the latest value in the current history of this property.
|
int |
howMany(long stime,
long etime)
Gets the number of values known to the current history of this property, between stime and etime.
|
long |
howOld()
Gets the timestamp of the oldest value in the current history of this property.
|
boolean |
isSet()
Returns true if the property is set.
|
boolean |
setValue(java.lang.Object obj)
Sets the current value of this
PropertyAtom . |
boolean |
setValue(java.lang.Object obj,
long time)
Sets the value of this
PropertyAtom with a given time. |
getHistoryPolicy, getHistorySize, getName, getParent
long getTimeAtIdx(int idx) throws PropertyException
idx
- index in the history of this property.PropertyException
Property.getHistoryPolicy()
,
Property.getHistorySize()
long howOld()
Property.getHistoryPolicy()
,
Property.getHistorySize()
long howCurrent()
Property.getHistoryPolicy()
,
Property.getHistorySize()
int howMany(long stime, long etime) throws PropertyException
stime
- a time expressed in ms since the epoch.etime
- a time expressed in ms since the epoch, greater than or equal to stime.PropertyException
- if stime is older than the oldest history timestamp.Property.getHistoryPolicy()
,
Property.getHistorySize()
boolean setValue(java.lang.Object obj)
PropertyAtom
.obj
- the value to setProperty.getHistoryPolicy()
boolean setValue(java.lang.Object obj, long time)
PropertyAtom
with a given time.obj
- the value to set.time
- the time to associate with the value.Property.getHistoryPolicy()
java.lang.String getString()
String
representation of the value of this PropertyAtom
.String
value of this PropertyAtom
.java.lang.String getString(long time) throws PropertyException
String
representation of the value of this PropertyAtom
at the given time.time
- a time expressed in number of milliseconds since the epoch.String
value of this PropertyAtom
at the given time.PropertyException
- if time is older than the oldest history timestamp.Property.getHistoryPolicy()
,
Property.getHistorySize()
java.lang.String getStringAtIdx(int idx) throws PropertyException
String
representation of the value of this PropertyAtom
at the given history index.idx
- an index in the history of this property.String
value of this PropertyAtom
at the given history index.PropertyException
- if idx is not a valid history index.Property.getHistoryPolicy()
,
Property.getHistorySize()
void getHistoryTimeInterval(long time, long[] interval) throws PropertyException
interval[0]
to t1
and interval[1]
to t2
where t1
and t2
are timestamps in the current property history
and t1 <=time <= t2.
time
- a time in ms since the epochinterval
- a long[]
of length 2 or greater.PropertyException
boolean isSet()