// ******************************************* import EDU.neu.ccs.demeter.*; class Block_List implements java.util.Enumeration, Cloneable { protected Nonempty_Block_List first; public Nonempty_Block_List get_first() { return first; } public void set_first(Nonempty_Block_List new_first) { first = new_first; } public Block_List() { super(); } public Block_List(Nonempty_Block_List first) { super(); set_first(first); } private Nonempty_Block_List tail; public void addElement(Block e) { checktail(); if (tail == null) { first = new Nonempty_Block_List(e,null); tail = first; } else { tail.set_next(new Nonempty_Block_List(e,null)); tail = tail.get_next(); } } public void push(Block e) { first = new Nonempty_Block_List(e,first); } public java.util.Enumeration elements() { return new Block_List(first); } public int size() { int i= 0; for (java.util.Enumeration e=elements(); e.hasMoreElements(); i++) e.nextElement(); return i; } public boolean isEmpty() { return (first == null); } public boolean hasMoreElements() { return (first != null); } public Object nextElement() { Block car = first.get_it(); first = first.get_next(); return (Object) car; } private void checktail() { if (tail == null && first != null) { tail = first; while (tail.get_next() != null) tail = tail.get_next(); } } public boolean contains(Block e) { java.util.Enumeration en = this.elements(); while (en.hasMoreElements()) if (e.equals((Block) en.nextElement())) return true; return false; } }