Class FilterHelpers


  • public class FilterHelpers
    extends Object
    • Constructor Detail

      • FilterHelpers

        public FilterHelpers()
    • Method Detail

      • nextLarger

        public static DataType nextLarger​(DataType dataType)
        Returns the smallest numeric data type that:
        1. can hold a larger integer than dataType can
        2. if integral, has the same signedness as dataType

        Argument Result
        BYTE SHORT
        UBYTE USHORT
        SHORT INT
        USHORT UINT
        INT LONG
        UINT ULONG
        LONG DOUBLE
        ULONG DOUBLE
        Any other data type Just return argument

        The returned type is intended to be just big enough to hold the result of performing an unsigned conversion of a value of the smaller type. For example, the byte value -106 equals 150 when interpreted as unsigned. That won't fit in a (signed) byte, but it will fit in a short.

        Parameters:
        dataType - an integral data type.
        Returns:
        the next larger type.
      • rank

        public static int rank​(DataType dataType)