Module ieee754java

Interface BinaryFactory<T extends Binary<T>>


public interface BinaryFactory<T extends Binary<T>>
This class is used to create new Binary objects
Author:
Thomas Kasper
  • Method Details

    • createUnchecked

      @Deprecated T createUnchecked(int signum, BigDecimal value)
      Deprecated.
      internal use only
      Creates a new Binary
      Parameters:
      signum - the signum (either -1, 0, or 1)
      value - the value
      Returns:
      the new Binary
    • create

      T create(int signum, BinaryType type)
      Creates a new Binary
      Parameters:
      signum - the signum (either -1, 0, or 1)
      type - the type
      Returns:
      the new Binary
    • create

      T create(int signum, BigDecimal value)
      Creates a new Binary.

      The primary use of this function is for creating signed zeros. In all other cases, create(BigDecimal) should be preferred.

      Parameters:
      signum - the signum (either -1, 0, or 1)
      value - the value
      Returns:
      the new Binary
    • create

      default T create(BigDecimal value)
      Creates a new Binary
      Parameters:
      value - the value
      Returns:
      the new Binary
    • create

      default T create(Number value)
      Creates a new Binary.
      Parameters:
      value - the value
      Returns:
      the new Binary