java.lang.Object
org.elasticsearch.xpack.core.security.support.Automatons

public final class Automatons extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final org.apache.lucene.util.automaton.Automaton
     
    static final org.apache.lucene.util.automaton.Automaton
     
    static final boolean
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    addSettings(List<Setting<?>> settingsList)
     
    static org.apache.lucene.util.automaton.Automaton
    intersectAndMinimize(org.apache.lucene.util.automaton.Automaton a1, org.apache.lucene.util.automaton.Automaton a2)
     
    static boolean
    Is the str a lucene type of pattern
    static org.apache.lucene.util.automaton.Automaton
    minusAndMinimize(org.apache.lucene.util.automaton.Automaton a1, org.apache.lucene.util.automaton.Automaton a2)
     
    static org.apache.lucene.util.automaton.Automaton
    patterns(String... patterns)
    Builds and returns an automaton that will represent the union of all the given patterns.
    static org.apache.lucene.util.automaton.Automaton
    Builds and returns an automaton that will represent the union of all the given patterns.
    predicate(String... patterns)
     
     
    predicate(org.apache.lucene.util.automaton.Automaton automaton)
     
    static boolean
    subsetOf(org.apache.lucene.util.automaton.Automaton a1, org.apache.lucene.util.automaton.Automaton a2)
    Returns true if the language of a1 is a subset of the language of a2.
    static org.apache.lucene.util.automaton.Automaton
    unionAndMinimize(Collection<org.apache.lucene.util.automaton.Automaton> automata)
     
    static void
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • EMPTY

      public static final org.apache.lucene.util.automaton.Automaton EMPTY
    • MATCH_ALL

      public static final org.apache.lucene.util.automaton.Automaton MATCH_ALL
    • recordPatterns

      public static final boolean recordPatterns
  • Method Details

    • patterns

      public static org.apache.lucene.util.automaton.Automaton patterns(String... patterns)
      Builds and returns an automaton that will represent the union of all the given patterns.
    • patterns

      public static org.apache.lucene.util.automaton.Automaton patterns(Collection<String> patterns)
      Builds and returns an automaton that will represent the union of all the given patterns.
    • isLuceneRegex

      public static boolean isLuceneRegex(String str)
      Is the str a lucene type of pattern
    • unionAndMinimize

      public static org.apache.lucene.util.automaton.Automaton unionAndMinimize(Collection<org.apache.lucene.util.automaton.Automaton> automata)
    • minusAndMinimize

      public static org.apache.lucene.util.automaton.Automaton minusAndMinimize(org.apache.lucene.util.automaton.Automaton a1, org.apache.lucene.util.automaton.Automaton a2)
    • intersectAndMinimize

      public static org.apache.lucene.util.automaton.Automaton intersectAndMinimize(org.apache.lucene.util.automaton.Automaton a1, org.apache.lucene.util.automaton.Automaton a2)
    • predicate

      public static Predicate<String> predicate(String... patterns)
    • predicate

      public static Predicate<String> predicate(Collection<String> patterns)
    • predicate

      public static Predicate<String> predicate(org.apache.lucene.util.automaton.Automaton automaton)
    • updateConfiguration

      public static void updateConfiguration(Settings settings)
    • addSettings

      public static void addSettings(List<Setting<?>> settingsList)
    • subsetOf

      public static boolean subsetOf(org.apache.lucene.util.automaton.Automaton a1, org.apache.lucene.util.automaton.Automaton a2)
      Returns true if the language of a1 is a subset of the language of a2. Both automata must be determinized and must have no dead states.

      Complexity: quadratic in number of states. Copied of Lucene's AutomatonTestUtil