@TestClass(value="org.openscience.cdk.io.cml.CMLStackTest") public class CMLStack extends Object
Constructor and Description |
---|
CMLStack() |
Modifier and Type | Method and Description |
---|---|
String |
current()
Returns the last added entry.
|
boolean |
endsWith(String lastElement)
Convenience method to check the last added elements.
|
boolean |
endsWith(String oneButLast,
String lastElement)
Convenience method to check the last two added elements.
|
boolean |
endsWith(String twoButLast,
String oneButLast,
String lastElement)
Convenience method to check the last three added elements.
|
int |
length() |
String |
pop()
Retrieves and deletes to last added entry.
|
void |
push(String item)
Adds an entry to the stack.
|
String |
toString()
Returns a String representation of the stack.
|
@TestMethod(value="testPush_String") public void push(String item)
public int length()
@TestMethod(value="testPop") public String pop()
current()
@TestMethod(value="testCurrent") public String current()
pop()
public String toString()
@TestMethod(value="testEndsWith_String") public boolean endsWith(String lastElement)
@TestMethod(value="testEndsWith_String_String") public boolean endsWith(String oneButLast, String lastElement)
@TestMethod(value="testEndsWith_String_String_String") public boolean endsWith(String twoButLast, String oneButLast, String lastElement)