public class NameSet extends Object
| Modifier and Type | Field and Description |
|---|---|
static Comparator<String> |
COMPARATOR |
| Constructor and Description |
|---|
NameSet()
Creates a NameSet, initially empty.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(String name) |
boolean |
contains(String name,
boolean caseSensitive)
Returns whether this set contains the given name, with a given
case-sensitivity.
|
boolean |
equals(@Nullable Object obj) |
int |
hashCode() |
static NameSet |
immutableCopyOf(Set<String> names)
Creates a NameSet that is an immutable copy of a given collection.
|
Iterable<String> |
iterable()
Returns the contents as an iterable.
|
Collection<String> |
range(String name,
boolean caseSensitive)
Returns an iterable over all the entries in the set that match the given
name.
|
String |
toString() |
public static final Comparator<String> COMPARATOR
public static NameSet immutableCopyOf(Set<String> names)
public void add(String name)
public Collection<String> range(String name, boolean caseSensitive)
public boolean contains(String name, boolean caseSensitive)
Copyright © 2012-2022 Apache Software Foundation. All Rights Reserved.