|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractSet
org.apache.lucene.analysis.CharArraySet
public class CharArraySet
A simple class that stores Strings as char[]'s in a hash table. Note that this is not a general purpose class. For example, it cannot remove items from the set, nor does it resize its hash table to be smaller, etc. It is designed to be quick to test if a char[] is in the set without the necessity of converting it to a String first.
| Nested Class Summary | |
|---|---|
class |
CharArraySet.CharArraySetIterator
The Iterator |
| Constructor Summary | |
|---|---|
CharArraySet(java.util.Collection c,
boolean ignoreCase)
Create set from a Collection of char[] or String |
|
CharArraySet(int startSize,
boolean ignoreCase)
Create set with enough capacity to hold startSize terms |
|
| Method Summary | |
|---|---|
boolean |
add(char[] text)
Add this char[] directly to the set. |
boolean |
add(java.lang.CharSequence text)
Add this CharSequence into the set |
boolean |
add(java.lang.Object o)
|
boolean |
add(java.lang.String text)
Add this String into the set |
boolean |
contains(char[] text,
int off,
int len)
true if the len chars of text starting at off
are in the set |
boolean |
contains(java.lang.CharSequence cs)
true if the CharSequence is in the set |
boolean |
contains(java.lang.Object o)
|
boolean |
isEmpty()
|
java.util.Iterator |
iterator()
|
int |
size()
|
| Methods inherited from class java.util.AbstractSet |
|---|
equals, hashCode, removeAll |
| Methods inherited from class java.util.AbstractCollection |
|---|
addAll, clear, containsAll, remove, retainAll, toArray, toArray, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Set |
|---|
addAll, clear, containsAll, remove, retainAll, toArray, toArray |
| Constructor Detail |
|---|
public CharArraySet(int startSize,
boolean ignoreCase)
public CharArraySet(java.util.Collection c,
boolean ignoreCase)
| Method Detail |
|---|
public boolean contains(char[] text,
int off,
int len)
len chars of text starting at off
are in the set
public boolean contains(java.lang.CharSequence cs)
CharSequence is in the set
public boolean add(java.lang.CharSequence text)
public boolean add(java.lang.String text)
public boolean add(char[] text)
public int size()
size in interface java.util.Collectionsize in interface java.util.Setsize in class java.util.AbstractCollectionpublic boolean isEmpty()
isEmpty in interface java.util.CollectionisEmpty in interface java.util.SetisEmpty in class java.util.AbstractCollectionpublic boolean contains(java.lang.Object o)
contains in interface java.util.Collectioncontains in interface java.util.Setcontains in class java.util.AbstractCollectionpublic boolean add(java.lang.Object o)
add in interface java.util.Collectionadd in interface java.util.Setadd in class java.util.AbstractCollectionpublic java.util.Iterator iterator()
iterator in interface java.lang.Iterableiterator in interface java.util.Collectioniterator in interface java.util.Setiterator in class java.util.AbstractCollection
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||