Package org.apache.commons.codec.digest
Class Crc16.Builder
- java.lang.Object
-
- org.apache.commons.codec.digest.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>
BuildsCrc16instances.
-
-
Constructor Summary
Constructors Constructor Description Builder()Constructs a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Crc16get()Creates a newCrc16instance.Crc16.BuildersetInit(int init)Sets the initial value.Crc16.BuildersetTable(int[] table)Sets the lookup table.Crc16.BuildersetXorOut(int xorOut)Sets the XorOut value to XOR to the current checksum returned byCrc16.getValue().
-
-
-
Constructor Detail
-
Builder
public Builder()
Constructs a new instance.
-
-
Method Detail
-
get
public Crc16 get()
Creates a newCrc16instance.- Specified by:
getin interfacejava.util.function.Supplier<Crc16>
-
setInit
public Crc16.Builder setInit(int init)
Sets the initial value.- Parameters:
init- the initial value.- Returns:
thisinstance.
-
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:
thisinstance.
-
setXorOut
public Crc16.Builder setXorOut(int xorOut)
Sets the XorOut value to XOR to the current checksum returned byCrc16.getValue().- Parameters:
xorOut- the XorOut value.- Returns:
thisinstance.
-
-