Class IntegerTypes

java.lang.Object
net.imglib2.type.numeric.integer.IntegerTypes

public class IntegerTypes extends Object
  • Field Details

  • Constructor Details

    • IntegerTypes

      private IntegerTypes()
  • Method Details

    • smallestType

      public static IntegerType<?> smallestType(boolean signed, long max)
      Get an IntegerType that can hold the given max value. The smallest byte-size type matching the constraints will be selected.
      Parameters:
      signed - - true if a signed IntegerType is required
      max - - the expected maximum value
      Returns:
      an IntegerType matching the given constraints
    • smallestType

      public static IntegerType<?> smallestType(long min, long max)
      Get an IntegerType that can hold the given min and max values. The smallest byte-size type matching the constraints will be selected, with a preference for unsigned types.
      Parameters:
      min - - the expected minimum value
      max - - the expected maximum value
      Returns:
      an IntegerType matching the given constraints