public class CharArrayMap<V> extends AbstractMap<Object,V>
You may specify the Version
compatibility when creating CharArrayMap
:
CharArrayMap
with the behavior before Lucene
3.1 pass a Version
< 3.1 to the constructors.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.
|
CharArrayMap(Version matchVersion,
int startSize,
boolean ignoreCase)
Deprecated.
|
CharArrayMap(Version matchVersion,
Map<?,? extends V> c,
boolean ignoreCase)
Deprecated.
|
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> |
copy(Version matchVersion,
Map<?,? extends V> map)
Deprecated.
Use
copy(Map) |
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
public CharArrayMap(int startSize, boolean ignoreCase)
startSize
- the initial capacityignoreCase
- false
if and only if the set should be case sensitive
otherwise true
.@Deprecated public CharArrayMap(Version matchVersion, int startSize, boolean ignoreCase)
CharArrayMap(int, boolean)
public CharArrayMap(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
.@Deprecated public CharArrayMap(Version matchVersion, Map<?,? extends V> c, boolean ignoreCase)
CharArrayMap(java.util.Map, boolean)
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.
Note: If you intend to create a copy of another CharArrayMap
where
the Version
of the source map differs from its copy
CharArrayMap(Version, Map, boolean)
should be used instead.
The copy(Version, Map)
will preserve the Version
of the
source map it is an instance of CharArrayMap
.
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.@Deprecated public static <V> CharArrayMap<V> copy(Version matchVersion, Map<?,? extends V> map)
copy(Map)
public static <V> CharArrayMap<V> emptyMap()
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.