org.robokind.api.common.position
Class BooleanRange

java.lang.Object
  extended by org.robokind.api.common.position.BooleanRange
All Implemented Interfaces:
NormalizableRange<Boolean>

public class BooleanRange
extends Object
implements NormalizableRange<Boolean>

Author:
Matthew Stevenson

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.robokind.api.common.position.NormalizableRange
NormalizableRange.DefaultRange
 
Field Summary
static BooleanRange DEFAULT_RANGE
           
 
Fields inherited from interface org.robokind.api.common.position.NormalizableRange
NORMALIZED_RANGE
 
Constructor Summary
BooleanRange(NormalizedDouble threshold)
           
 
Method Summary
 Boolean denormalizeValue(NormalizedDouble v)
          Denormalizes a NormalizedDouble to a value within this NormalizableRange.
 Boolean getMax()
          Returns the minimum value of the NormalizableRange.
 Boolean getMin()
           
 boolean isValid(Boolean val)
          Returns true if t is within the NormalizableRange.
 NormalizedDouble normalizeValue(Boolean val)
          Normalizes a value within the NormalizableRange.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_RANGE

public static final BooleanRange DEFAULT_RANGE
Constructor Detail

BooleanRange

public BooleanRange(NormalizedDouble threshold)
Method Detail

isValid

public boolean isValid(Boolean val)
Description copied from interface: NormalizableRange
Returns true if t is within the NormalizableRange.

Specified by:
isValid in interface NormalizableRange<Boolean>
Parameters:
val - value to check
Returns:
true if t is within the NormalizableRange

normalizeValue

public NormalizedDouble normalizeValue(Boolean val)
Description copied from interface: NormalizableRange
Normalizes a value within the NormalizableRange.

Specified by:
normalizeValue in interface NormalizableRange<Boolean>
Parameters:
val - value to normalize
Returns:
value within the NormalizableRange, null if t is out of range

denormalizeValue

public Boolean denormalizeValue(NormalizedDouble v)
Description copied from interface: NormalizableRange
Denormalizes a NormalizedDouble to a value within this NormalizableRange.

Specified by:
denormalizeValue in interface NormalizableRange<Boolean>
Parameters:
v - value to denormalize
Returns:
non-normalized value within the NormalizableRange

getMin

public Boolean getMin()
Specified by:
getMin in interface NormalizableRange<Boolean>

getMax

public Boolean getMax()
Description copied from interface: NormalizableRange
Returns the minimum value of the NormalizableRange.

Specified by:
getMax in interface NormalizableRange<Boolean>
Returns:
minimum value of the NormalizableRange


Copyright © 2011-2013. All Rights Reserved.