public class CharArraySet
extends java.util.AbstractSet
Modifier and Type | Class and Description |
---|---|
class |
CharArraySet.CharArraySetIterator
The Iterator
|
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
|
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() |
static CharArraySet |
unmodifiableSet(CharArraySet set)
Returns an unmodifiable
CharArraySet . |
addAll, clear, containsAll, remove, retainAll, toArray, toArray, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
public CharArraySet(int startSize, boolean ignoreCase)
public CharArraySet(java.util.Collection c, boolean ignoreCase)
public boolean contains(char[] text, int off, int len)
len
chars of text
starting at off
are in the setpublic boolean contains(java.lang.CharSequence cs)
CharSequence
is in the setpublic 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.Collection
size
in interface java.util.Set
size
in class java.util.AbstractCollection
public boolean isEmpty()
isEmpty
in interface java.util.Collection
isEmpty
in interface java.util.Set
isEmpty
in class java.util.AbstractCollection
public boolean contains(java.lang.Object o)
contains
in interface java.util.Collection
contains
in interface java.util.Set
contains
in class java.util.AbstractCollection
public boolean add(java.lang.Object o)
add
in interface java.util.Collection
add
in interface java.util.Set
add
in class java.util.AbstractCollection
public static CharArraySet unmodifiableSet(CharArraySet set)
CharArraySet
. This allows to provide
unmodifiable views of internal sets for "read-only" use.set
- a set for which the unmodifiable set is returned.CharArraySet
.java.lang.NullPointerException
- if the given set is null
.public java.util.Iterator iterator()
iterator
in interface java.lang.Iterable
iterator
in interface java.util.Collection
iterator
in interface java.util.Set
iterator
in class java.util.AbstractCollection
Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.