org.ascape.util.data
Class UnitIntervalDataPoint

java.lang.Object
  extended by org.ascape.util.data.UnitIntervalDataPoint
All Implemented Interfaces:
java.io.Serializable, DataPoint, HasName

public abstract class UnitIntervalDataPoint
extends java.lang.Object
implements DataPoint, java.io.Serializable

An abstract class providing some value 0..1 based on the state of the instance provided.

Since:
1.0
Version:
1.2
Author:
Miles Parker
See Also:
Serialized Form

Constructor Summary
UnitIntervalDataPoint()
          Constructs a UnitIntervalDataPoint.
UnitIntervalDataPoint(java.lang.String name)
          Constructs a UnitIntervalDataPoint.
 
Method Summary
 double getAssertedValue(java.lang.Object object)
          Returns a value guaranteed to be within 0..1 based on the state of the object as defined by getValue.
 double getBracketedValue(java.lang.Object object)
          Returns a value guaranteed to be within 0..1 based on the state of the object as defined by getValue.
 java.lang.String getName()
          Returns the name of this unit interval data point.
abstract  double getValue(java.lang.Object object)
          Returns a value that is supposed to be between 0..1 based on the state of the object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UnitIntervalDataPoint

public UnitIntervalDataPoint()
Constructs a UnitIntervalDataPoint.


UnitIntervalDataPoint

public UnitIntervalDataPoint(java.lang.String name)
Constructs a UnitIntervalDataPoint.

Parameters:
name - the name of this draw feature
Method Detail

getValue

public abstract double getValue(java.lang.Object object)
Returns a value that is supposed to be between 0..1 based on the state of the object.

Specified by:
getValue in interface DataPoint
Parameters:
object - the object to get a value from.

getName

public java.lang.String getName()
Returns the name of this unit interval data point.

Specified by:
getName in interface DataPoint
Specified by:
getName in interface HasName

getBracketedValue

public double getBracketedValue(java.lang.Object object)
Returns a value guaranteed to be within 0..1 based on the state of the object as defined by getValue. If value returned by getValue is less, return 0, if greater, returns 1.

Parameters:
object - the object to get a value from.

getAssertedValue

public double getAssertedValue(java.lang.Object object)
                        throws ValueNotInRangeException
Returns a value guaranteed to be within 0..1 based on the state of the object as defined by getValue.

Parameters:
object - the object to get a value from.
Throws:
ValueNotInRangeException - if value is not within limit


Copyright © 1998-2008 The Brookings Institution, NuTech Solutions, Metascape, LLC All Rights Reserved.