Class StyleCapture.Property
- java.lang.Object
-
- ca.cgjennings.apps.arkham.deck.item.StyleCapture.Property
-
- Enclosing class:
- StyleCapture
public static final class StyleCapture.Property extends java.lang.ObjectEncapsulates a captured style property.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)Returnstrueif the specified object is aPropertywith the same name and value.java.lang.StringgetName()Returns the name of this property.java.lang.Class<? extends Style>getStyle()Returns theClassobject for theStyleinterface that this property belongs to.java.lang.Class<?>getType()Returns theClassinstance that represents the original type of the property.java.lang.ObjectgetValue()Returns the value of the property.inthashCode()booleanisConflicted()Returnstrueif the property has had different values during the life of this capture.voidsetValue(java.lang.Object value)Sets the value of the property.java.lang.StringtoString()Returns a debugging string that describes the property and its value.
-
-
-
Method Detail
-
getName
public java.lang.String getName()
Returns the name of this property. The property's name will be the name of the getter method use to read the property from itsStyleinterface, without the "get" or "is" prefix.- Returns:
- the name of the property
-
getValue
public java.lang.Object getValue()
Returns the value of the property. This is the value of the most recently captured property with this name.- Returns:
- the property value
-
setValue
public void setValue(java.lang.Object value)
Sets the value of the property. The class of the value object must be compatible with the type of the property.- Parameters:
value- the new value to assign to the property
-
getType
public java.lang.Class<?> getType()
Returns theClassinstance that represents the original type of the property. For example, if the property being read has typefloatthen the object returned by {#link getValue()} will be aFloatinstance and the type returned by this method will befloat.class.- Returns:
- the actual type of the captured property value, as declared in its getter method
-
getStyle
public java.lang.Class<? extends Style> getStyle()
Returns theClassobject for theStyleinterface that this property belongs to.- Returns:
- the style interface that the property is declared in
-
isConflicted
public boolean isConflicted()
Returnstrueif the property has had different values during the life of this capture.- Returns:
trueif different values have been captured for this property
-
toString
public java.lang.String toString()
Returns a debugging string that describes the property and its value.- Overrides:
toStringin classjava.lang.Object- Returns:
- a string that describes this property
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
Returnstrueif the specified object is aPropertywith the same name and value. (If this returnstruethe type and style must match unless the contract forStylehas been violated.)- Overrides:
equalsin classjava.lang.Object- Parameters:
obj- the object to compare this property with- Returns:
trueif the object represents the same property and has an equal value
-
-