|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--pl.edu.pjwstk.yaod.yaql.engine.EnvironmentalStack
The EnvironmentalStack
class represents the environmental stack.
Its sections (activation records) consist of binders. The environmental stack
has a link to the object store.
ActivationRecord
,
BinderValue
Constructor Summary | |
EnvironmentalStack(ObjectManager om)
Creates a new environmental stack, with specified om which is
an object manager (a link to data store objects). |
Method Summary | |
void |
addAtBottom(BinderValue b)
Adds a new binder to the lowest section of the environmental stack. |
void |
addAtTop(BinderValue b)
Adds a new binder to the highest section of the environmental stack. |
BagValue |
bind(java.lang.String name)
Returns a set ( BagValue ) of object identifiers which were positively
binded. |
void |
deleteAll()
Deletes all elements on environmental stack. |
void |
deleteAtBottom(BinderValue b)
Deletes a specified binder from the lowest section of environmental stack. |
void |
deleteAtTop()
Deletes all binders from the highest section of environmental stack. |
void |
deleteAtTop(BinderValue b)
Deletes a specified binder from the highest section of environmental stack. |
void |
deleteElement(BinderValue b)
Deletes a specified binder ( b ) from environmental stack. |
boolean |
empty()
Tests whether or not the stack is empty. |
ActivationRecord |
getElementAt(int i)
Returns (without removal) the i-th element from the environmental stack. |
ActivationRecord |
getFirstElement()
Returns (without removal) the first element from the environmental stack. |
ActivationRecord |
getLastElement()
Returns (without removal) the last element from the environmental stack. |
int |
getSize()
Returns the number of elements in the environmental stack. |
ActivationRecord |
pop()
Returns (and removes) the last element from the environmental stack. |
void |
push(ActivationRecord ar)
Puts new element onto query result stack. |
void |
renameElement(BinderValue b,
java.lang.String name)
Sets a specified binder ( b ) a new name (name ). |
void |
show()
Shows all the elements of environmental stack. |
ActivationRecord |
top()
Returns (without removal) the last element from the environmental stack. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public EnvironmentalStack(ObjectManager om)
om
which is
an object manager (a link to data store objects).om
- object manager - a link to data store objects.ObjectManager
Method Detail |
public boolean empty()
true
if stack is empty, false
otherwise.public void push(ActivationRecord ar)
ActivationRecord
public ActivationRecord pop() throws EmptyStackException
EmptyStackException
- if stack is empty.ActivationRecord
public ActivationRecord top() throws EmptyStackException
EmptyStackException
- if stack is empty.ActivationRecord
public int getSize()
public ActivationRecord getElementAt(int i)
i
- the index of element to be returned.ActivationRecord
public ActivationRecord getFirstElement()
ActivationRecord
public ActivationRecord getLastElement()
ActivationRecord
public void show()
public void deleteAll()
public void deleteElement(BinderValue b) throws TypeMismatchException
b
) from environmental stack.b
- binder which is to be deleted.TypeMismatchException
- if comparison of elements fails.BinderValue
public void renameElement(BinderValue b, java.lang.String name) throws TypeMismatchException
b
) a new name (name
).b
- binder which name is to be changed.name
- a new name for the binderTypeMismatchException
- if comparison of elements fails.BinderValue
public void addAtBottom(BinderValue b)
b
- a binder to be added.BinderValue
,
ActivationRecord
public void addAtTop(BinderValue b)
b
- a binder to be added.BinderValue
,
ActivationRecord
public void deleteAtBottom(BinderValue b) throws TypeMismatchException
b
- a binder to be deleted.TypeMismatchException
- if comparison of elements fails.BinderValue
,
ActivationRecord
public void deleteAtTop(BinderValue b) throws TypeMismatchException
b
- a binder to be deleted.TypeMismatchException
- if comparison of elements fails.BinderValue
,
ActivationRecord
public void deleteAtTop()
b
- a binder to be deleted.BinderValue
,
ActivationRecord
public BagValue bind(java.lang.String name)
BagValue
) of object identifiers which were positively
binded. If nothing was binded, empty set is returned.name
- a name to be binded.BagValue
,
BinderValue
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |