public class CharArrayMap<V>
extends java.util.AbstractMap<java.lang.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
|
| Constructor and Description |
|---|
CharArrayMap(int startSize,
boolean ignoreCase)
Create map with enough capacity to hold startSize terms
|
CharArrayMap(java.util.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(java.lang.CharSequence cs)
true if the
CharSequence is in the keySet() |
boolean |
containsKey(java.lang.Object o) |
static <V> CharArrayMap<V> |
copy(java.util.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(java.lang.CharSequence cs)
returns the value of the mapping of the chars inside this
CharSequence |
V |
get(java.lang.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(java.lang.CharSequence text,
V value)
Add the given mapping.
|
V |
put(java.lang.Object o,
V value) |
V |
put(java.lang.String text,
V value)
Add the given mapping.
|
V |
remove(java.lang.Object key) |
int |
size() |
java.lang.String |
toString() |
static <V> CharArrayMap<V> |
unmodifiableMap(CharArrayMap<V> map)
Returns an unmodifiable
CharArrayMap. |
clone, containsValue, equals, hashCode, isEmpty, putAll, valuespublic CharArrayMap(int startSize,
boolean ignoreCase)
startSize - the initial capacityignoreCase - false if and only if the set should be case sensitive
otherwise true.public CharArrayMap(java.util.Map<?,? extends V> c, boolean ignoreCase)
c - a map whose mappings to be copiedignoreCase - 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(java.lang.CharSequence cs)
CharSequence is in the keySet()public boolean containsKey(java.lang.Object o)
public V get(char[] text, int off, int len)
len chars of text
starting at offpublic V get(java.lang.CharSequence cs)
CharSequencepublic V get(java.lang.Object o)
public V put(char[] text, V value)
public V remove(java.lang.Object key)
public int size()
public java.lang.String toString()
toString in class java.util.AbstractMap<java.lang.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.java.lang.NullPointerException - if the given map is null.public static <V> CharArrayMap<V> copy(java.util.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–2025 The Apache Software Foundation. All rights reserved.