Package it.univr.di.labeledvalue
Class LabeledLowerCaseValue
java.lang.Object
it.univr.di.labeledvalue.LabeledLowerCaseValue
- All Implemented Interfaces:
Serializable
Represents an immutable Labeled Lower Case value.
- Version:
- $Rev: 993 $
- Author:
- posenato
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final LabeledLowerCaseValueA constant empty label to represent an empty label that cannot be modified. -
Method Summary
Modifier and TypeMethodDescriptionstatic LabeledLowerCaseValueCreates a lower-case value.static LabeledLowerCaseValuecreate(LabeledLowerCaseValue input) Copy constructor.static StringentryAsString(ALabel nodeN, int v, Label l, boolean lower) booleangetLabel()intgetValue()inthashCode()booleanisEmpty()static LabeledLowerCaseValueparse(String arg, ALabelAlphabet alphabet) Parses a string representing a labeled lower-case value and returns an object containing the labeled values represented by the string.toString()toString(boolean lower)
-
Field Details
-
emptyLabeledLowerCaseValue
A constant empty label to represent an empty label that cannot be modified.
-
-
Method Details
-
create
Creates a lower-case value.- Parameters:
nodeName- not null node namevalue- not null valuelabel- not null label- Returns:
- a new LabeledLowerCaseValue object
-
create
Copy constructor. The new object is distinct from the input.
No null check is done!- Parameters:
input- the object to copy.- Returns:
- a new LabeledLowerCaseValue object with equal fields of input
-
entryAsString
-
parse
Parses a string representing a labeled lower-case value and returns an object containing the labeled values represented by the string.The format of the string is given by the method
toString():\{{(⟨label⟩, ⟨Alabel⟩, ⟨value⟩) }*\}It also parses the old format:
\{{(⟨Alabel⟩, ⟨value⟩, ⟨label⟩) }*\}- Parameters:
arg- aStringobject.alphabet- the alphabet to use for building a new labeled lower-case value. If null, a new alphabet is generated and inserted into the created labeled value.- Returns:
- a LabeledLowerCaseValue object if arg represents a valid labeled value, null otherwise.
-
equals
-
getLabel
- Returns:
- the label
-
getNodeName
- Returns:
- the node name
-
getValue
public int getValue()- Returns:
- the value
-
hashCode
public int hashCode() -
isEmpty
public boolean isEmpty()- Returns:
- true if the object is empty
-
toString
-
toString
- Parameters:
lower- true if the node name has to be written in lowercase.- Returns:
- the string representation of this lower-case value
-