org.graphstream.ui.graphicGraph.stylesheet
Class Value

java.lang.Object
  extended by java.lang.Number
      extended by org.graphstream.ui.graphicGraph.stylesheet.Value
All Implemented Interfaces:
Serializable

public class Value
extends Number

A value and the units of the value.

As a style sheet may express values in several different units. This class purpose is to pack the value and the units it is expressed in into a single object.

See Also:
Serialized Form

Field Summary
 StyleConstants.Units units
          The value units.
 double value
          The value.
 
Constructor Summary
Value(StyleConstants.Units units, double value)
          New value.
Value(Value other)
          New copy of another value.
 
Method Summary
 double doubleValue()
           
 boolean equals(Value o)
           
 float floatValue()
           
 int intValue()
           
 long longValue()
           
 String toString()
           
 
Methods inherited from class java.lang.Number
byteValue, shortValue
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

value

public double value
The value.


units

public StyleConstants.Units units
The value units.

Constructor Detail

Value

public Value(StyleConstants.Units units,
             double value)
New value.

Parameters:
units - The value units.
value - The value.

Value

public Value(Value other)
New copy of another value.

Parameters:
other - The other value to copy.
Method Detail

floatValue

public float floatValue()
Specified by:
floatValue in class Number

doubleValue

public double doubleValue()
Specified by:
doubleValue in class Number

intValue

public int intValue()
Specified by:
intValue in class Number

longValue

public long longValue()
Specified by:
longValue in class Number

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Value o)


Copyright © 2012. All Rights Reserved.