Class StyleCapture.Property

  • Enclosing class:
    StyleCapture

    public static final class StyleCapture.Property
    extends java.lang.Object
    Encapsulates a captured style property.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)
      Returns true if the specified object is a Property with the same name and value.
      java.lang.String getName()
      Returns the name of this property.
      java.lang.Class<? extends Style> getStyle()
      Returns the Class object for the Style interface that this property belongs to.
      java.lang.Class<?> getType()
      Returns the Class instance that represents the original type of the property.
      java.lang.Object getValue()
      Returns the value of the property.
      int hashCode()  
      boolean isConflicted()
      Returns true if the property has had different values during the life of this capture.
      void setValue​(java.lang.Object value)
      Sets the value of the property.
      java.lang.String toString()
      Returns a debugging string that describes the property and its value.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • 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 its Style interface, 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 the Class instance that represents the original type of the property. For example, if the property being read has type float then the object returned by {#link getValue()} will be a Float instance and the type returned by this method will be float.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 the Class object for the Style interface that this property belongs to.
        Returns:
        the style interface that the property is declared in
      • isConflicted

        public boolean isConflicted()
        Returns true if the property has had different values during the life of this capture.
        Returns:
        true if 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:
        toString in class java.lang.Object
        Returns:
        a string that describes this property
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Returns true if the specified object is a Property with the same name and value. (If this returns true the type and style must match unless the contract for Style has been violated.)
        Overrides:
        equals in class java.lang.Object
        Parameters:
        obj - the object to compare this property with
        Returns:
        true if the object represents the same property and has an equal value