Class RegexSet

  • All Implemented Interfaces:
    java.lang.Iterable<java.lang.String>, java.util.Collection<java.lang.String>, java.util.function.Predicate<java.lang.String>, java.util.Set<java.lang.String>

    public class RegexSet
    extends java.util.AbstractSet<java.lang.String>
    implements java.util.function.Predicate<java.lang.String>
    A Set of Regular expressions strings.

    Provides the efficient matches(String) method to check for a match against all the combined Regex's

    • Constructor Summary

      Constructor Description
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean add​(java.lang.String pattern)  
      void clear()  
      boolean isEmpty()  
      java.util.Iterator<java.lang.String> iterator()  
      boolean matches​(java.lang.String s)  
      boolean remove​(java.lang.Object pattern)  
      int size()  
      boolean test​(java.lang.String s)  
      • Methods inherited from class java.util.AbstractSet

        equals, hashCode, removeAll
      • Methods inherited from class java.util.AbstractCollection

        addAll, contains, containsAll, retainAll, toArray, toArray, toString
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Collection

        parallelStream, removeIf, stream, toArray
      • Methods inherited from interface java.lang.Iterable

      • Methods inherited from interface java.util.function.Predicate

        and, negate, or
      • Methods inherited from interface java.util.Set

        addAll, contains, containsAll, retainAll, spliterator, toArray, toArray
    • Constructor Detail

      • RegexSet

        public RegexSet()
    • Method Detail

      • iterator

        public java.util.Iterator<java.lang.String> iterator()
        Specified by:
        iterator in interface java.util.Collection<java.lang.String>
        Specified by:
        iterator in interface java.lang.Iterable<java.lang.String>
        Specified by:
        iterator in interface java.util.Set<java.lang.String>
        Specified by:
        iterator in class java.util.AbstractCollection<java.lang.String>
      • size

        public int size()
        Specified by:
        size in interface java.util.Collection<java.lang.String>
        Specified by:
        size in interface java.util.Set<java.lang.String>
        Specified by:
        size in class java.util.AbstractCollection<java.lang.String>
      • add

        public boolean add​(java.lang.String pattern)
        Specified by:
        add in interface java.util.Collection<java.lang.String>
        Specified by:
        add in interface java.util.Set<java.lang.String>
        add in class java.util.AbstractCollection<java.lang.String>
      • remove

        public boolean remove​(java.lang.Object pattern)
        Specified by:
        remove in interface java.util.Collection<java.lang.String>
        Specified by:
        remove in interface java.util.Set<java.lang.String>
        remove in class java.util.AbstractCollection<java.lang.String>
      • isEmpty

        public boolean isEmpty()
        Specified by:
        isEmpty in interface java.util.Collection<java.lang.String>
        Specified by:
        isEmpty in interface java.util.Set<java.lang.String>
        isEmpty in class java.util.AbstractCollection<java.lang.String>
      • clear

        public void clear()
        Specified by:
        clear in interface java.util.Collection<java.lang.String>
        Specified by:
        clear in interface java.util.Set<java.lang.String>
        clear in class java.util.AbstractCollection<java.lang.String>
      • test

        public boolean test​(java.lang.String s)
        Specified by:
        test in interface java.util.function.Predicate<java.lang.String>
      • matches

        public boolean matches​(java.lang.String s)