public class CharArrayMap<V> extends AbstractMap<Object,V>
Modifier and Type | Class and Description |
---|---|
class |
CharArrayMap.EntryIterator
public iterator class so efficient methods are exposed to users
|
class |
CharArrayMap.EntrySet
public EntrySet class so efficient methods are exposed to users
|
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
Constructor and Description |
---|
CharArrayMap(int startSize,
boolean ignoreCase)
Create map with enough capacity to hold startSize terms
|
CharArrayMap(Map<?,? extends V> c,
boolean ignoreCase)
Creates a map from the mappings in another map.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears all entries in this map.
|
boolean |
containsKey(char[] text,
int off,
int len)
|
boolean |
containsKey(CharSequence cs)
true if the
CharSequence is in the keySet() |
boolean |
containsKey(Object o) |
static <V> CharArrayMap<V> |
copy(Map<?,? extends V> map)
Returns a copy of the given map as a
CharArrayMap . |
static <V> CharArrayMap<V> |
emptyMap()
Returns an empty, unmodifiable map.
|
CharArrayMap.EntrySet |
entrySet() |
V |
get(char[] text,
int off,
int len)
returns the value of the mapping of
len chars of text
starting at off |
V |
get(CharSequence cs)
returns the value of the mapping of the chars inside this
CharSequence |
V |
get(Object o) |
CharArraySet |
keySet()
Returns an
CharArraySet view on the map's keys. |
V |
put(char[] text,
V value)
Add the given mapping.
|
V |
put(CharSequence text,
V value)
Add the given mapping.
|
V |
put(Object o,
V value) |
V |
put(String text,
V value)
Add the given mapping.
|
V |
remove(Object key) |
int |
size() |
String |
toString() |
static <V> CharArrayMap<V> |
unmodifiableMap(CharArrayMap<V> map)
Returns an unmodifiable
CharArrayMap . |
clone, containsValue, equals, hashCode, isEmpty, putAll, values
finalize, getClass, notify, notifyAll, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
public CharArrayMap(int startSize, boolean ignoreCase)
startSize
- the initial capacityignoreCase
- false
if and only if the set should be case sensitive
otherwise true
.public void clear()
Map.remove(java.lang.Object)
.public boolean containsKey(char[] text, int off, int len)
public boolean containsKey(CharSequence cs)
CharSequence
is in the keySet()
public boolean containsKey(Object o)
containsKey
in interface Map<Object,V>
containsKey
in class AbstractMap<Object,V>
public V get(char[] text, int off, int len)
len
chars of text
starting at off
public V get(CharSequence cs)
CharSequence
public V put(CharSequence text, V value)
public V put(char[] text, V value)
public int size()
public String toString()
toString
in class AbstractMap<Object,V>
public final CharArrayMap.EntrySet entrySet()
public final CharArraySet keySet()
CharArraySet
view on the map's keys.
The set will use the same matchVersion
as this map.public static <V> CharArrayMap<V> unmodifiableMap(CharArrayMap<V> map)
CharArrayMap
. This allows to provide
unmodifiable views of internal map for "read-only" use.map
- a map for which the unmodifiable map is returned.CharArrayMap
.NullPointerException
- if the given map is null
.public static <V> CharArrayMap<V> copy(Map<?,? extends V> map)
CharArrayMap
. If the given map
is a CharArrayMap
the ignoreCase property will be preserved.map
- a map to copyCharArrayMap
. If the given map
is a CharArrayMap
the ignoreCase property as well as the
matchVersion will be of the given map will be preserved.public static <V> CharArrayMap<V> emptyMap()
Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.