Package org.openscience.cdk.io.cml
Class CMLModuleStack
- java.lang.Object
-
- org.openscience.cdk.io.cml.CMLModuleStack
-
-
Constructor Summary
Constructors Constructor Description CMLModuleStack()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ICMLModule
current()
Returns the last added entry.boolean
endsWith(ICMLModule lastElement)
Convenience method to check the last added elements.boolean
endsWith(ICMLModule oneButLast, ICMLModule lastElement)
Convenience method to check the last two added elements.boolean
endsWith(ICMLModule twoButLast, ICMLModule oneButLast, ICMLModule lastElement)
Convenience method to check the last three added elements.int
length()
ICMLModule
pop()
Retrieves and deletes to last added entry.void
push(ICMLModule item)
Adds an entry to the stack.String
toString()
Returns a String representation of the stack.
-
-
-
Method Detail
-
push
public void push(ICMLModule item)
Adds an entry to the stack.
-
length
public int length()
-
pop
public ICMLModule pop()
Retrieves and deletes to last added entry.- See Also:
current()
-
current
public ICMLModule current()
Returns the last added entry.- See Also:
pop()
-
toString
public String toString()
Returns a String representation of the stack.
-
endsWith
public boolean endsWith(ICMLModule lastElement)
Convenience method to check the last added elements.
-
endsWith
public boolean endsWith(ICMLModule oneButLast, ICMLModule lastElement)
Convenience method to check the last two added elements.
-
endsWith
public boolean endsWith(ICMLModule twoButLast, ICMLModule oneButLast, ICMLModule lastElement)
Convenience method to check the last three added elements.
-
-