|
SMILA (incubation) API documentation | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.smila.datamodel.impl.AbstractAny
org.eclipse.smila.datamodel.impl.AnyMapImpl
public final class AnyMapImpl
Class implementing AnyMap.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.eclipse.smila.datamodel.Any |
---|
Any.ValueType |
Nested classes/interfaces inherited from interface java.util.Map |
---|
java.util.Map.Entry<K,V> |
Field Summary |
---|
Fields inherited from class org.eclipse.smila.datamodel.impl.AbstractAny |
---|
_valueType |
Fields inherited from interface org.eclipse.smila.datamodel.AnyMap |
---|
EMPTY |
Constructor Summary | |
---|---|
AnyMapImpl()
Constructs a new AnyMapImpl. |
Method Summary | |
---|---|
void |
add(java.lang.String key,
Any value)
Adds the given value to the mapped entry of the given key. |
AnyMap |
asMap()
returns this Any as an AnyMap object or throws an InvalidValueTypeException . |
void |
clear()
|
boolean |
containsKey(java.lang.Object key)
|
boolean |
containsValue(java.lang.Object value)
|
java.util.Set<java.util.Map.Entry<java.lang.String,Any>> |
entrySet()
|
boolean |
equals(java.lang.Object obj)
|
Any |
get(java.lang.Object key)
|
java.lang.Boolean |
getBooleanValue(java.lang.String key)
|
java.util.Date |
getDateTimeValue(java.lang.String key)
|
java.util.Date |
getDateValue(java.lang.String key)
|
java.lang.Double |
getDoubleValue(java.lang.String key)
|
java.lang.Long |
getLongValue(java.lang.String key)
|
AnyMap |
getMap(java.lang.String key)
|
AnyMap |
getMap(java.lang.String key,
boolean create)
Gets the map and optionally creates one under the given key if not present. |
AnySeq |
getSeq(java.lang.String key)
|
AnySeq |
getSeq(java.lang.String key,
boolean create)
Gets the seq and optionally creates one under the given key if not present. |
java.lang.String |
getStringValue(java.lang.String key)
|
Value |
getValue(java.lang.String key)
|
int |
hashCode()
|
boolean |
isEmpty()
|
java.util.Iterator<Any> |
iterator()
|
java.util.Set<java.lang.String> |
keySet()
|
Any |
put(java.lang.String key,
Any value)
|
Any |
put(java.lang.String key,
java.lang.Boolean value)
|
Any |
put(java.lang.String key,
java.lang.Number value)
Long, Integer, Short and Byte values will be converted to Value object of type LONG, all others to Value object of type DOUBLE. |
Any |
put(java.lang.String key,
java.lang.String value)
|
void |
putAll(java.util.Map<? extends java.lang.String,? extends Any> map)
|
Any |
remove(java.lang.Object key)
|
int |
size()
|
java.lang.String |
toString()
|
java.util.Collection<Any> |
values()
|
Methods inherited from class org.eclipse.smila.datamodel.impl.AbstractAny |
---|
asSeq, asValue, getFactory, getValueType, isBoolean, isDate, isDateTime, isDouble, isLong, isMap, isNumber, isSeq, isString, isValue |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.eclipse.smila.datamodel.Any |
---|
asSeq, asValue, getFactory, getValueType, isBoolean, isDate, isDateTime, isDouble, isLong, isMap, isNumber, isSeq, isString, isValue |
Constructor Detail |
---|
public AnyMapImpl()
Method Detail |
---|
public void add(java.lang.String key, Any value)
add
in interface AnyMap
key
- The keyvalue
- the Any to addpublic void clear()
clear
in interface java.util.Map<java.lang.String,Any>
public boolean isEmpty()
isEmpty
in interface java.util.Map<java.lang.String,Any>
isEmpty
in interface Any
Value
: returns always false.public java.util.Set<java.lang.String> keySet()
keySet
in interface java.util.Map<java.lang.String,Any>
public Any put(java.lang.String key, java.lang.String value)
put
in interface AnyMap
key
- The keyvalue
- String value, must not be null.
public Any put(java.lang.String key, java.lang.Number value)
put
in interface AnyMap
key
- The keyvalue
- Number value, will be converted, must not be null.
public Any put(java.lang.String key, java.lang.Boolean value)
put
in interface AnyMap
key
- The keyvalue
- Boolean value, must not be null.
public Any put(java.lang.String key, Any value)
put
in interface java.util.Map<java.lang.String,Any>
put
in interface AnyMap
key
- The keyvalue
- Any value, must not be null.
public int size()
size
in interface java.util.Map<java.lang.String,Any>
size
in interface Any
Value
this is always 1.public java.util.Collection<Any> values()
values
in interface java.util.Map<java.lang.String,Any>
public java.util.Iterator<Any> iterator()
iterator
in interface java.lang.Iterable<Any>
iterator
in interface Any
Value
, this return an iterator about the value itself. For
AnyMap
it returns an iterator on the values.public AnyMap getMap(java.lang.String key)
getMap
in interface AnyMap
key
- The key
public AnySeq getSeq(java.lang.String key)
getSeq
in interface AnyMap
key
- The key
public Value getValue(java.lang.String key)
getValue
in interface AnyMap
key
- the key
public java.lang.String getStringValue(java.lang.String key)
getStringValue
in interface AnyMap
key
- the key
public java.lang.Double getDoubleValue(java.lang.String key)
getDoubleValue
in interface AnyMap
key
- The key
public java.lang.Long getLongValue(java.lang.String key)
getLongValue
in interface AnyMap
key
- The key
public java.lang.Boolean getBooleanValue(java.lang.String key)
getBooleanValue
in interface AnyMap
key
- The key
public java.util.Date getDateValue(java.lang.String key)
getDateValue
in interface AnyMap
key
- The key
public java.util.Date getDateTimeValue(java.lang.String key)
getDateTimeValue
in interface AnyMap
key
- The key
public int hashCode()
hashCode
in interface java.util.Map<java.lang.String,Any>
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in interface java.util.Map<java.lang.String,Any>
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public boolean containsKey(java.lang.Object key)
containsKey
in interface java.util.Map<java.lang.String,Any>
public boolean containsValue(java.lang.Object value)
containsValue
in interface java.util.Map<java.lang.String,Any>
public Any get(java.lang.Object key)
get
in interface java.util.Map<java.lang.String,Any>
public void putAll(java.util.Map<? extends java.lang.String,? extends Any> map)
putAll
in interface java.util.Map<java.lang.String,Any>
public Any remove(java.lang.Object key)
remove
in interface java.util.Map<java.lang.String,Any>
public java.util.Set<java.util.Map.Entry<java.lang.String,Any>> entrySet()
entrySet
in interface java.util.Map<java.lang.String,Any>
public AnyMap asMap()
AnyMap
object or throws an InvalidValueTypeException
.
asMap
in interface Any
asMap
in class AbstractAny
AbstractAny.asMap()
public AnyMap getMap(java.lang.String key, boolean create)
getMap
in interface AnyMap
key
- The keycreate
- if true and the key is not yet used, create a new map. else just return null.
AnyMap.getMap(java.lang.String, boolean)
public AnySeq getSeq(java.lang.String key, boolean create)
getSeq
in interface AnyMap
key
- The keycreate
- the create
AnyMap.getSeq(java.lang.String, boolean)
|
SMILA (incubation) API documentation | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |