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 differentDataSets can use them in different ways.- Author:
- Thomas Pfau
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected NodeValueTypetypeprotected Comparablevalue
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(NodeValue o)booleanequals(Object o)NodeValueTypegetType()Get the Type of NodeValue (numeric, String, Vector)ComparablegetValue()Get the value of thisNodeValueinthashCode()This class is only a representation of its value, so its hash is the same as its value.StringtoString()
-
-
-
Field Detail
-
value
protected Comparable value
-
type
protected NodeValueType type
-
-
Constructor Detail
-
NodeValue
public NodeValue(Double value)
Create aNodeValueusing 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 thisNodeValueis 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:
compareToin 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
-
-