|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.AbstractCollection<E> java.util.AbstractSet<E> java.util.TreeSet<java.lang.String> org.archive.util.PrefixSet
public class PrefixSet
Utility class for maintaining sorted set of string prefixes. Redundant prefixes are coalesced into the shorter prefix.
Constructor Summary | |
---|---|
PrefixSet()
|
Method Summary | |
---|---|
boolean |
add(java.lang.String s)
Maintains additional invariant: if one entry is a prefix of another, keep only the prefix. |
boolean |
containsPrefixOf(java.lang.String s)
Test whether the given String is prefixed by one of this set's entries. |
Methods inherited from class java.util.TreeSet |
---|
addAll, ceiling, clear, clone, comparator, contains, descendingIterator, descendingSet, first, floor, headSet, headSet, higher, isEmpty, iterator, last, lower, pollFirst, pollLast, remove, size, subSet, subSet, tailSet, tailSet |
Methods inherited from class java.util.AbstractSet |
---|
equals, hashCode, removeAll |
Methods inherited from class java.util.AbstractCollection |
---|
containsAll, retainAll, toArray, toArray, toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Set |
---|
containsAll, equals, hashCode, removeAll, retainAll, toArray, toArray |
Constructor Detail |
---|
public PrefixSet()
Method Detail |
---|
public boolean containsPrefixOf(java.lang.String s)
s
-
public boolean add(java.lang.String s)
add
in interface java.util.Collection<java.lang.String>
add
in interface java.util.Set<java.lang.String>
add
in class java.util.TreeSet<java.lang.String>
Collection.add(java.lang.Object)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |