Class Property<T>

java.lang.Object
VASSAL.property.Property<T>
Type Parameters:
T - the class of the value of this Property

public final class Property<T> extends Object
Represents a named property with a specified type. A Property may optionally specify a default value, to be used when no other value is available.
Since:
3.2.0
Author:
Joel Uckelman
  • Field Details

    • name

      public final String name
      The name of this property.
    • type

      public final Class<T> type
      The class of the value of this property.
    • def

      public final T def
      The default value of this property.
  • Constructor Details

    • Property

      public Property(String name, Class<T> type)
      Creates a Property with null as its default value.
      Parameters:
      name - the name of the property
      type - the class of the value of the property
      Throws:
      IllegalArgumentException - if name or type is null
    • Property

      public Property(String name, Class<T> type, T def)
      Creates a Property.
      Parameters:
      name - the name of the property
      type - the class of the value of the property
      def - the default value of the property
      Throws:
      IllegalArgumentException - if name or type is {code{ null}
  • Method Details