Package org.metricshub.jawk.intermediate
Class Address
java.lang.Object
org.metricshub.jawk.intermediate.Address
- All Implemented Interfaces:
Serializable
A pointer to a tuple within the list of tuples.
Addresses are used for jumps, especially in reaction to
conditional checks (i.e., if false, jump to else block, etc.).
Addresses have the following properties:
- A name (label).
- An index into the tuple queue.
All addresses should have a meaningful label.
- Author:
- Danny Daglas
- See Also:
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Address
-
-
Method Details
-
label
The label of the address. It is particularly useful when dumping tuples to an output stream.- Returns:
- The label of the tuple.
-
assignIndex
public void assignIndex(int index) Set the tuple index of this address. This can be deferred anytime after creation of the address, but the index must be assigned prior to traversing the tuples.- Parameters:
index- The tuple location within the tuple list (queue) for this address.
-
index
public int index()index.
- Returns:
- The index into the tuple queue/array.
-
toString
-