Class NodeValue
- java.lang.Object
-
- idare.imagenode.Interfaces.DataSets.NodeValue
-
- All Implemented Interfaces:
Serializable
,Comparable<NodeValue>
- Direct Known Subclasses:
MultiArrayDataValue
public class NodeValue extends Object implements Comparable<NodeValue>, Serializable
A NodeValue represents the Value at a specific node. This is mainly for plotting purposes and differentDataSet
s can use them in different ways.- Author:
- Thomas Pfau
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected NodeValueType
type
protected Comparable
value
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(NodeValue o)
boolean
equals(Object o)
NodeValueType
getType()
Get the Type of NodeValue (numeric, String, Vector)Comparable
getValue()
Get the value of thisNodeValue
int
hashCode()
This class is only a representation of its value, so its hash is the same as its value.String
toString()
-
-
-
Field Detail
-
value
protected Comparable value
-
type
protected NodeValueType type
-
-
Constructor Detail
-
NodeValue
public NodeValue(Double value)
Create aNodeValue
using a Double value.- Parameters:
value
- - the value this NodeValue represents
-
NodeValue
public NodeValue(boolean isnumeric)
Create a NodeValue indicating whether it is a numeric or non numeric value.- Parameters:
isnumeric
- whether thisNodeValue
is a numeric value (i.e. type double).
-
NodeValue
public NodeValue(String value)
Create a NodeValue as a String.- Parameters:
value
- The string value this Node contains
-
-
Method Detail
-
getType
public NodeValueType getType()
Get the Type of NodeValue (numeric, String, Vector)- Returns:
- the type of the
NodeValue
-
getValue
public Comparable getValue()
Get the value of thisNodeValue
- Returns:
- A Comparable representing the
NodeValue
-
compareTo
public int compareTo(NodeValue o)
- Specified by:
compareTo
in interfaceComparable<NodeValue>
-
hashCode
public int hashCode()
This class is only a representation of its value, so its hash is the same as its value. or 0 if its null
-
-