Interface BaseConverterBuilder

    • Method Detail

      • getNumberBaseValue

        String getNumberBaseValue​()
        Retrieves the number base value from the number base value property.
        Returns:
        The number base value stored by the number base value property.
      • toNumberBaseValue

        String toNumberBaseValue​(byte[] aNumberData)
        Retrieves the number base value calculated from the number. This method is to be side effect free in terms of the number (and the encoded result) is not part of the state for this instance (from the point of view of this method). For avoiding thread race conditions / side effects regarding the decoded data (and the encoded result), use this method instead of the combination of withNumberData(byte[]) with getNumberBaseValue()
        Parameters:
        aNumberData - The number to be encoded.
        Returns:
        The number base value calculated from the number.
      • toNumberBaseValue

        String toNumberBaseValue​(long aNumber)
        Retrieves the number base value calculated from the number. This method is to be side effect free in terms of the number (and the encoded result) is not part of the state for this instance (from the point of view of this method). For avoiding thread race conditions / side effects regarding the decoded data (and the encoded result), use this method instead of the combination of withNumberData(byte[]) with getNumberBaseValue()
        Parameters:
        aNumber - The number to be encoded.
        Returns:
        The number base value calculated from the number.
      • setNumberBaseValue

        void setNumberBaseValue​(String aNumberBaseValue)
        Sets the number base value for the number base value property.
        Parameters:
        aNumberBaseValue - The number base value to be stored by the number base value property.
      • withNumberBaseValue

        default BaseConverterBuilder withNumberBaseValue​(String aNumberBaseValue)
        Sets the number base value for the number base value property.
        Parameters:
        aNumberBaseValue - The number base value to be stored by the number base value property.
        Returns:
        The builder for applying multiple build operations.
      • getNumber

        long getNumber​()
        Retrieves the number from the number property.
        Returns:
        The number stored by the number property.
      • getNumberData

        byte[] getNumberData​()
        Retrieves the number from the number property.
        Returns:
        The number stored by the number property.
      • toNumber

        long toNumber​(String aNumberBaseValue)
               throws IllegalArgumentException
        Retrieves the number calculated from the provided number base value. This method is to be side effect free in terms of the number base value (and the decoded result) is not part of the state for this instance (from the point of view of this method). For avoiding thread race conditions / side effects regarding the encoded text (and the decoded result), use this method instead of the combination of withNumberBaseValue(String) with getNumberData().
        Parameters:
        aNumberBaseValue - The number base value to be decoded.
        Returns:
        The number decoded from the number base value.
        Throws:
        IllegalArgumentException - the illegal argument exception
      • toNumberData

        byte[] toNumberData​(String aNumberBaseValue)
                     throws NumberFormatException
        Retrieves the number calculated from the provided number base value. This method is to be side effect free in terms of the number base value (and the decoded result) is not part of the state for this instance (from the point of view of this method). For avoiding thread race conditions / side effects regarding the encoded text (and the decoded result), use this method instead of the combination of withNumberBaseValue(String) with getNumberData().
        Parameters:
        aNumberBaseValue - The number base value to be decoded.
        Returns:
        The number decoded from the number base value.
        Throws:
        NumberFormatException - the number format exception
      • setNumberData

        void setNumberData​(byte[] aNumberData)
        Sets the number for the number property.
        Parameters:
        aNumberData - The number to be stored by the number property.
      • setNumber

        void setNumber​(long aNumber)
        Sets the number for the number property.
        Parameters:
        aNumber - The number to be stored by the number property.
      • withNumberData

        default BaseConverterBuilder withNumberData​(byte[] aNumberData)
        Sets the number for the number property.
        Parameters:
        aNumberData - The number to be stored by the number property.
        Returns:
        The builder for applying multiple build operations.
      • withNumber

        default BaseConverterBuilder withNumber​(long aNumber)
        Sets the number for the number property.
        Parameters:
        aNumber - The number to be stored by the number property.
        Returns:
        The builder for applying multiple build operations.
      • build

        static BaseConverterBuilder build​()
        This is a convenience method for easily instantiating the according builder.
        Returns:
        an instance (using a default implementation) of this builder