Package org.openscience.cdk.io.cml
Class CMLModuleStack
java.lang.Object
org.openscience.cdk.io.cml.CMLModuleStack
Low weight alternative to Sun's Stack class.
- Source code:
- main
- Belongs to CDK module:
- io
- Keywords:
- stack
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncurrent()
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()
pop()
Retrieves and deletes to last added entry.void
push
(ICMLModule item) Adds an entry to the stack.toString()
Returns a String representation of the stack.
-
Constructor Details
-
CMLModuleStack
public CMLModuleStack()
-
-
Method Details
-
push
Adds an entry to the stack. -
length
public int length() -
pop
Retrieves and deletes to last added entry.- See Also:
-
current
Returns the last added entry.- See Also:
-
toString
Returns a String representation of the stack. -
endsWith
Convenience method to check the last added elements. -
endsWith
Convenience method to check the last two added elements. -
endsWith
Convenience method to check the last three added elements.
-