org.apache.lucene.util.automaton

## Class CharacterRunAutomaton

- java.lang.Object
- - org.apache.lucene.util.automaton.RunAutomaton
  - - org.apache.lucene.util.automaton.CharacterRunAutomaton

-     public class CharacterRunAutomaton
      extends RunAutomaton

  Automaton representation for matching char[].

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CharacterRunAutomaton(Automaton a)` Construct with a default number of maxDeterminizedStates.
    `CharacterRunAutomaton(Automaton a, int maxDeterminizedStates)` Construct specifying maxDeterminizedStates.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `run(char[] s, int offset, int length)` Returns true if the given string is accepted by this automaton
    `boolean` | `run(String s)` Returns true if the given string is accepted by this automaton.

    - ### Methods inherited from class org.apache.lucene.util.automaton.RunAutomaton

      `equals, getCharIntervals, getSize, hashCode, isAccept, step, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### CharacterRunAutomaton

          public CharacterRunAutomaton(Automaton a)

      Construct with a default number of maxDeterminizedStates.

    - #### CharacterRunAutomaton

          public CharacterRunAutomaton(Automaton a,
                                       int maxDeterminizedStates)

      Construct specifying maxDeterminizedStates.
      Parameters:
        `a` - Automaton to match
        `maxDeterminizedStates` - maximum number of states that the automataon can have once determinized. If more states are required to determinize it then a TooComplexToDeterminizeException is thrown.

  - ### Method Detail

    - #### run

          public boolean run(String s)

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

    - #### run

          public boolean run(char[] s,
                             int offset,
                             int length)

      Returns true if the given string is accepted by this automaton

Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.