Class AbstractParameter

    • Constructor Detail

      • AbstractParameter

        protected AbstractParameter​(GeneralParameterDescriptor descriptor)
        Constructs a parameter value from the specified descriptor.
        Parameters:
        descriptor - The abstract definition of this parameter or group of parameters.
    • Method Detail

      • clone

        public AbstractParameter clone()
        Returns a copy of this parameter value or group.
        Specified by:
        clone in interface Cloneable
        Specified by:
        clone in interface GeneralParameterValue
        Overrides:
        clone in class Object
        Returns:
        A copy of this parameter value or group.
        See Also:
        Object.clone()
      • equals

        public boolean equals​(Object object)
        Compares the specified object with this parameter for equality.
        Overrides:
        equals in class Object
        Parameters:
        object - The object to compare to this.
        Returns:
        true if both objects are equal.
      • hashCode

        public int hashCode()
        Returns a hash value for this parameter. This value doesn't need to be the same in past or future versions of this class.
        Overrides:
        hashCode in class Object
      • write

        protected void write​(TableWriter table)
                      throws IOException
        Write the content of this parameter to the specified table. This method make it easier to align values properly than overriding the toString() method. The table's columns are defined as below:
        1. The parameter name
        2. The separator
        3. The parameter value

        The default implementation is suitable for most cases. However, subclasses are free to override this method with the following idiom:

         table.write("parameter name");
         table.nextColumn()
         table.write('=');
         table.nextColumn()
         table.write("parameter value");
         table.nextLine()
         
        Parameters:
        table - The table where to format the parameter value.
        Throws:
        IOException - if an error occurs during output operation.