Package ac.boar.anticheat.util.geyser
Record Class Pow2BitArray
java.lang.Object
java.lang.Record
ac.boar.anticheat.util.geyser.Pow2BitArray
- Record Components:
version- Palette version informationsize- Number of entries in this palette (not the length of the words array that internally backs this palette)words- Array used to store data
- All Implemented Interfaces:
BitArray
public record Pow2BitArray(BitArrayVersion version, int size, int[] words)
extends Record
implements BitArray
-
Constructor Summary
ConstructorsConstructorDescriptionPow2BitArray(BitArrayVersion version, int size, int[] words) Creates an instance of aPow2BitArrayrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncopy()final booleanIndicates whether some other object is "equal to" this one.intget(int index) Gets the entry at the given indexfinal inthashCode()Returns a hash code value for this object.voidset(int index, int value) Sets the entry at the given location to the given valueintsize()Gets the long array that is used to store the data in this BitArray.final StringtoString()Returns a string representation of this record class.version()Returns the value of theversionrecord component.int[]words()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface ac.boar.anticheat.util.geyser.BitArray
writeSizeToNetwork
-
Constructor Details
-
Method Details
-
set
public void set(int index, int value) Sets the entry at the given location to the given value -
get
public int get(int index) Gets the entry at the given index -
size
public int size()Gets the long array that is used to store the data in this BitArray. This is useful for sending packet data. -
words
public int[] words() -
copy
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
version
Returns the value of theversionrecord component.
-