Class PseudoNthSpecifier

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int a
      The parsed a value.
      private java.lang.String argument
      The nth-* pseudo-class argument (i.e.
      private int b
      The parsed b value.
      private java.lang.String value
      The nth-* pseudo-class value (i.e.
    • Constructor Summary

      Constructors 
      Constructor Description
      PseudoNthSpecifier​(java.lang.String value, java.lang.String argument)
      Create a new nth-* pseudo-class instance with the specified value and argument.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getArgument()
      Get the nth-* pseudo-class argument.
      Specifier.Type getType()
      Get the specifier type.
      java.lang.String getValue()
      Get the nth-* pseudo-class value.
      boolean isMatch​(int count)
      Check if the node count matches this specifier.
      private void parseNth()
      Parse the nth-* pseudo-class argument.
      • Methods inherited from class java.lang.Object

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

      • value

        private final java.lang.String value
        The nth-* pseudo-class value (i.e. nth-child etc).
      • argument

        private final java.lang.String argument
        The nth-* pseudo-class argument (i.e. 2n+1 etc).
      • a

        private int a
        The parsed a value.
      • b

        private int b
        The parsed b value.
    • Constructor Detail

      • PseudoNthSpecifier

        public PseudoNthSpecifier​(java.lang.String value,
                                  java.lang.String argument)
        Create a new nth-* pseudo-class instance with the specified value and argument.
        Parameters:
        value - The nth-* pseudo-class value (i.e. nth-child etc).
        argument - The nth-* pseudo-class argument (i.e. odd etc).
    • Method Detail

      • getArgument

        public java.lang.String getArgument()
        Get the nth-* pseudo-class argument.
        Returns:
        The argument.
      • getValue

        public java.lang.String getValue()
        Get the nth-* pseudo-class value.
        Returns:
        The value.
      • isMatch

        public boolean isMatch​(int count)
        Check if the node count matches this specifier.
        Parameters:
        count - The node count.
        Returns:
        true or false.
      • parseNth

        private void parseNth()
        Parse the nth-* pseudo-class argument.