org.hops.dm.tad
Class stackact

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

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

stack of actions

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

Field Summary
protected  java.util.Stack m_stack
          the stack
 
Constructor Summary
stackact()
          Creates a new instance of stackact
 
Method Summary
 void add(stackact 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(action _w)
          Tests if the specified object is a component in this Stack.
 boolean contains(actionset actid)
           
 boolean contains(actionset actid, attrval attr)
          Tests if an object with the specified attrval is a component of this Stack
 boolean contains(attrval attr)
          Tests if an object with the specified attrval is a component of this Stack
 boolean contains(java.lang.String attr)
          Tests if an element with the specified name is a component in this stack.
 boolean equals(java.lang.Object o)
          Indicates whether some other object is "equal to" this one.
 boolean equalsTo(stackact _w)
          Indicates whether a stackact contains at least the same elements thab this one.
 action first()
          Looks at the object at the top of this stack without removing it from the stack.
 action get(actionset actid)
          Returns the first element found with the specified actionset
 action get(int i)
          Returns the element at the specified position in this Stack.
 action get(java.lang.String attr)
          Returns the action with the same name
 int hashCode()
           
 boolean is_empty()
          Tests if there are any element in the stack
 action 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(action _w)
          Pushes an item onto the top of this stack.
 void raise(action _w)
          search the item in the stack and put it onto the top of the stack
 void remove(action _w)
          remove the element from the stack
 void remove(int i)
          remove the element in the specified position
 int search(action _w)
          Searches the index for the specified object.
 void set(int i, action actin)
          set the specified element in the specified position if the stack has at least such elements
 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
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

m_stack

protected java.util.Stack m_stack
the stack

Constructor Detail

stackact

public stackact()
Creates a new instance of stackact

Method Detail

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

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

Overrides:
equals in class java.lang.Object

equalsTo

public boolean equalsTo(stackact _w)
Indicates whether a stackact 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 action 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(action _w)
Pushes an item onto the top of this stack. If the item is unifiable with any other in the stack, remove from its old position


raise

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


first

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


add

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


clear

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


remove

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


remove

public void remove(int i)
remove the element in the specified position


contains

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


contains

public boolean contains(actionset actid)

contains

public boolean contains(attrval attr)
Tests if an object with the specified attrval is a component of this Stack


contains

public boolean contains(actionset actid,
                        attrval attr)
Tests if an object with the specified attrval is a component of this Stack


contains

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


get

public action get(java.lang.String attr)
Returns the action with the same name


get

public action get(actionset actid)
Returns the first element found with the specified actionset


get

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


set

public void set(int i,
                action actin)
set the specified element in the specified position if the stack has at least such elements


size

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


search

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