Class PropertyDescriptorBuilder<E,​T extends PropertyDescriptorBuilder<E,​T>>

  • Type Parameters:
    E - Value type of the built descriptor
    T - Concrete type of this builder instance. Removes code duplication at the expense of a few unchecked casts. Everything goes well if this parameter's value is correctly set.
    Direct Known Subclasses:
    MultiValuePropertyBuilder, SingleValuePropertyBuilder

    public abstract class PropertyDescriptorBuilder<E,​T extends PropertyDescriptorBuilder<E,​T>>
    extends java.lang.Object
    Base class for property builders.
    Since:
    6.0.0
    Author:
    Clément Fournier
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.String description  
      protected boolean isDefinedInXML  
      protected java.lang.String name  
      protected float uiOrder  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected PropertyDescriptorBuilder​(java.lang.String name)  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract PropertyDescriptor<E> build()
      Builds the descriptor and returns it.
      T desc​(java.lang.String desc)
      Specify the description of the property.
      java.lang.String getName()
      Returns the name of the property to be built.
      T uiOrder​(float f)
      Specify the UI order of the property.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • name

        protected java.lang.String name
      • description

        protected java.lang.String description
      • uiOrder

        protected float uiOrder
      • isDefinedInXML

        protected boolean isDefinedInXML
    • Constructor Detail

      • PropertyDescriptorBuilder

        protected PropertyDescriptorBuilder​(java.lang.String name)
    • Method Detail

      • desc

        public T desc​(java.lang.String desc)
        Specify the description of the property.
        Parameters:
        desc - The description
        Returns:
        The same builder
      • uiOrder

        public T uiOrder​(float f)
        Specify the UI order of the property.
        Parameters:
        f - The UI order
        Returns:
        The same builder
      • build

        public abstract PropertyDescriptor<E> build()
        Builds the descriptor and returns it.
        Returns:
        The built descriptor
        Throws:
        java.lang.IllegalArgumentException - if parameters are incorrect
      • getName

        public java.lang.String getName()
        Returns the name of the property to be built.