com.dracoware.rsplib
Class RspThreshold

java.lang.Object
  extended by com.dracoware.rsplib.RspThreshold

public class RspThreshold
extends java.lang.Object

Represents an RSP threshold.


Constructor Summary
RspThreshold(java.lang.String value, boolean crossed, boolean lastCrossed, long crossTime)
          Creates a new RspThreshold object.
 
Method Summary
 long getCrossTime()
          If this threshold is crossed, returns the time at which it became crossed.
 java.lang.String getValue()
          Returns the actual threshold string of this threshold.
 boolean isCrossed()
          Returns true if this threshold is currently crossed.
 void setCrossed(boolean crossed)
          Sets if this threshold is currently crossed.
 void setCrossedLast(boolean lastCrossed)
          Sets if this threshold was crossed the last time it was checked.
 void setCrossTime(long crossTime)
          Sets the time at which this threshold was crossed.
 void setValue(java.lang.String value)
          Sets the actual threshold string of this threshold.
 boolean wasCrossedLast()
          Returns true if this threshold was crossed the last time it was checked.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RspThreshold

public RspThreshold(java.lang.String value,
                    boolean crossed,
                    boolean lastCrossed,
                    long crossTime)
Creates a new RspThreshold object.

Parameters:
value - The actual threshold string.
crossed - If the threshold is currently crossed.
lastCrossed - If the threshold was crossed last time we checked.
crossTime - If the threshold is crossed, the time this happened.
Method Detail

getValue

public java.lang.String getValue()
Returns the actual threshold string of this threshold.

Returns:
The threshold value.

setValue

public void setValue(java.lang.String value)
Sets the actual threshold string of this threshold.

Parameters:
value - The threshold value.

isCrossed

public boolean isCrossed()
Returns true if this threshold is currently crossed.

Returns:
True if this threshold is crossed.

setCrossed

public void setCrossed(boolean crossed)
Sets if this threshold is currently crossed.

Parameters:
crossed - A boolean specifying if this threshold is crossed.

getCrossTime

public long getCrossTime()
If this threshold is crossed, returns the time at which it became crossed.

Returns:
The time the threshold was crossed.

setCrossTime

public void setCrossTime(long crossTime)
Sets the time at which this threshold was crossed.

Parameters:
crossTime - The time the threshold was crossed.

wasCrossedLast

public boolean wasCrossedLast()
Returns true if this threshold was crossed the last time it was checked.

Returns:
If the threshold was crossed at last check.

setCrossedLast

public void setCrossedLast(boolean lastCrossed)
Sets if this threshold was crossed the last time it was checked.

Parameters:
lastCrossed - If the threshold was crossed at last check.