Package org.apache.lucene.util.automaton

## Class CharacterRunAutomaton

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

- All Implemented Interfaces:
    `Accountable`

      public class CharacterRunAutomaton
      extends RunAutomaton

  Automaton representation for matching char[].

- - ### Field Summary

    - ### Fields inherited from interface org.apache.lucene.util.Accountable

      `NULL_ACCOUNTABLE`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `CharacterRunAutomaton​(Automaton a)` | Construct with a default number of determinizeWorkLimit.
    `CharacterRunAutomaton​(Automaton a, int determinizeWorkLimit)` | Constructor specifying determinizeWorkLimit.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | 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, ramBytesUsed, step, toString`

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

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

    - ### Methods inherited from interface org.apache.lucene.util.Accountable

      `getChildResources`

- - ### Constructor Detail

    - #### CharacterRunAutomaton

          public CharacterRunAutomaton​(Automaton a)

      Construct with a default number of determinizeWorkLimit.

    - #### CharacterRunAutomaton

          public CharacterRunAutomaton​(Automaton a,
                                       int determinizeWorkLimit)

      Constructor specifying determinizeWorkLimit.
      Parameters:
        `a` - Automaton to match
        `determinizeWorkLimit` - maximum effort to spend determinizing the automataon. If more effort is required then a TooComplexToDeterminizeException is thrown. Use `Operations.DEFAULT_DETERMINIZE_WORK_LIMIT` as a decent default if you don't otherwise know what to specify.

  - ### 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