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.
- Version:
- $Rev: 1153 $
- Author:
- posenato
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class ALabel
ALabel.EmptyLabel, ALabel.StateModifier and TypeClassDescriptionstatic final classAn unmodifiable empty label.static enumPossible state of aALabelAlphabet.ALetterin an alphabetic label. -
Field Summary
Fields inherited from class ALabel
ALABEL_RE, ALABEL_SEPARATOR, ALABEL_SEPARATORstring, emptyLabel, labelValidator, MAX_ALABELALPHABET_SIZE, modCountModifier and TypeFieldDescriptionstatic final StringRegular expression representing an ALabel.static final charALabel separator '∙'.static final StringALabel separator '∙'.static final ALabelA constant empty label to represent an empty label that cannot be modified.static final org.netbeans.validation.api.Validator<String> Validator for a graphical interfacestatic final byteMaximum size for the alphabet.protected final intThe number of times this ALabel has been structurally modified. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintTo speed up this method, and considering that theALabelAlphabetorder may not be the expected alphabetic one (the first letter in anALabelAlphabetcan be 'nodeZ' and the last one 'aNode'), the order of labels is given with respect to their indexes in theirALabelAlphabet.booleanconjoin(ALabelAlphabet.ALetter aLetter) ConjoinsALetterto this.conjunction(ALabel label) ConjoinsALabeltothisand returns the result without modifyingthis.booleanL1 contains L2 if L1 contains all ALetters of L2.booleancontains(ALabelAlphabet.ALetter letter) booleaninthashCode()booleanisEmpty()iterator()voidremove(ALabelAlphabet.ALetter letter) It removes the ALetter if it is present.voidremove(ALabelAlphabet.ALetter[] letter) It removes all ALetters in inputSet from the current label.intsize()toString()Methods inherited from class ALabel
clear, clone, equals, getALetter, getAlphabet, getLetter, getState, intersect, parse, put, remove, remove, toLowerCase, toUpperCaseModifier and TypeMethodDescriptionvoidclear()Makes the label empty.static ALabelTo have a correct copy of an ALabel.booleanequals(ALabelAlphabet.ALetter name) Compare the letter with an ALetter name.final ALabelAlphabet.ALetterfinal ALabelAlphabet(package private) final ALabelAlphabet.ALettergetLetter(byte letterIndex) (package private) final ALabel.StategetState(byte letterIndex) final ALabelstatic ALabelparse(String s, ALabelAlphabet alphabet) Parse a string representing an ALabel and return an equivalent ALabel object if no errors are found, or if it is null otherwise.boolean(package private) final voidremove(byte index) final voidIt removes all ALetters in ALabel from the current label.final StringMethods inherited from interface Iterable
forEach, spliterator
-
Constructor Details
-
EmptyLabel
public EmptyLabel()default constructor
-
-
Method Details
-
compareTo
Description copied from class:ALabelTo speed up this method, and considering that theALabelAlphabetorder may not be the expected alphabetic one (the first letter in anALabelAlphabetcan be 'nodeZ' and the last one 'aNode'), the order of labels is given with respect to their indexes in theirALabelAlphabet.- Specified by:
compareToin interfaceComparable<ALabel>- Overrides:
compareToin classALabel
-
conjoin
Description copied from class:ALabelConjoinsALetterto this. -
conjunction
Description copied from class:ALabelConjoinsALabeltothisand returns the result without modifyingthis.- Overrides:
conjunctionin 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
-
contains
-
equals
-
hashCode
-
isEmpty
-
iterator
- Specified by:
iteratorin interfaceIterable<ALabelAlphabet.ALetter>- Overrides:
iteratorin classALabel
-
remove
Description copied from class:ALabelIt removes the ALetter if it is present. Otherwise, it does nothing. -
remove
Description copied from class:ALabelIt removes all ALetters in inputSet from the current label. -
size
-
toString
-