Package icyllis.modernui.util

# Class Property<T,V>

java.lang.Object
icyllis.modernui.util.Property<T,V>

Type Parameters:
  `T` - the class on which the property is declared.
  `V` - the type that this property represents.

Direct Known Subclasses:
  `FloatProperty`, `IntProperty`

public abstract class Property<T,V> extends Object
A property is an abstraction that can be used to represent a mutable value that is held in a host object. The Property's `set(Object, Object)` or `get(Object)` methods can be implemented in terms of the private fields of the host object, or via "setter" and "getter" methods or by some other mechanism, as appropriate.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Property(Class<V> type, String name)`
  A constructor that takes an identifying name and `type` for the property.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `abstract V`
  `get(T object)`
  Returns the current value that this property represents on the given `object`.
  `String`
  `getName()`
  Returns the name for this property.
  `Class<V>`
  `getType()`
  Returns the type for this property.
  `abstract void`
  `set(T object, V value)`
  Sets the value on `object` which this property represents.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### Property

    public Property(Class<V> type, String name)
    A constructor that takes an identifying name and `type` for the property.

- ## Method Details

  - ### set

    public abstract void set(T object, V value)
    Sets the value on `object` which this property represents. If the method is unable to set the value on the target object it will throw an `UnsupportedOperationException` exception.

  - ### get

    public abstract V get(T object)
    Returns the current value that this property represents on the given `object`.

  - ### getName

    public String getName()
    Returns the name for this property.

  - ### getType

    public Class<V> getType()
    Returns the type for this property.