org.jactr.core.utils.references
Class ImmutableReferences

java.lang.Object
  extended by org.jactr.core.utils.references.ImmutableReferences
All Implemented Interfaces:
IReferences

public class ImmutableReferences
extends java.lang.Object
implements IReferences


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jactr.core.utils.references.IReferences
IReferences.Factory
 
Constructor Summary
ImmutableReferences(IReferences references)
           
 
Method Summary
 void addReferenceTime(double time)
          add a reference time and increment the reference count
 void clear()
          clear it out
 double getLastReferenceTime()
          get the last time there has been a reference
 long getNumberOfReferences()
          get the number of references.
 double[] getRelativeTimes(double referenceTime)
          get all the reference times relative to referenceTime
 double[] getTimes()
          get all the tracked absolute reference times.
 void removeReferenceTime(double time)
          remove a reference time and decrement the reference coutn
 void setNumberOfReferences(long references)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImmutableReferences

public ImmutableReferences(IReferences references)
Method Detail

addReferenceTime

public void addReferenceTime(double time)
Description copied from interface: IReferences
add a reference time and increment the reference count

Specified by:
addReferenceTime in interface IReferences

clear

public void clear()
Description copied from interface: IReferences
clear it out

Specified by:
clear in interface IReferences

getLastReferenceTime

public double getLastReferenceTime()
Description copied from interface: IReferences
get the last time there has been a reference

Specified by:
getLastReferenceTime in interface IReferences
Returns:

getNumberOfReferences

public long getNumberOfReferences()
Description copied from interface: IReferences
get the number of references. this value need not equal getTimes().size(), for instance getTimes() might just track a window of values and not every reference.

Specified by:
getNumberOfReferences in interface IReferences
Returns:

getRelativeTimes

public double[] getRelativeTimes(double referenceTime)
Description copied from interface: IReferences
get all the reference times relative to referenceTime

Specified by:
getRelativeTimes in interface IReferences
Returns:

getTimes

public double[] getTimes()
Description copied from interface: IReferences
get all the tracked absolute reference times. The order of the times is not guaranteed

Specified by:
getTimes in interface IReferences
Returns:
all the known absolute reference times

removeReferenceTime

public void removeReferenceTime(double time)
Description copied from interface: IReferences
remove a reference time and decrement the reference coutn

Specified by:
removeReferenceTime in interface IReferences

setNumberOfReferences

public void setNumberOfReferences(long references)
Specified by:
setNumberOfReferences in interface IReferences