Class Capture


  • public class Capture
    extends Object
    Represents the named capture of a Query. Captures are used to extract information from syntax trees when a query match occurs. Each instance can be uniquely identified by the query it belongs to, along with its ordinal position within the same query.
    Since:
    1.7.0
    Author:
    Ozren Dabić
    See Also:
    Pattern, Query
    • Method Detail

      • disable

        public void disable()
        Disable this capture, preventing it from returning in matches. This will eliminate any resource usage from the query associated with recording the capture.

        This can not be undone.

      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object