Save This Page
Home » lucene-2.3.2-src » org.apache » lucene » analysis » [javadoc | source]
org.apache.lucene.analysis
public class: CharArraySet [javadoc | source]
java.lang.Object
   java.util.AbstractCollection
      java.util.AbstractSet
         org.apache.lucene.analysis.CharArraySet

All Implemented Interfaces:
    Set, Collection

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:
public class  CharArraySet.CharArraySetIterator  The Iterator for this set. Strings are constructed on the fly, so use nextCharArray for more efficient access. 
Constructor:
 public CharArraySet(int startSize,
    boolean ignoreCase) 
 public CharArraySet(Collection c,
    boolean ignoreCase) 
    Create set from a Collection of char[] or String
Method from org.apache.lucene.analysis.CharArraySet Summary:
add,   add,   add,   add,   contains,   contains,   contains,   isEmpty,   iterator,   size
Methods from java.util.AbstractSet:
equals,   hashCode,   removeAll
Methods from java.util.AbstractCollection:
add,   addAll,   clear,   contains,   containsAll,   isEmpty,   iterator,   remove,   removeAll,   retainAll,   size,   toArray,   toArray,   toString
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.lucene.analysis.CharArraySet Detail:
 public boolean add(CharSequence text) 
    Add this CharSequence into the set
 public boolean add(String text) 
    Add this String into the set
 public boolean add(char[] text) 
    Add this char[] directly to the set. If ignoreCase is true for this Set, the text array will be directly modified. The user should never modify this text array after calling this method.
 public boolean add(Object o) 
 public boolean contains(CharSequence cs) 
    true if the CharSequence is in the set
 public boolean contains(Object o) 
 public boolean contains(char[] text,
    int off,
    int len) 
    true if the len chars of text starting at off are in the set
 public boolean isEmpty() 
 public Iterator iterator() 
 public int size()