public class NameSet extends Object
| Modifier and Type | Field and Description |
|---|---|
static Comparator<String> |
COMPARATOR
Comparator that compares all strings differently, but if two strings are
equal in case-insensitive match they are right next to each other.
|
private NavigableSet<String> |
names |
| Modifier | Constructor and Description |
|---|---|
|
NameSet()
Creates a NameSet, initially empty.
|
private |
NameSet(NavigableSet<String> names)
Creates a NameSet based on an existing set.
|
| 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.
|
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.
|
public static final Comparator<String> COMPARATOR
private final NavigableSet<String> names
private NameSet(NavigableSet<String> names)
public NameSet()
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–2018 The Apache Software Foundation. All rights reserved.