Class BasicProperty<T>

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      java.lang.Class<? extends T> getClazz()  
      T getDefaultValue()
      The default value for new instances of this property, or null if not applicable.
      java.lang.String getName()
      Final because if this was overridden then the hashcode calculated in the ctor would be wrong
      java.lang.Class<? extends T> getType()
      The data type for this property.
      int hashCode()
      We override hashCode and equals in a special way to only look at a name.
      static BasicProperty<java.lang.Object> of​(java.lang.String name)
      Returns a new basic property with the given name, object type, and null value.
      void setClazz​(java.lang.Class<?> clazz)  
      BasicProperty<T> setClazz_​(java.lang.Class<?> clazz)
      Chaining version
      void setDefaultValue​(java.lang.Object defaultValue)  
      BasicProperty<T> setDefaultValue_​(java.lang.Object defaultValue)
      Chaining version
      void setName​(java.lang.String name)  
      BasicProperty<T> setName_​(java.lang.String name)
      Chaining version
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • BasicProperty

        public BasicProperty()
        Bean compatibility...
      • BasicProperty

        public BasicProperty​(java.lang.String name,
                             java.lang.Class<? extends T> cls)
      • BasicProperty

        public BasicProperty​(java.lang.String name,
                             java.lang.Class<? extends T> cls,
                             T defaultValue)
      • BasicProperty

        public BasicProperty​(Property<T> copy)
    • Method Detail

      • of

        public static BasicProperty<java.lang.Object> of​(java.lang.String name)
        Returns a new basic property with the given name, object type, and null value. Mainly used for looking up other defined properties.
      • getDefaultValue

        public T getDefaultValue()
        Description copied from interface: Property
        The default value for new instances of this property, or null if not applicable.
        Specified by:
        getDefaultValue in interface Property<T>
      • getName

        public final java.lang.String getName()
        Final because if this was overridden then the hashcode calculated in the ctor would be wrong
        Specified by:
        getName in interface Property<T>
      • getType

        public java.lang.Class<? extends T> getType()
        Description copied from interface: Property
        The data type for this property.
        Specified by:
        getType in interface Property<T>
      • hashCode

        public int hashCode()
        We override hashCode and equals in a special way to only look at a name. So, different implementations of a particular property will be considered equivilent.
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getClazz

        public java.lang.Class<? extends T> getClazz()
      • setClazz

        public void setClazz​(java.lang.Class<?> clazz)
      • setName

        public void setName​(java.lang.String name)
      • setDefaultValue

        public void setDefaultValue​(java.lang.Object defaultValue)
      • setClazz_

        public BasicProperty<T> setClazz_​(java.lang.Class<?> clazz)
        Chaining version
      • setName_

        public BasicProperty<T> setName_​(java.lang.String name)
        Chaining version
      • setDefaultValue_

        public BasicProperty<T> setDefaultValue_​(java.lang.Object defaultValue)
        Chaining version