|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gate.util.SimpleMapImpl | +--gate.util.SimpleFeatureMapImpl
Simple case of features.
Field Summary | |
(package private) int |
capacity
The capacity of the map |
(package private) int |
count
The current number of elements of the map |
private static boolean |
DEBUG
Debug flag |
private Vector |
mapListeners
|
(package private) static Object |
nullKey
the Object instance that will represent the NULL keys in the map |
(package private) static long |
serialVersionUID
Freeze the serialization UID. |
(package private) Object[] |
theKeys
Array keeping the keys of the entries in the map. |
static HashMap |
theKeysHere
the static 'all keys' collection |
(package private) Object[] |
theValues
Array keeping the values of the entries in the map. |
Constructor Summary | |
SimpleFeatureMapImpl()
|
Method Summary | |
void |
addFeatureMapListener(FeatureMapListener l)
Adds a gate listener |
void |
clear()
clear the map |
Object |
clone()
Create a copy of the map including the data. |
boolean |
containsKey(Object key)
return true if the key is in the map |
boolean |
containsValue(Object value)
return true if the map contains that value |
Set |
entrySet()
|
boolean |
equals(Object o)
|
protected void |
fireMapUpdatedEvent()
|
Object |
get(Object key)
return the value associated with the key. |
protected int |
getSubsumeKey(Object key)
return the index of the key in the map comparing them by reference only. |
int |
hashCode()
return the hashCode for the map |
boolean |
isEmpty()
return true if there are no elements in the map |
Set |
keySet()
return the set of the keys in the map. |
protected boolean |
ontologySubsume(String ontoUrl,
String value1,
String value2)
ontology enhanced subsume |
Object |
put(Object key,
Object value)
Overriden to fire events, so that the persistent objects can keep track of what's updated |
void |
putAll(Map t)
put all the elements from a map |
Object |
remove(Object key)
Overriden to fire events, so that the persistent objects can keep track of what's updated |
void |
removeFeatureMapListener(FeatureMapListener l)
Removes a gate listener |
int |
size()
return the number of elements in the map |
boolean |
subsumes(FeatureMap aFeatureMap)
Test if this featureMap includes all features from aFeatureMap |
boolean |
subsumes(FeatureMap aFeatureMap,
Set aFeatureNamesSet)
Tests if this featureMap object includes aFeatureMap but only for the those features present in the aFeatureNamesSet. |
String |
toString()
|
Collection |
values()
Not supported. |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Map |
containsKey, containsValue, entrySet, get, hashCode, isEmpty, keySet, putAll, size, values |
Field Detail |
private static final boolean DEBUG
static final long serialVersionUID
private transient Vector mapListeners
int capacity
int count
Object[] theKeys
Object[] theValues
static transient Object nullKey
public static transient HashMap theKeysHere
Constructor Detail |
public SimpleFeatureMapImpl()
Method Detail |
public boolean subsumes(FeatureMap aFeatureMap)
subsumes
in interface FeatureMap
aFeatureMap
- object which will be included or not in
this FeatureMap obj.If this param is null then it will return true.
true
if aFeatureMap is incuded in this obj.
and false
if not.public boolean subsumes(FeatureMap aFeatureMap, Set aFeatureNamesSet)
subsumes
in interface FeatureMap
aFeatureMap
- which will be included or not in this
FeatureMap obj.If this param is null then it will return true.aFeatureNamesSet
- is a set of strings representing the names of the
features that would be considered for subsumes. If aFeatureNamesSet is
null then subsumes(FeatureMap) will be called.
true
if all features present in the aFeaturesNameSet
from aFeatureMap are included in this obj, or false
otherwise.public Object put(Object key, Object value)
put
in interface Map
put
in class SimpleMapImpl
public Object remove(Object key)
remove
in interface Map
remove
in class SimpleMapImpl
public void clear()
SimpleMapImpl
clear
in interface Map
clear
in class SimpleMapImpl
public Object clone()
SimpleMapImpl
clone
in class SimpleMapImpl
public boolean equals(Object o)
equals
in interface Map
equals
in class SimpleMapImpl
public void removeFeatureMapListener(FeatureMapListener l)
removeFeatureMapListener
in interface FeatureMap
public void addFeatureMapListener(FeatureMapListener l)
addFeatureMapListener
in interface FeatureMap
protected void fireMapUpdatedEvent()
protected boolean ontologySubsume(String ontoUrl, String value1, String value2)
ontoUrl
- the url of the ontology to be used
public int size()
size
in interface Map
public boolean isEmpty()
isEmpty
in interface Map
public Collection values()
values
in interface Map
public Set keySet()
keySet
in interface Map
public boolean containsKey(Object key)
containsKey
in interface Map
public boolean containsValue(Object value)
containsValue
in interface Map
public Object get(Object key)
get
in interface Map
public void putAll(Map t)
putAll
in interface Map
protected int getSubsumeKey(Object key)
public Set entrySet()
entrySet
in interface Map
public int hashCode()
hashCode
in interface Map
hashCode
in class Object
public String toString()
toString
in class Object
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |