Class Property<T>


  • public class Property<T>
    extends java.lang.Object
    Represents a Property that can be used for configuration.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected boolean canEqual​(java.lang.Object other)  
      boolean equals​(java.lang.Object o)  
      T getDefaultValue()  
      java.lang.String getFullName​(java.lang.String componentCode)
      Returns full property name using the specified component code.
      java.lang.String getLegacyName()  
      java.lang.String getName()  
      int hashCode()  
      static <T> Property<T> named​(java.lang.String name)
      Creates a new instance of the Property class with no default value.
      static <T> Property<T> named​(java.lang.String name, T defaultValue)
      Creates a new instance of the Property class with the given default value.
      static <T> Property<T> named​(java.lang.String name, T defaultValue, java.lang.String legacyName)
      Creates a new instance of the Property class with the given default value.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

      • named

        public static <T> Property<T> named​(java.lang.String name)
        Creates a new instance of the Property class with no default value.
        Type Parameters:
        T - The type of the property values.
        Parameters:
        name - The name of the property.
        Returns:
        A new instance of the Property class with no default value.
      • named

        public static <T> Property<T> named​(java.lang.String name,
                                            T defaultValue)
        Creates a new instance of the Property class with the given default value.
        Type Parameters:
        T - The type of the property values.
        Parameters:
        name - The name of the property.
        defaultValue - The default value of the property.
        Returns:
        A new instance of the Property class with the given default value.
      • named

        public static <T> Property<T> named​(java.lang.String name,
                                            T defaultValue,
                                            java.lang.String legacyName)
        Creates a new instance of the Property class with the given default value.
        Type Parameters:
        T - The type of the property values.
        Parameters:
        name - The name of the property.
        defaultValue - The default value of the property.
        legacyName - The old name of the property, for backward compatibility.
        Returns:
        A new instance of the Property class with the given default value.
      • getFullName

        public java.lang.String getFullName​(java.lang.String componentCode)
        Returns full property name using the specified component code.
        Parameters:
        componentCode - the component prefix (`controller.`, `pravegaservice`, etc.)
        Returns:
        fully qualified property name
      • toString

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

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • canEqual

        protected boolean canEqual​(java.lang.Object other)
      • hashCode

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

        public java.lang.String getName()
      • getDefaultValue

        public T getDefaultValue()
      • getLegacyName

        public java.lang.String getLegacyName()