edu.cmu.cs.crystal.flow
Class IteratorLabel

java.lang.Object
  extended by edu.cmu.cs.crystal.flow.IteratorLabel
All Implemented Interfaces:
ILabel

public class IteratorLabel
extends Object
implements ILabel

A label for control flow where the branching flow is due to an iterator, for example, in an enhanced for loop. There are two kinds of Iterator labels; an "empty" label and a "has item" label.

Since:
Crystal 3.4.0
Author:
ciera

Method Summary
static IteratorLabel getItrLabel(boolean isEmpty)
           
 String getLabel()
           
 boolean isEmptyLabel()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getItrLabel

public static IteratorLabel getItrLabel(boolean isEmpty)
Parameters:
isEmpty - true if the iterator is empty, false if it has more items
Returns:
an IteratorLabel which represents the appropriate state

getLabel

public String getLabel()
Specified by:
getLabel in interface ILabel

isEmptyLabel

public boolean isEmptyLabel()
Returns:
true if this is the empty label, and false if it is the hasItem label.

toString

public String toString()
Overrides:
toString in class Object