Options
All
  • Public
  • Public/Protected
  • All
Menu

State represents all information about a sequence necessary to generate the current output. Note that a state is immutable.

Hierarchy

  • State

Index

Constructors

Private constructor

  • new State(token: Token, mode: int, binaryBytes: int, bitCount: int): State

Properties

Private binaryShiftByteCount

binaryShiftByteCount: int

Private bitCount

bitCount: int

Private mode

mode: int

Private token

token: Token

Static INITIAL_STATE

INITIAL_STATE: State = new State(C.EMPTY_TOKEN,C.MODE_UPPER,0,0)

Methods

addBinaryShiftChar

  • addBinaryShiftChar(index: int): State

endBinaryShift

  • endBinaryShift(index: int): State

getBinaryShiftByteCount

  • getBinaryShiftByteCount(): int

getBitCount

  • getBitCount(): int

getMode

  • getMode(): int

getToken

isBetterThanOrEqualTo

  • isBetterThanOrEqualTo(other: State): boolean

latchAndAppend

  • latchAndAppend(mode: int, value: int): State

shiftAndAppend

  • shiftAndAppend(mode: int, value: int): State

toBitArray

  • toBitArray(text: Uint8Array): BitArray

toString

  • toString(): String

Static Private calculateBinaryShiftCost

  • calculateBinaryShiftCost(state: State): int

Generated using TypeDoc