Package org.aksw.jenax.constraint.util
Class PrefixSetImpl
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPrefixSetImpl(org.apache.commons.collections4.trie.PatriciaTrie<String> trie) -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanstatic PrefixSetImplbooleangetPrefixesOf(String str, boolean inclusive) Return the set of prefixes of strinthashCode()boolean(1) Replace shorter (more generic) prefixes in this with longer (more specific) ones in other when the former is a prefix of the latter.iterator()booleanintsize()toString()Methods inherited from class java.util.AbstractSet
removeAllMethods inherited from class java.util.AbstractCollection
addAll, clear, containsAll, isEmpty, retainAll, toArray, toArrayMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.Set
addAll, clear, containsAll, isEmpty, removeAll, retainAll, spliterator, toArray, toArray
-
Field Details
-
trie
-
-
Constructor Details
-
PrefixSetImpl
public PrefixSetImpl() -
PrefixSetImpl
-
-
Method Details
-
create
-
add
- Specified by:
addin interfaceCollection<String>- Specified by:
addin interfaceSet<String>- Overrides:
addin classAbstractCollection<String>
-
remove
- Specified by:
removein interfaceCollection<String>- Specified by:
removein interfaceSet<String>- Overrides:
removein classAbstractCollection<String>
-
contains
- Specified by:
containsin interfaceCollection<String>- Specified by:
containsin interfaceSet<String>- Overrides:
containsin classAbstractCollection<String>
-
iterator
-
size
public int size()- Specified by:
sizein interfaceCollection<String>- Specified by:
sizein interfaceSet<String>- Specified by:
sizein classAbstractCollection<String>
-
getPrefixesOf
Description copied from interface:PrefixSetReturn the set of prefixes of str- Specified by:
getPrefixesOfin interfacePrefixSetinclusive- True if str should be matched as well- Returns:
-
intersect
Description copied from interface:PrefixSet(1) Replace shorter (more generic) prefixes in this with longer (more specific) ones in other when the former is a prefix of the latter. (2) Replace prefixes in this with shorter ones from other when the latter is a prefix for the former. -
toString
- Overrides:
toStringin classAbstractCollection<String>
-
hashCode
public int hashCode()- Specified by:
hashCodein interfaceCollection<String>- Specified by:
hashCodein interfaceSet<String>- Overrides:
hashCodein classAbstractSet<String>
-
equals
- Specified by:
equalsin interfaceCollection<String>- Specified by:
equalsin interfaceSet<String>- Overrides:
equalsin classAbstractSet<String>
-