|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.SystemEnvironment
class SystemEnvironment
Internal class holding the System environment variables. The Java spec mandates that this map be read-only, so we wrap our real map into this one and make sure no one touches the contents. We also check for null parameters and do some (seemingly unnecessary) type casts to fulfill the contract layed out in the spec.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface java.util.Map |
|---|
Map.Entry<K,V> |
| Constructor Summary | |
|---|---|
SystemEnvironment(Map<String,String> map)
|
|
| Method Summary | |
|---|---|
void |
clear()
Removes all elements from this Map, leaving it empty. |
boolean |
containsKey(Object key)
Searches this Map for the specified key. |
boolean |
containsValue(Object value)
Searches this Map for the specified value. |
Set |
entrySet()
Returns a Set whose elements comprise all of the mappings
that are to be found in this Map. |
String |
get(Object key)
Returns the value of the mapping with the specified key. |
boolean |
isEmpty()
Returns if this Map has no elements, a size of zero. |
Set<String> |
keySet()
Returns a Set of the keys contained in this Map. |
String |
put(Object key,
Object value)
Maps the specified key to the specified value. |
void |
putAll(Map map)
Copies every mapping in the specified Map to this Map. |
String |
remove(Object key)
Removes a mapping with the specified key from this Map. |
int |
size()
Returns the number of elements in this Map. |
Collection |
values()
Returns all of the current Map values in a
Collection. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.util.Map |
|---|
equals, hashCode |
| Constructor Detail |
|---|
public SystemEnvironment(Map<String,String> map)
| Method Detail |
|---|
public void clear()
Map
clear in interface MapMap.isEmpty(),
Map.size()public boolean containsKey(Object key)
Map
containsKey in interface Mapkey - the object to search for
key is a key of this Map, false otherwisepublic boolean containsValue(Object value)
Map
containsValue in interface Mapvalue - the object to search for
value is a value of this Map, false
otherwisepublic Set entrySet()
MapSet whose elements comprise all of the mappings
that are to be found in this Map. Information on each of
the mappings is encapsulated in a separate Map.Entry instance. As
the Set is backed by this Map, users
should be aware that changes in one will be immediately visible in the
other.
entrySet in interface MapSet of the mappingspublic String get(Object key)
Map
get in interface Mapkey - the key
public boolean isEmpty()
Map
isEmpty in interface MapMap.size()public Set<String> keySet()
Map
keySet in interface Map
public String put(Object key,
Object value)
Map
put in interface Mapkey - the keyvalue - the value
public void putAll(Map map)
Map
putAll in interface Mapmap - the Map to copy mappings frompublic String remove(Object key)
Map
remove in interface Mapkey - the key of the mapping to remove
public int size()
Map
size in interface Mappublic Collection values()
MapMap values in a
Collection. As the returned Collection is
backed by this Map, users should be aware that changes in
one will be immediately visible in the other.
values in interface Map
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||