com.timeindexing.basic
Class RelativeAdjustableCount

java.lang.Object
  extended bycom.timeindexing.basic.RelativeAdjustableCount
All Implemented Interfaces:
Adjustable, AdjustableCount, java.lang.Cloneable, Count, Relative, Value

public class RelativeAdjustableCount
extends java.lang.Object
implements AdjustableCount, Relative, java.lang.Cloneable

An RelativeCount is a count that is an relative count from the current index element. This is basically a constant, which can be +ve or -ve and can also be modified.


Constructor Summary
RelativeAdjustableCount()
          Construct a new RelativeCount
RelativeAdjustableCount(Count c)
          Construct a new RelativeCount from an existing Count
RelativeAdjustableCount(long value)
          Construct a new RelativeCount from a given value
 
Method Summary
 Adjustable adjust(long amount)
          Adjust the count forwards or backward, given a basic value.
 Adjustable adjust(Value off)
          Adjust the coubnt forwards or backward, given a Value
 long value()
          Get the count.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RelativeAdjustableCount

public RelativeAdjustableCount()
Construct a new RelativeCount


RelativeAdjustableCount

public RelativeAdjustableCount(long value)
Construct a new RelativeCount from a given value


RelativeAdjustableCount

public RelativeAdjustableCount(Count c)
Construct a new RelativeCount from an existing Count

Method Detail

value

public long value()
Get the count.

Specified by:
value in interface Value

adjust

public Adjustable adjust(Value off)
Adjust the coubnt forwards or backward, given a Value

Specified by:
adjust in interface Adjustable

adjust

public Adjustable adjust(long amount)
Adjust the count forwards or backward, given a basic value.

Specified by:
adjust in interface Adjustable