org.hops.dm.tad
Class queueact

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

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

queue of action

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

Field Summary
protected  java.util.ArrayList m_queue
          the queue
 
Constructor Summary
queueact()
          Creates a new instance of queueact
 
Method Summary
 void clear()
          remove all the elements of the queue
 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 queue.
 boolean contains(actionset actid)
           
 boolean equals(java.lang.Object o)
          Indicates whether some other object is "equal to" this one.
 boolean equalsTo(queueact _w)
          Indicates whether a queue contains at least the same elements thab this one.
 action first()
          Looks at the object at the head of this queue without removing it from the queu.
 action get(action act)
          Returns the first element found that is equals to the specified element
 action get(actionlevel al, polarity p)
          Returns the first element found that has feedback is equals to the specified element
 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 queue.
 java.util.ArrayList getAll(actionlevel al, polarity p)
          returns all the elements that matches the condition
 java.lang.String getValueOf(java.lang.String name)
          returns the value of the action named "name"
 int hashCode()
           
 boolean is_empty()
          Tests if there are any element in the queue
 action pop()
          Removes the object at the head of this queue and returns that object as the value of this function, or an empty value if the queue is empty.
 void push(action _w)
          Pushes an item onto the head of this queue.
 void remove(action act)
          remove the element from the queue
 int search(action _act)
          Searches the index for the specified object.
 int size()
          Returns the number of components in this queue.
 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_queue

protected java.util.ArrayList m_queue
the queue

Constructor Detail

queueact

public queueact()
Creates a new instance of queueact

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(queueact _w)
Indicates whether a queue contains at least the same elements thab this one.


is_empty

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


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.


first

public action first()
Looks at the object at the head of this queue without removing it from the queu.


push

public void push(action _w)
Pushes an item onto the head of this queue. If the item exists in the queu, remove from its old position


pop

public action pop()
Removes the object at the head of this queue and returns that object as the value of this function, or an empty value if the queue is empty.


clear

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


remove

public void remove(action act)
remove the element from the queue


contains

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


contains

public boolean contains(actionset actid)

get

public action get(action act)
Returns the first element found that is equals to the specified element


get

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


get

public action get(actionlevel al,
                  polarity p)
Returns the first element found that has feedback is equals to the specified element


get

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


getAll

public java.util.ArrayList getAll(actionlevel al,
                                  polarity p)
returns all the elements that matches the condition


getValueOf

public java.lang.String getValueOf(java.lang.String name)
returns the value of the action named "name"


size

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


search

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