|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Map
The Map
interface define a new data structure interface. The
interface define a way to associate a triple of keys with one object. The
type of keys are Object
for the principal key,
String
for the name of the stored object and the last key
named context is an Object
. When no context is specified
the context used is the principal key, this context can also be named
The type of data that can be associated with this keys are also restricted,
they can be of two type AbstractScalar
or
String
.
Method Summary | |
---|---|
void |
clear()
Clear the content of this Map |
boolean |
contains(java.lang.Object o)
Say if an object is a principal key. |
boolean |
contains(java.lang.Object o,
java.lang.String name)
Say if an entry exist in this Map corresponding to a given
principal key and name using default context. |
boolean |
contains(java.lang.Object o,
java.lang.String name,
java.lang.Object context)
Say if an entry exist in this Map corresponding to a given
principal key,name and context. |
java.util.Iterator<?> |
contextsIterator(java.lang.Object o)
Returns an iterator on all contexts associated with a principal key. |
java.util.Iterator<?> |
contextsIterator(java.lang.Object o,
java.lang.String name)
Give an Iterator on all contexts assiated with a given principal
key and name. |
java.lang.String |
getDataType(java.lang.Object o,
java.lang.String name)
Returns the data type of the value associated with a principal key, a given name and the default context. |
java.lang.String |
getDataType(java.lang.Object o,
java.lang.String name,
java.lang.Object context)
Returns the data type of the value associated with a principal key, a given name and a context. |
java.lang.String |
getString(java.lang.Object o,
java.lang.String name)
Returns the String value associated with a principal key, a given
name and the default context. |
java.lang.String |
getString(java.lang.Object o,
java.lang.String name,
java.lang.Object context)
Returns the String value associated with a principal key, a given
name and context. |
AbstractScalar |
getValue(java.lang.Object o,
java.lang.String name)
Returns the AbstractScalar value associated with a principal key, a
given name and the default context. |
AbstractScalar |
getValue(java.lang.Object o,
java.lang.String name,
java.lang.Object context)
Returns the AbstractScalar value associated with a principal key, a
given name and context. |
java.util.Iterator<?> |
keysIterator()
Give an iterator on the principals keys store in this map. |
java.util.Iterator<java.lang.String> |
namesIterator(java.lang.Object o)
Give an Iterator on all the name of values associated with a given
principal key and the default context. |
java.util.Iterator<java.lang.String> |
namesIterator(java.lang.Object o,
java.lang.Object context)
Give an Iterator on all the name of values associated with a given
principal key and context. |
void |
putAll(java.util.Map<?,?> m,
java.lang.String name)
Put all pairs of values present in a Map in this
Map with a given name. |
void |
putAll(java.util.Map<?,?> m,
java.lang.String name,
java.lang.Object context)
Put all pairs of values present in a Map in this
Map with a given name and context. |
void |
putString(java.lang.Object o,
java.lang.String name,
java.lang.Object context,
java.lang.String value)
Associate a value ( String ) with a principal key, a given name and
a context. |
void |
putString(java.lang.Object o,
java.lang.String name,
java.lang.String value)
Associate a value ( String ) with a principal key, a name and the
default context. |
void |
putValue(java.lang.Object o,
java.lang.String name,
AbstractScalar value)
Associate a value ( AbstractScalar ) with a principal key, a name
and the default context. |
void |
putValue(java.lang.Object o,
java.lang.String name,
java.lang.Object context,
AbstractScalar value)
Associate a value ( AbstractScalar ) with a principal key, a name
and a context. |
boolean |
remove(java.lang.Object o,
java.lang.String name)
Remove the entry corresponding to a given principal key, a given name and the default context. |
boolean |
remove(java.lang.Object o,
java.lang.String name,
java.lang.Object context)
Remove the entry corresponding to a given principal key, a given name and a given context. |
void |
removeAll(java.lang.Object o)
Remove all values associated with a given principal key. |
void |
removeAll(java.lang.Object o,
java.lang.Object context)
Remove all values associated with a given principal key and context. |
Method Detail |
---|
java.lang.String getString(java.lang.Object o, java.lang.String name)
String
value associated with a principal key, a given
name and the default context.
o
- The principal key.name
- the name of value to get.
AbstractScalar getValue(java.lang.Object o, java.lang.String name)
AbstractScalar
value associated with a principal key, a
given name and the default context.
o
- The principal key.name
- the name of value to get.
AbstractScalar
representing the value.java.lang.String getDataType(java.lang.Object o, java.lang.String name)
String
representation of the
datatype correspond only to the class name without package path. For
exemple the string return for a String
is "String"
and not "java.lang.String"
.
o
- The principal key.name
- the name of the value.
null
if no value exist.java.lang.String getDataType(java.lang.Object o, java.lang.String name, java.lang.Object context)
String
representation of the datatype
correspond only to the class name without package path. For exemple the
string return for a String
is "String"
and not
"java.lang.String"
.
o
- the principql key.name
- the name of the value.context
- the context of the value.
null if no value exist.
java.lang.String getString(java.lang.Object o, java.lang.String name, java.lang.Object context)
String
value associated with a principal key, a given
name and context.
o
- The principal key.name
- the name of value.context
- the context of the value.
AbstractScalar getValue(java.lang.Object o, java.lang.String name, java.lang.Object context)
AbstractScalar
value associated with a principal key, a
given name and context.
o
- the principal key.name
- the name of value.context
- the context of the value.
AbstractScalar
representing the value.void putString(java.lang.Object o, java.lang.String name, java.lang.String value)
String
) with a principal key, a name and the
default context.
o
- The principal key.name
- the name of value.value
- the value to store.void putValue(java.lang.Object o, java.lang.String name, AbstractScalar value)
AbstractScalar
) with a principal key, a name
and the default context.
o
- The principal key.name
- the name of value.value
- the value to store.void putString(java.lang.Object o, java.lang.String name, java.lang.Object context, java.lang.String value)
String
) with a principal key, a given name and
a context.
o
- the principal key.name
- the name of value.context
- The context of the value.value
- the value to store.void putValue(java.lang.Object o, java.lang.String name, java.lang.Object context, AbstractScalar value)
AbstractScalar
) with a principal key, a name
and a context.
o
- the principal key.name
- the name of value.context
- The context of the value.value
- the value to store.void putAll(java.util.Map<?,?> m, java.lang.String name) throws java.lang.IllegalArgumentException
Map
in this
Map
with a given name. The default context is used to store value
in this Map
.
m
- The Map
.name
- The name of values in this Map
.
java.lang.IllegalArgumentException
- If one or more values in the Map
is not an
AbstractScalar
or a String
.void putAll(java.util.Map<?,?> m, java.lang.String name, java.lang.Object context) throws java.lang.IllegalArgumentException
Map
in this
Map
with a given name and context.
m
- The Map
.name
- The name used to add values in this Map
.context
- The context used to add values in this Map
.
java.lang.IllegalArgumentException
- If one or more values in the Map
is not an
AbstractScalar
or a String
.boolean remove(java.lang.Object o, java.lang.String name)
o
- the principal key.name
- the name of value.
true
if this Map
is modified and
false
otherwise.boolean remove(java.lang.Object o, java.lang.String name, java.lang.Object context)
o
- the principal key.name
- the name of value.context
- the context of the value.
true
if this Map
is modified and
false
otherwise.java.util.Iterator<java.lang.String> namesIterator(java.lang.Object o)
Iterator
on all the name of values associated with a given
principal key and the default context. You can use this function when you
have object with values which you don't know the name.
o
- The principal key.
String
.java.util.Iterator<java.lang.String> namesIterator(java.lang.Object o, java.lang.Object context)
Iterator
on all the name of values associated with a given
principal key and context. You can use this function when you have object
with values which you don't know the name.
o
- the principal key.context
- the context.
String
.java.util.Iterator<?> contextsIterator(java.lang.Object o, java.lang.String name)
Iterator
on all contexts assiated with a given principal
key and name.
o
- the principal key.name
- the name.
java.util.Iterator<?> contextsIterator(java.lang.Object o)
o
- The principal key.
void removeAll(java.lang.Object o, java.lang.Object context)
o
- the principal key.context
- the context of values.void removeAll(java.lang.Object o)
o
- The object to remove from the map.void clear()
Map
boolean contains(java.lang.Object o, java.lang.String name)
Map
corresponding to a given
principal key and name using default context.
o
- the principal key.name
- the name of the value.
true
if an entry exist and false
otherwise.boolean contains(java.lang.Object o, java.lang.String name, java.lang.Object context)
Map
corresponding to a given
principal key,name and context.
o
- the principal key.name
- the name of the value.context
- the context of the value.
java.util.Iterator<?> keysIterator()
boolean contains(java.lang.Object o)
o
- the principal key.
true
if o is a principal key and
false
otherwise.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |