|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.deduced.AbstractPropertyCollection<K,V>
org.deduced.FixedPropertyInstanceCollection<K,V>
K
- the key typeV
- the value typepublic abstract class FixedPropertyInstanceCollection<K,V>
Abstract property collection used as a base class for property collections that have a fixed list of properties. This class will block add/remove methods and will use the key list to provide iterators, list and map access to the underlying class
Nested Class Summary | |
---|---|
private class |
FixedPropertyInstanceCollection.FixedPropertyListIterator
Iterator for the fixed property collection. |
private class |
FixedPropertyInstanceCollection.FixedPropertyListValueIterator
Iterator for the fixed property collection. |
Nested classes/interfaces inherited from class org.deduced.AbstractPropertyCollection |
---|
AbstractPropertyCollection.CollectionToDeleteMonitor |
Field Summary | |
---|---|
private static long |
serialVersionUID
serial ID |
Fields inherited from class org.deduced.AbstractPropertyCollection |
---|
CHECK_DELETE_MODE_AUTOMATIC, CHECK_DELETE_MODE_MANUAL, COLLECTION_TO_DELETE |
Fields inherited from interface org.deduced.PropertyCollection |
---|
PROPERTY_COLLECTION_TYPE |
Constructor Summary | |
---|---|
FixedPropertyInstanceCollection()
default constructor |
Method Summary | |
---|---|
K |
addProperty(K key,
PropertyCollection<?,?> instance,
V value)
(non-Javadoc) |
boolean |
areKeysAssignedAutomatically()
(non-Javadoc) |
boolean |
containsKey(java.lang.Object key)
(non-Javadoc) |
private PropertyCollection<?,?> |
findInstance(java.lang.Object key)
Fetch the property instance that matches the specified key from the property collection type |
private static PropertyCollection<?,?> |
findInstance(java.lang.Object key,
PropertyCollection<?,?> type)
Fetch the property instance that matches the specified key from the property collection type. |
Property<V> |
getProperty(java.lang.Object key)
(non-Javadoc) |
java.util.Iterator<Property<V>> |
iterator()
(non-Javadoc) |
java.util.Iterator<V> |
iteratorByValue()
(non-Javadoc) |
Property<V> |
removeProperty(java.lang.Object key)
(non-Javadoc) |
Property<V> |
removePropertyInstance(V instance)
(non-Javadoc) |
Property<V> |
removePropertyValue(V value)
(non-Javadoc) |
V |
setProperty(K key,
V value)
(non-Javadoc) |
int |
size()
(non-Javadoc) |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.deduced.PropertyCollection |
---|
asKeySet, getPropertyValue, type |
Field Detail |
---|
private static final long serialVersionUID
Constructor Detail |
---|
public FixedPropertyInstanceCollection()
Method Detail |
---|
public Property<V> removeProperty(java.lang.Object key)
key
- the key of the property
PropertyCollection.removeProperty(java.lang.Object)
public Property<V> removePropertyValue(V value)
value
- the value to remove
PropertyCollection.removePropertyValue(java.lang.Object)
public Property<V> removePropertyInstance(V instance)
instance
- the object to remove
PropertyCollection.removePropertyInstance(java.lang.Object)
public K addProperty(K key, PropertyCollection<?,?> instance, V value)
key
- the key of the property. Some collections assign keys
automatically, for those collections, a null value is
expected. If the key is specified when they are assigned
automatically, an IllegalArgumentException will be throwninstance
- the property instance to add. Most collections assign the
instance automatically, for those collections, the instance
can either be null or be the same as the instance that is
automatically assigned, otherwise an error will be thrownvalue
- the property value. If the value is a property collection,
then the collection is expected to have a null parent if the
instance is owned (not by reference), otherwise an
IllegalArgumentException will be thrown
PropertyCollection.addProperty(java.lang.Object,
org.deduced.PropertyCollection, java.lang.Object)
public int size()
PropertyCollection.size()
public java.util.Iterator<Property<V>> iterator()
PropertyCollection.iterator()
public java.util.Iterator<V> iteratorByValue()
PropertyCollection.iteratorByValue()
public Property<V> getProperty(java.lang.Object key)
key
- the property key
PropertyCollection.getProperty(java.lang.Object)
private PropertyCollection<?,?> findInstance(java.lang.Object key)
key
- the property instance key
private static PropertyCollection<?,?> findInstance(java.lang.Object key, PropertyCollection<?,?> type)
key
- the property instance keytype
- the property collection type to search
public boolean containsKey(java.lang.Object key)
key
- the property key
PropertyCollection.containsKey(java.lang.Object)
public boolean areKeysAssignedAutomatically()
PropertyCollection.areKeysAssignedAutomatically()
public V setProperty(K key, V value)
key
- the key of the propertyvalue
- the new value of the property. If the property is a
collection that is not by reference, this method requires that
the passed collection has a parent set to null since it will
reset the parent.
PropertyCollection.setProperty(java.lang.Object,
java.lang.Object)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |