Class Mask


  • public class Mask
    extends TreeNode
    Mask node - a sequence of bits used to filter another sequence during binary pattern matching.
    • Constructor Detail

      • Mask

        public Mask​(BitSequence bits)
        Constructs the mask.
        Parameters:
        bits - the bit sequence
    • Method Detail

      • getBits

        public BitSequence getBits()
        Returns the bit sequence.
        Returns:
        the bit sequence
      • getStart

        public java.lang.Integer getStart()
        Returns the starting offset relative to the variant start. The result is null if it is not yet determined.
        Returns:
        the starting offset, in bits
      • setStart

        public void setStart​(int start)
        Sets the starting offset relative to the variant start.
        Parameters:
        start - the starting offset, in bits
      • and

        public Mask and​(Mask other)
        Returns a mask ANDed with an another mask.
        Parameters:
        other - the second mask
        Returns:
        the resulting mask
      • toString

        public java.lang.String toString()
        Returns the mask as a string in binary notation.
        Overrides:
        toString in class java.lang.Object
        Returns:
        the string
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object