org.sonar.duplications.token
Class TokenQueue

java.lang.Object
  extended by org.sonar.duplications.token.TokenQueue
All Implemented Interfaces:
Iterable<Token>

public class TokenQueue
extends Object
implements Iterable<Token>


Constructor Summary
TokenQueue()
           
TokenQueue(List<Token> tokenList)
           
 
Method Summary
 void add(Token token)
           
 boolean isNextTokenValue(String expectedValue)
           
 Iterator<Token> iterator()
           
 Token peek()
          Retrieves, but does not remove, token from this queue.
 Token poll()
          Retrieves and removes token from this queue.
 void pushForward(List<Token> matchedTokenList)
           
 int size()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TokenQueue

public TokenQueue(List<Token> tokenList)

TokenQueue

public TokenQueue()
Method Detail

peek

public Token peek()
Retrieves, but does not remove, token from this queue.

Returns:
token from this queue, or null if this queue is empty.

poll

public Token poll()
Retrieves and removes token from this queue.

Returns:
token from this queue, or null if this queue is empty.

size

public int size()

add

public void add(Token token)

isNextTokenValue

public boolean isNextTokenValue(String expectedValue)

iterator

public Iterator<Token> iterator()
Specified by:
iterator in interface Iterable<Token>

pushForward

public void pushForward(List<Token> matchedTokenList)


Copyright © 2009-2012 SonarSource. All Rights Reserved.