Class Selector.ShapeMatch

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.String,​java.util.Set<Shape>>
    Enclosing interface:
    Selector

    public static final class Selector.ShapeMatch
    extends java.util.HashMap<java.lang.String,​java.util.Set<Shape>>
    Represents a selector match found in the model.

    The getShape method is used to get the shape that matched, and all of the contextual variables that were set when the match occurred can be accessed using typical Map methods like get, contains, etc.

    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.util.AbstractMap

        java.util.AbstractMap.SimpleEntry<K extends java.lang.Object,​V extends java.lang.Object>, java.util.AbstractMap.SimpleImmutableEntry<K extends java.lang.Object,​V extends java.lang.Object>
      • Nested classes/interfaces inherited from interface java.util.Map

        java.util.Map.Entry<K extends java.lang.Object,​V extends java.lang.Object>
    • Constructor Summary

      Constructors 
      Constructor Description
      ShapeMatch​(Shape shape, java.util.Map<java.lang.String,​java.util.Set<Shape>> variables)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Shape getShape()
      Gets the matching shape.
      • Methods inherited from class java.util.HashMap

        clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
      • Methods inherited from class java.util.AbstractMap

        equals, hashCode, toString
      • Methods inherited from class java.lang.Object

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

        equals, hashCode
    • Constructor Detail

      • ShapeMatch

        public ShapeMatch​(Shape shape,
                          java.util.Map<java.lang.String,​java.util.Set<Shape>> variables)
        Parameters:
        shape - Shape that matched.
        variables - Variables that matched. This map is copied into ShapeMatch.
    • Method Detail

      • getShape

        public Shape getShape()
        Gets the matching shape.
        Returns:
        Returns the matching shape.