Package com.helger.regrep.helper
Class VocabularyTerm
- java.lang.Object
-
- com.helger.regrep.helper.VocabularyTerm
-
- All Implemented Interfaces:
Serializable
@Immutable @MustImplementEqualsAndHashcode public final class VocabularyTerm extends Object implements Serializable
This is a helper class to have an easy way to provide a vocabulary term.- Author:
- Philip Helger
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description VocabularyTerm(String sVocabulary, String sTerm)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)StringgetTerm()StringgetVocabulary()inthashCode()booleanhasTerm(String sTerm)Check if this vocabulary term has the provided term or not.booleanhasVocabulary(String sVocabulary)Check if this term has the provided vocabulary or not.StringtoString()
-
-
-
Method Detail
-
getVocabulary
@Nonnull @Nonempty public String getVocabulary()
- Returns:
- The vocabulary as provided in the constructor. Neither
nullnor empty.
-
hasVocabulary
public boolean hasVocabulary(@Nullable String sVocabulary)
Check if this term has the provided vocabulary or not.- Parameters:
sVocabulary- The vocabulary to compare to. May benull.- Returns:
trueif the vocabularies are identical.
-
getTerm
@Nonnull @Nonempty public String getTerm()
- Returns:
- The term as provided in the constructor. Neither
nullnor empty.
-
hasTerm
public boolean hasTerm(@Nullable String sTerm)
Check if this vocabulary term has the provided term or not.- Parameters:
sTerm- The term to compare to. May benull.- Returns:
trueif the values are identical.
-
-