public static class H.KV<T extends H.KV> extends Object implements Serializable
Modifier and Type | Method and Description |
---|---|
boolean |
changed()
Alias of
dirty() |
T |
clear()
Clear the internal data map.
|
boolean |
contains(String key)
Alias of
containsKey(String) |
boolean |
containsKey(String key)
Returns true if an association with key specified exists in the internal map
|
boolean |
dirty()
Indicate if the KV has been changed
|
boolean |
empty()
Returns true if the internal data map is empty
|
Set<Map.Entry<String,String>> |
entrySet()
Returns the entry set of internal data map
|
boolean |
equals(Object obj) |
String |
get(String key)
Returns the string value associated with the key specified
|
int |
hashCode() |
boolean |
isEmpty()
Returns
true if internal data map is empty |
Set<String> |
keySet()
Returns the key set of internal data map
|
T |
load(String key,
String val)
Associate a string value with the key specified during initialization.
|
protected T |
me() |
T |
put(String key,
Object val)
Associate an Object value’s String representation with the key specified.
|
T |
put(String key,
String val)
Associate a string value with the key specified.
|
T |
remove(String key)
Release an association with key specified
|
int |
size()
Returns the number of assoications stored in the internal map
|
String |
toString() |
public T load(String key, String val)
Associate a string value with the key specified during initialization. The difference between calling load
and put(String, String)
is the former will not change the dirty tag
key
- the keyval
- the valuepublic T put(String key, String val)
Associate a string value with the key specified.
key
- the keyval
- the valuepublic T put(String key, Object val)
Associate an Object value’s String representation with the key specified. If the object is null
then null
is associated with the key specified
key
- the keyval
- the valuepublic String get(String key)
Returns the string value associated with the key specified
key
- the keypublic Set<Map.Entry<String,String>> entrySet()
Returns the entry set of internal data map
public boolean isEmpty()
Returns true
if internal data map is empty
public boolean dirty()
Indicate if the KV has been changed
true
if this instance has been changedpublic boolean changed()
Alias of dirty()
public boolean empty()
Returns true if the internal data map is empty
public boolean containsKey(String key)
Returns true if an association with key specified exists in the internal map
key
- the keypublic boolean contains(String key)
Alias of containsKey(String)
key
- the keypublic int size()
Returns the number of assoications stored in the internal map
public T remove(String key)
Release an association with key specified
key
- specify the k-v pair that should be removed from internal mappublic T clear()
Clear the internal data map. In other words, all Key/Value association stored in this instance has been release
protected T me()
Copyright © 2017–2020 OSGL (Open Source General Library). All rights reserved.