public class WildcardMap
extends java.lang.Object
Title: Framework Support Library
Description: Defines a multimap-like container with string keys containing wildcard.
Copyright: Copyright (c) 2010
Company: StreamScape Technologies
Constructor and Description |
---|
WildcardMap(char wildcard)
Constructs a new map.
|
WildcardMap(WildcardMap other)
Constructs a new map from the specified other map.
|
Modifier and Type | Method and Description |
---|---|
boolean |
containsKey(java.lang.String key)
Checks if the map contains a value matching the specified key.
|
java.util.List |
get(java.lang.String pattern)
Returns a list of values matching the specified pattern.
|
java.lang.Object |
getByKey(java.lang.String key)
Returns a list of values matching the specified key.
|
java.util.List |
getNegated(java.lang.String pattern)
Returns a list of values matching with negation the specified pattern.
|
char |
getWildcard()
Returns a wilcard character associated with the map.
|
boolean |
isEmpty()
Checks if the map is empty.
|
void |
put(java.lang.String key,
java.lang.Object value)
Puts the specified value matching the specified key to the map.
|
void |
remove(java.lang.String pattern)
Removes a list of values matching the specified pattern.
|
void |
removeByKey(java.lang.String key)
Removes a value matching the specified key.
|
public WildcardMap(char wildcard)
wildcard
- the wildcard character of the map.public WildcardMap(WildcardMap other)
other
- the other map from which this map will be constructed.public char getWildcard()
public java.util.List get(java.lang.String pattern)
pattern
- the specified pattern matching the found values.public java.lang.Object getByKey(java.lang.String key)
key
- the specified key.public void put(java.lang.String key, java.lang.Object value)
key
- the key matching the put value.value
- the value to be added.public void remove(java.lang.String pattern)
pattern
- the specified pattern matching the removed values.public void removeByKey(java.lang.String key)
key
- the key matching the removed value.public java.util.List getNegated(java.lang.String pattern)
pattern
- the specified pattern.public boolean containsKey(java.lang.String key)
key
- the key matching the checked value.true
if the map contains the checked value, false
otherwise.public boolean isEmpty()
true
if the map is empty, false
otherwise.Copyright © 2015-2024 StreamScape Technologies. All rights reserved.