Package ch.tocco.nice2.toolbox.api.lang
Class ListSupport
java.lang.Object
ch.tocco.nice2.toolbox.api.lang.ListSupport
Deprecated.
Utility for knowing if you're in the first round of a loop.
Alternative for using a stupid boolean.
Example usage with a list's toString method:
ListSupport listSupport = new ListSupport();
for ( String chunk : myList ) {
if (listSupport.separate()) bufer.append(",");
buffer.append( chunk );
}
-
Constructor Details
-
ListSupport
public ListSupport()Deprecated.
-
-
Method Details
-
separate
public boolean separate()Deprecated.Tells if the first loop was done, and sets it to done if it wasn't yet.- Returns:
- true if the first round was done before, changes state.
-
checkFirst
public boolean checkFirst()Deprecated.Just asks if the first loop was done, does not change state.- Returns:
- true if the first round was done before, keeps state.
-
reset
public void reset()Deprecated.Obvious.
-