Class Crc16.Builder

  • All Implemented Interfaces:
    java.util.function.Supplier<Crc16>
    Enclosing class:
    Crc16

    public static final class Crc16.Builder
    extends java.lang.Object
    implements java.util.function.Supplier<Crc16>
    Builds Crc16 instances.
    • Constructor Detail

      • Builder

        public Builder()
        Constructs a new instance.
    • Method Detail

      • get

        public Crc16 get()
        Creates a new Crc16 instance.
        Specified by:
        get in interface java.util.function.Supplier<Crc16>
      • setInit

        public Crc16.Builder setInit​(int init)
        Sets the initial value.
        Parameters:
        init - the initial value.
        Returns:
        this instance.
      • setTable

        public Crc16.Builder setTable​(int[] table)
        Sets the lookup table.
        Parameters:
        table - the lookup table, making a clone of the input array, must not be null.
        Returns:
        this instance.
      • setXorOut

        public Crc16.Builder setXorOut​(int xorOut)
        Sets the XorOut value to XOR to the current checksum returned by Crc16.getValue().
        Parameters:
        xorOut - the XorOut value.
        Returns:
        this instance.