Documentation of 'org.apache.lucene.analysis.CharArraySet' Java class
CharArraySet
org.apache.lucene.analysis

Class CharArraySet

  • All Implemented Interfaces:
    java.lang.Iterable, java.util.Collection, java.util.Set


    public class CharArraySet
    extends java.util.AbstractSet
    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.
    • Constructor Summary

      Constructors 
      Constructor and Description
      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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      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

        getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Set

        addAll, clear, containsAll, remove, retainAll, spliterator, toArray, toArray
      • Methods inherited from interface java.util.Collection

        parallelStream, removeIf, stream
      • Methods inherited from interface java.lang.Iterable

        forEach
    • Constructor Detail

      • CharArraySet

        public CharArraySet(int startSize,
                            boolean ignoreCase)
        Create set with enough capacity to hold startSize terms
      • CharArraySet

        public CharArraySet(java.util.Collection c,
                            boolean ignoreCase)
        Create set from a Collection of char[] or String
    • Method Detail

      • contains

        public boolean contains(char[] text,
                                int off,
                                int len)
        true if the len chars of text starting at off are in the set
      • contains

        public boolean contains(java.lang.CharSequence cs)
        true if the CharSequence is in the set
      • add

        public boolean add(java.lang.CharSequence text)
        Add this CharSequence into the set
      • add

        public boolean add(java.lang.String text)
        Add this String into the set
      • add

        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.
      • size

        public int size()
        Specified by:
        size in interface java.util.Collection
        Specified by:
        size in interface java.util.Set
        Specified by:
        size in class java.util.AbstractCollection
      • isEmpty

        public boolean isEmpty()
        Specified by:
        isEmpty in interface java.util.Collection
        Specified by:
        isEmpty in interface java.util.Set
        Overrides:
        isEmpty in class java.util.AbstractCollection
      • contains

        public boolean contains(java.lang.Object o)
        Specified by:
        contains in interface java.util.Collection
        Specified by:
        contains in interface java.util.Set
        Overrides:
        contains in class java.util.AbstractCollection
      • add

        public boolean add(java.lang.Object o)
        Specified by:
        add in interface java.util.Collection
        Specified by:
        add in interface java.util.Set
        Overrides:
        add in class java.util.AbstractCollection
      • iterator

        public java.util.Iterator iterator()
        Specified by:
        iterator in interface java.lang.Iterable
        Specified by:
        iterator in interface java.util.Collection
        Specified by:
        iterator in interface java.util.Set
        Specified by:
        iterator in class java.util.AbstractCollection

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.