CharacterRunAutomaton

Automaton representation for matching char[].

Constructors

Link copied to clipboard
constructor(a: Automaton)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Returns nested resources of this class. The result should be a point-in-time snapshot (to avoid race conditions).

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val size: Int

Returns number of states in automaton.

Link copied to clipboard

Functions

Link copied to clipboard
open operator override fun equals(obj: Any?): Boolean
Link copied to clipboard

Gets character class of given codepoint

Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
fun isAccept(state: Int): Boolean

Returns acceptance status for given state.

Link copied to clipboard
open override fun ramBytesUsed(): Long

Return the memory usage of this object in bytes. Negative values are illegal.

Link copied to clipboard
fun run(s: String): Boolean

Returns true if the given string is accepted by this automaton.

fun run(s: CharArray, offset: Int, length: Int): Boolean

Returns true if the given char array is accepted by this automaton.

Link copied to clipboard
fun step(state: Int, c: Int): Int

Returns the state obtained by reading the given char from the given state. Returns -1 if not obtaining any such state. (If the original Automaton had no dead states, -1 is returned here if and only if a dead state is entered in an equivalent automaton with a total transition function.)

Link copied to clipboard
open override fun toString(): String

Returns a string representation of this automaton.