Package org.pentaho.di.core.util
Class KeyValueSet
java.lang.Object
org.pentaho.di.core.util.KeyValueSet
- All Implemented Interfaces:
Serializable
,Iterable<KeyValue<?>>
- Author:
- Thomas Hoedl(asc042)
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionAdd key value(s).clear()
Clear entries.boolean
containsKey
(String key) KeyValue<?>
get
(org.apache.commons.collections.Predicate filter) KeyValue<?>
getRequired
(String key) boolean
isEmpty()
iterator()
keys()
KeyValue<?>
int
size()
toMap()
toString()
values()
void
walk
(org.apache.commons.collections.Closure handler) Walk entries.void
walk
(org.apache.commons.collections.Closure handler, org.apache.commons.collections.Predicate filter) Walk entries.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
KeyValueSet
public KeyValueSet()
-
-
Method Details
-
add
Add key value(s).- Parameters:
keyValues
- key values to add.- Returns:
- this.
-
iterator
-
get
- Parameters:
key
- the key.- Returns:
- key value or null.
-
get
public List<KeyValue<?>> get(org.apache.commons.collections.Predicate filter) throws IllegalArgumentException - Parameters:
filter
- filter to use.- Returns:
- matching key values.
- Throws:
IllegalArgumentException
- if filter is null.
-
getRequired
- Parameters:
key
- the key.- Returns:
- key value, never null.
-
keys
- Returns:
- keys.
-
keyValues
- Returns:
- key values/entries.
-
values
- Returns:
- values.
-
toMap
- Returns:
- entries as map.
-
walk
public void walk(org.apache.commons.collections.Closure handler, org.apache.commons.collections.Predicate filter) throws IllegalArgumentException Walk entries.- Parameters:
handler
- handler to call.filter
- filter to use.- Throws:
IllegalArgumentException
- if closure or filter is null.
-
walk
Walk entries.- Parameters:
handler
- handler to call.- Throws:
IllegalArgumentException
- if handler is null.
-
remove
- Parameters:
key
- the key.- Returns:
- previous or null.
-
containsKey
- Parameters:
key
- key to test.- Returns:
- true if ...
-
size
public int size()- Returns:
- size.
-
isEmpty
public boolean isEmpty()- Returns:
- true if empty.
-
clear
Clear entries.- Returns:
- this.
-
toMultiLineString
- Returns:
- string representation.
-
toString
-