Package com.onenetwork.platform.data.tlv
Interface Bucket
public interface Bucket
An individual Bucket (or cell) within a
DataMeasure
.-
Method Summary
Modifier and Type Method Description Bucketization
getBucketization()
Returns the Bucketization of the Bucketdouble
getOriginalValue()
Returns the original numeric value of this bucket.java.util.Date
getStartDate()
Returns the start date of this bucketdouble
getValue()
Returns the numeric value of this bucket.boolean
hasOriginalValue()
Returns true iff the Bucket has a numeric original value.boolean
hasValue()
Returns true iff the Bucket has a numeric value.Bucket
next()
Returns the Bucket immediately subsequent to this one (or null if this is the last bucket)Bucket
previous()
Returns the Bucket immediately previous to this one (or null if this is the first bucket)void
setValue(java.lang.Double value)
Sets the numeric value of this bucketBucket
sibling(int offset)
Returns previous or next buckets - offset can be -ve or +ve.
-
Method Details
-
getStartDate
java.util.Date getStartDate()Returns the start date of this bucket -
getValue
double getValue()Returns the numeric value of this bucket. To simplify computations, returns zero whenhasValue()
returns false. If you want to check whether the Bucket has a value, callhasValue()
. -
getOriginalValue
double getOriginalValue()Returns the original numeric value of this bucket. Bucket's originalValue preserves TLV's originally executed value while value stores in-memory changes by the user. Iff TLV is not editable, this method returns same value as getValue() method does. -
setValue
void setValue(java.lang.Double value)Sets the numeric value of this bucket- Parameters:
value
- new numeric value of this bucket
-
hasValue
boolean hasValue()Returns true iff the Bucket has a numeric value. (Some data measures may want to display this as an empty cell rather than zero.) Note thatgetValue()
will return zero whenhasValue()
returns false. -
hasOriginalValue
boolean hasOriginalValue()Returns true iff the Bucket has a numeric original value. Note thatgetOriginalValue()
will return zero whenhasOriginalValue()
returns false. -
previous
Bucket previous()Returns the Bucket immediately previous to this one (or null if this is the first bucket) -
next
Bucket next()Returns the Bucket immediately subsequent to this one (or null if this is the last bucket) -
getBucketization
Bucketization getBucketization()Returns the Bucketization of the Bucket -
sibling
Returns previous or next buckets - offset can be -ve or +ve.- Parameters:
offset
- -1 would return the immediate previous bucket, +2 would return the second subsequent bucket, etc
-