Class CssTokenList.CssTokenIterator

java.lang.Object
org.idpf.epubcheck.util.css.CssTokenList.CssTokenIterator
Enclosing class:
CssTokenList

class CssTokenList.CssTokenIterator extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final com.google.common.base.Predicate<CssToken>
     
    (package private) CssToken
     
    (package private) int
     
    (package private) final List<CssToken>
     
    (package private) int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    CssTokenIterator(com.google.common.base.Predicate<CssToken> filter, List<CssToken> list)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    (package private) com.google.common.base.Predicate<CssToken>
    Get the filter that is currently being used for invocations of next() and hasNext()
    (package private) boolean
    Using the constructor filter.
    (package private) boolean
    hasNext(com.google.common.base.Predicate<CssToken> filter)
    Using the supplied filter.
    (package private) int
    Get the list index of the last element returned prior to filtering, or -1 if no element has yet been returned.
    (package private) CssToken
    Get the next token in the token list.
    (package private) CssToken
    next(com.google.common.base.Predicate<CssToken> filter)
    Get the next token in the token list that matches the given filter, or NoSuchElementException if no more tokens exist.
    Get the next token without advancing the iterators position.
    peek(com.google.common.base.Predicate<CssToken> filter)
    Get the next token without advancing the iterators position.

    Methods inherited from class Object

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

    • filter

      private final com.google.common.base.Predicate<CssToken> filter
    • list

      final List<CssToken> list
    • next

      int next
    • lastRet

      int lastRet
    • last

      CssToken last
  • Constructor Details

    • CssTokenIterator

      CssTokenIterator(com.google.common.base.Predicate<CssToken> filter, List<CssToken> list)
      Constructor.
      Parameters:
      filter - A filter Predicate that is applied to all tokens unless another Predicate is passed using #next(Predicate)
  • Method Details

    • next

      CssToken next()
      Get the next token in the token list. This method uses the constructor filter.
    • next

      CssToken next(com.google.common.base.Predicate<CssToken> filter)
      Get the next token in the token list that matches the given filter, or NoSuchElementException if no more tokens exist.
    • hasNext

      boolean hasNext()
      Using the constructor filter.
    • hasNext

      boolean hasNext(com.google.common.base.Predicate<CssToken> filter)
      Using the supplied filter.
    • peek

      public CssToken peek()
      Get the next token without advancing the iterators position.
    • peek

      public CssToken peek(com.google.common.base.Predicate<CssToken> filter)
      Get the next token without advancing the iterators position.
    • index

      int index()
      Get the list index of the last element returned prior to filtering, or -1 if no element has yet been returned.
    • filter

      com.google.common.base.Predicate<CssToken> filter()
      Get the filter that is currently being used for invocations of next() and hasNext()