Class LabeledLowerCaseValue
java.lang.Object
it.univr.di.labeledvalue.LabeledLowerCaseValue
- All Implemented Interfaces:
Serializable
Represents an immutable Labeled Lower Case value.
- Version:
- $Rev: 851 $
- Author:
- posenato
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final LabeledLowerCaseValue
A constant empty label to represent an empty label that cannot be modified. -
Method Summary
Modifier and TypeMethodDescriptionstatic LabeledLowerCaseValue
Creates a lower-case value.static LabeledLowerCaseValue
create
(LabeledLowerCaseValue input) Copy constructor.static String
entryAsString
(ALabel nodeN, int v, Label l, boolean lower) boolean
getLabel()
int
getValue()
int
hashCode()
boolean
isEmpty()
static LabeledLowerCaseValue
parse
(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.
The format of the string is given by the methodtoString()
:\{{(⟨label⟩, ⟨Alabel⟩, ⟨value⟩) }*\}
It also parse the old format:\{{(⟨Alabel⟩, ⟨value⟩, ⟨label⟩) }*\}
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 input.
No null check is done!- Parameters:
input
- the object to copy.- Returns:
- a new LabeledLowerCaseValue object with equals 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 methodtoString()
:\{{(⟨label⟩, ⟨Alabel⟩, ⟨value⟩) }*\}
It also parse the old format:\{{(⟨Alabel⟩, ⟨value⟩, ⟨label⟩) }*\}
- Parameters:
arg
- aString
object.alphabet
- the alphabet to use for building a new labeled lower-case value. If null, a new alphabet is generated and insert 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
-
isEmpty
public boolean isEmpty()- Returns:
- true if the object is empty
-
toString
-
toString
- Parameters:
lower
- true if the node name has to be written lower case- Returns:
- the string representation of this lower-case value
-