org.hops.dm.tad
Class stackp

java.lang.Object
  extended by org.hops.dm.tad.stackp
All Implemented Interfaces:
java.io.Serializable

public class stackp
extends java.lang.Object
implements java.io.Serializable

stack of attrval

Version:
3.0
Author:
Meritxell Gonzalez
See Also:
Serialized Form

Field Summary
protected  java.util.Stack m_stack
           
 
Constructor Summary
stackp()
          Creates a new instance of stackp
 
Method Summary
 void add(stackp src)
          push all the elements of the stack in the same order of this stack
 void clear()
          remove all the elements of the stack
 java.lang.Object clone()
          Creates and returns a copy of this object.
 boolean contains(attrval _w)
          Tests if the specified object is a component in this Stack.
 boolean contains(java.lang.String _w)
          Tests if an element with the specified name is a component in this stack.
 boolean equals(stackp o)
          Indicates whether some other object is "equal to" this one.
 boolean equalsTo(stackp _w)
          Indicates whether a stackp contains at least the same elements thab this one.
 attrval first()
          Looks at the object at the top of this stack without removing it from the stack.
 attrval get(int i)
          Returns the element at the specified position in this Stack.
 attrval get(java.lang.String attrin_name)
          Gets the atrrval with the specified name from the stack, or an empty element if not found.
 boolean is_empty()
          Tests if there are any element in the stack
 attrval pop()
          Removes the object at the top of this stack and returns that object as the value of this function, or an empty value if the stack is empty.
 void push(attrval _w)
          Pushes an item onto the top of this stack.
 void push(condition _cond)
          Pushes an item onto the top of this stack.
 void raise(attrval _w)
          search the item in the stack and put it onto the top of the stack
 void remove(attrval _w)
          remove the element from the stack
 void remove(java.lang.String _name)
          remove the element from the stack
 int search(attrval _w)
          Searches the index for the specified object.
 int size()
          Returns the number of components in this Stack.
 java.lang.String toFriendString()
          Returns a string representation of the object.
 java.lang.String toString()
          Returns a string representation of the object.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_stack

protected java.util.Stack m_stack
Constructor Detail

stackp

public stackp()
Creates a new instance of stackp

Method Detail

equals

public boolean equals(stackp o)
Indicates whether some other object is "equal to" this one.


equalsTo

public boolean equalsTo(stackp _w)
Indicates whether a stackp contains at least the same elements thab this one.


is_empty

public boolean is_empty()
Tests if there are any element in the stack


clone

public java.lang.Object clone()
Creates and returns a copy of this object.

Overrides:
clone in class java.lang.Object

toString

public java.lang.String toString()
Returns a string representation of the object.

Overrides:
toString in class java.lang.Object

toFriendString

public java.lang.String toFriendString()
Returns a string representation of the object.


pop

public attrval pop()
Removes the object at the top of this stack and returns that object as the value of this function, or an empty value if the stack is empty.


push

public void push(attrval _w)
Pushes an item onto the top of this stack. If the item exists in the stack, remove from its old position


push

public void push(condition _cond)
Pushes an item onto the top of this stack. If the item exists in the stack, remove from its old position


raise

public void raise(attrval _w)
search the item in the stack and put it onto the top of the stack


first

public attrval first()
Looks at the object at the top of this stack without removing it from the stack.


clear

public void clear()
remove all the elements of the stack


add

public void add(stackp src)
push all the elements of the stack in the same order of this stack


remove

public void remove(attrval _w)
remove the element from the stack


remove

public void remove(java.lang.String _name)
remove the element from the stack


contains

public boolean contains(attrval _w)
Tests if the specified object is a component in this Stack.


contains

public boolean contains(java.lang.String _w)
Tests if an element with the specified name is a component in this stack.


get

public attrval get(java.lang.String attrin_name)
Gets the atrrval with the specified name from the stack, or an empty element if not found.


get

public attrval get(int i)
Returns the element at the specified position in this Stack.


size

public int size()
Returns the number of components in this Stack.


search

public int search(attrval _w)
Searches the index for the specified object.