Class CMLModuleStack

java.lang.Object
org.openscience.cdk.io.cml.CMLModuleStack

public class CMLModuleStack extends Object
Low weight alternative to Sun's Stack class.
Source code:
main
Belongs to CDK module:
io
Keywords:
stack
  • Constructor Details

    • CMLModuleStack

      public CMLModuleStack()
  • Method Details

    • 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

      public ICMLModule current()
      Returns the last added entry.
      See Also:
    • toString

      public String toString()
      Returns a String representation of the stack.
      Overrides:
      toString in class Object
    • 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.