|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.deduced.PropertyImplementation<E>
E
- the type of value stored in the propertypublic class PropertyImplementation<E>
Property. This class holds a property instance and value. The instance describes the content of this property.
Field Summary | |
---|---|
private PropertyCollection<?,?> |
instance
instance that describes the property |
private static long |
serialVersionUID
the serial version |
private E |
value
value of the property |
Constructor Summary | |
---|---|
protected |
PropertyImplementation()
PropertyImplementation constructor with no arguments |
|
PropertyImplementation(Property<? extends E> otherProperty)
copy constructor for Property |
|
PropertyImplementation(PropertyCollection<?,?> setInstance,
E setValue)
constructor for Property |
Method Summary | ||
---|---|---|
static boolean |
arePropertiesEqual(Property<?> firstProperty,
Property<?> secondProperty)
test if 2 properties are equal depending on the type of instance they contain |
|
static boolean |
arePropertyValuesEqual(boolean isReference,
java.lang.Object firstValue,
java.lang.Object secondValue)
test if 2 property values are equal depending on whether a property is by reference or not. |
|
static
|
clonePropertyValue(PropertyCollection<?,?> instance,
E valueToClone)
clone Property Value |
|
void |
copy(Property<? extends E> otherProperty)
copy a property |
|
boolean |
equals(java.lang.Object obj)
(non-Javadoc) |
|
PropertyCollection<?,?> |
getInstance()
|
|
E |
getValue()
|
|
PropertyCollection<?,?> |
getValueType()
fetch the property type of the value held by this property |
|
int |
hashCode()
(non-Javadoc) |
|
boolean |
isValueEqual(java.lang.Object otherValue)
test if the specified value is the same that is held by this property. |
|
static void |
resetParentOnValue(java.lang.Object value,
PropertyCollection<?,?> instance,
PropertyCollection<?,?> parent,
java.lang.Object propertyKey)
reset Parent On Old Value |
|
protected void |
setInstance(PropertyCollection<?,?> setInstance)
set Instance |
|
void |
setValue(E setValue)
|
|
static
|
setValueOnProperty(Property<V> setProperty,
java.lang.Object propertyKey,
V value,
PropertyCollection<?,?> parent)
set Value On Property |
|
static void |
setValueParent(java.lang.Object value,
PropertyCollection<?,?> instance,
PropertyCollection<?,?> parent,
java.lang.Object keyOnParent)
Set the parent property collection that owns the property. |
|
java.lang.String |
toString()
(non-Javadoc) |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
private PropertyCollection<?,?> instance
private E value
Constructor Detail |
---|
public PropertyImplementation(PropertyCollection<?,?> setInstance, E setValue)
setInstance
- the instance descriptionsetValue
- the value of the propertyprotected PropertyImplementation()
public PropertyImplementation(Property<? extends E> otherProperty)
otherProperty
- the property to copyMethod Detail |
---|
protected void setInstance(PropertyCollection<?,?> setInstance)
setInstance
- instance to setpublic PropertyCollection<?,?> getInstance()
getInstance
in interface Property<E>
public E getValue()
getValue
in interface Property<E>
public void setValue(E setValue)
setValue
in interface Property<E>
setValue
- The value to set.public static <V> void setValueOnProperty(Property<V> setProperty, java.lang.Object propertyKey, V value, PropertyCollection<?,?> parent)
V
- type of value in the property to modifysetProperty
- the property on which to set the valuepropertyKey
- the the property keyvalue
- the new property valueparent
- the value parentpublic void copy(Property<? extends E> otherProperty)
copy
in interface Property<E>
otherProperty
- the other property to copypublic java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public static boolean arePropertiesEqual(Property<?> firstProperty, Property<?> secondProperty)
firstProperty
- the first propertysecondProperty
- the second property
public static boolean arePropertyValuesEqual(boolean isReference, java.lang.Object firstValue, java.lang.Object secondValue)
isReference
- is the property a reference or not.firstValue
- the first valuesecondValue
- the second value
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Object.equals(java.lang.Object)
public boolean isValueEqual(java.lang.Object otherValue)
isValueEqual
in interface Property<E>
otherValue
- the value to check for equality
public static void setValueParent(java.lang.Object value, PropertyCollection<?,?> instance, PropertyCollection<?,?> parent, java.lang.Object keyOnParent)
value
- the value on which to set the parentinstance
- the instance used to contain the valueparent
- the parent collectionkeyOnParent
- the key on the parent collectionpublic static void resetParentOnValue(java.lang.Object value, PropertyCollection<?,?> instance, PropertyCollection<?,?> parent, java.lang.Object propertyKey)
value
- value on which to reset the parentinstance
- instance used to reference the valueparent
- the previous parentpropertyKey
- the expected property keypublic static <E> E clonePropertyValue(PropertyCollection<?,?> instance, E valueToClone)
E
- the type of value to cloneinstance
- the instance of the property being clonedvalueToClone
- the value to clone
public PropertyCollection<?,?> getValueType()
getValueType
in interface Property<E>
public int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |