public interface SyntacticHeap
| Modifier and Type | Method and Description |
|---|---|
<T extends SyntacticItem> |
allocate(T item)
Allocate a given syntactic item into this heap.
|
int |
getIndexOf(SyntacticItem item)
Determine the index of a given syntactic item in this heap.
|
SyntacticItem |
getSyntacticItem(int ith)
Return the ith syntactic item in this heap.
|
int |
size()
Get the number of items in the heap.
|
int size()
SyntacticItem getSyntacticItem(int ith)
index - int getIndexOf(SyntacticItem item)
item - <T extends SyntacticItem> T allocate(T item)
Allocate a given syntactic item into this heap. The item must not already be allocated to another heap. This will recursively allocate children not already allocated to this heap. Observe that the item returned is the actual object allocated into this heap. One should not assume that the item given is that which is actually allocated.
This method will not permit mixed allocation items. That is, when it encounters an item already allocated to another heap it will simple throw an exception.
item - Copyright © 2017. All rights reserved.