Package it.univr.di.labeledvalue
Class ALabel.EmptyLabel
java.lang.Object
it.univr.di.labeledvalue.ALabel
it.univr.di.labeledvalue.ALabel.EmptyLabel
- All Implemented Interfaces:
Serializable
,Comparable<ALabel>
,Iterable<ALabelAlphabet.ALetter>
- Enclosing class:
ALabel
An unmodifiable empty label.
- Author:
- posenato
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class it.univr.di.labeledvalue.ALabel
ALabel.EmptyLabel, ALabel.State
-
Field Summary
Fields inherited from class it.univr.di.labeledvalue.ALabel
ALABEL_RE, ALABEL_SEPARATOR, ALABEL_SEPARATORstring, emptyLabel, labelValidator, MAX_ALABELALPHABET_SIZE, modCount
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
To speed up this method, and considering that theALabelAlphabet
order may not be the expected alphabetic one (the first letter in anALabelAlphabet
can be 'nodeZ' and the last one 'aNode'), the order of labels is given with respect to their indexes in theirALabelAlphabet
.boolean
conjoin
(ALabelAlphabet.ALetter aLetter) ConjoinsALetter
to this.conjunction
(ALabel label) ConjoinsALabel
tothis
and returns the result without modifyingthis
.boolean
L1 contains L2 if L1 contains all ALetters of L2.boolean
contains
(ALabelAlphabet.ALetter letter) boolean
int
hashCode()
boolean
isEmpty()
iterator()
void
remove
(ALabelAlphabet.ALetter letter) It removes the ALetter if it is present.void
remove
(ALabelAlphabet.ALetter[] letter) It removes all ALetters in inputSet from the current label.int
size()
toString()
Methods inherited from class it.univr.di.labeledvalue.ALabel
clear, clone, equals, getALetter, getAlphabet, getLetter, getState, intersect, parse, put, remove, remove, toLowerCase, toUpperCase
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
EmptyLabel
public EmptyLabel()default constructor
-
-
Method Details
-
compareTo
Description copied from class:ALabel
To speed up this method, and considering that theALabelAlphabet
order may not be the expected alphabetic one (the first letter in anALabelAlphabet
can be 'nodeZ' and the last one 'aNode'), the order of labels is given with respect to their indexes in theirALabelAlphabet
.- Specified by:
compareTo
in interfaceComparable<ALabel>
- Overrides:
compareTo
in classALabel
-
conjoin
Description copied from class:ALabel
ConjoinsALetter
to this. -
conjunction
Description copied from class:ALabel
ConjoinsALabel
tothis
and returns the result without modifyingthis
.- Overrides:
conjunction
in classALabel
- Parameters:
label
- the label to conjoin- Returns:
- a new label with the conjunction of 'this' and 'label'. Returns null if this cannot be combined with the given label.
-
contains
Description copied from class:ALabel
L1 contains L2 if L1 contains all ALetters of L2. -
contains
-
equals
-
hashCode
public int hashCode() -
isEmpty
public boolean isEmpty() -
iterator
- Specified by:
iterator
in interfaceIterable<ALabelAlphabet.ALetter>
- Overrides:
iterator
in classALabel
-
remove
Description copied from class:ALabel
It removes the ALetter if it is present. Otherwise, it does nothing. -
remove
Description copied from class:ALabel
It removes all ALetters in inputSet from the current label. -
size
public int size() -
toString
-