|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jclarion.clarion.ClarionMemoryModel
org.jclarion.clarion.ClarionGroup
org.jclarion.clarion.ClarionQueue
public class ClarionQueue
Model a queue A queue is like an Array collection in Java. Queues have following properties public fields define what is actually being stored on the queue. Works sortof like files in Clarion in that there current record which may not represent what is actually stored, and what is currently stored. Queues have what is known as sort orders. Records are sorted and you can quickly retrieve values on pre-gen sort orders. The active sort order defines the default ordering of records in a queue. i.e. record #1, record #2, record #3 retrievals may indicate a specific ordering One thing I am not clear on with respect to how clarion queues work is the fact that a queue is either list or sorted - how clarion intermixes commands of a list nature vs a sort nature. Will assume that lists are allowed to fall into disorder in event of any operation that changes ordering of elements in active sort order
| Nested Class Summary | |
|---|---|
static class |
ClarionQueue.Order
Model parameter ordering |
protected static class |
ClarionQueue.QueueEntry
|
static class |
ClarionQueue.Record
|
static class |
ClarionQueue.SpecialRecord
|
| Nested classes/interfaces inherited from class org.jclarion.clarion.ClarionGroup |
|---|
ClarionGroup.GroupEntry, ClarionGroup.ReferenceVariable |
| Nested classes/interfaces inherited from class org.jclarion.clarion.ClarionMemoryModel |
|---|
ClarionMemoryModel.State |
| Field Summary |
|---|
| Fields inherited from class org.jclarion.clarion.ClarionGroup |
|---|
map |
| Constructor Summary | |
|---|---|
ClarionQueue()
|
|
| Method Summary | |
|---|---|
void |
add()
Add new record into queue at end of the queue |
void |
add(ClarionNumber position)
Add record into queue - at specified position |
void |
add(ClarionObject order)
|
void |
add(ClarionQueue.Order order)
Add record into sorted list at specified list location. |
void |
add(ClarionString order)
Add new record into queue, at the specified position. |
void |
add(int position)
|
void |
add(java.lang.String order)
Add record into sorted list at specified list location. |
void |
addListener(ClarionQueueListener cmcl)
Listen for changes to the objects representation. |
ClarionMemoryModel |
castTo(java.lang.Class<? extends ClarionMemoryModel> clazz)
|
int |
convertQueueIndexToScreenIndex(int v)
|
int |
convertScreenIndexToQueueIndex(int v)
|
java.lang.String |
debugString()
|
void |
delete()
Delete last retrieved record |
void |
free()
Remove all records |
void |
get(ClarionNumber pos)
Get specified record |
void |
get(ClarionObject order)
|
void |
get(ClarionQueue.Order order)
|
void |
get(ClarionString order)
Get first matching specified record based on order setting If no record is found - call to position() will yield pointer to where record should of been found had there been one |
void |
get(int pos)
Get specified record |
int |
getPointer()
Return current position from 1 to n for last GET, ADD or PUT operation |
int |
getPosition()
Not entirely sure what this does... |
ClarionObject[] |
getRecord(int pos)
|
boolean[] |
getSiblingTree(int row,
int pos)
|
int |
getSortCount()
|
ClarionObject |
getValueAt(int row,
int column)
|
boolean |
hasChildren(int row,
int pos)
|
boolean |
hasSibling(int row,
int pos)
|
ClarionQueue.Order |
ORDER()
Helper to construct an order object |
void |
put()
Put record back into queue in last position as specified by prior get(int) or add(). |
void |
put(boolean keepIndexedSort)
|
void |
put(ClarionQueue.Order order)
Put record back into queue - using specified sort order |
int |
records()
Return number of records in the queue |
void |
removeListener(ClarionQueueListener cmcl)
Stop Listening for changes to the objects representation |
void |
setNextAnchor(java.lang.Object anchor)
|
void |
sort(ClarionQueue.Order order)
Set active sort order to the specified order |
void |
sort(ClarionString order)
|
void |
toggle(int row,
int column)
|
| Methods inherited from class org.jclarion.clarion.ClarionGroup |
|---|
addReference, addVariable, addVariable, clear, clear, clearNull, deserialize, flatWhat, flatWhere, flatWho, genericLike, getGroupObject, getGroupParam, getGroupParamPosition, getLockedObject, getPrefix, getString, getThread, getVariableCount, initThread, merge, serialize, setNull, setOver, setOver, setPrefix, setValue, setValue, what, where, who, whoNoPrefix |
| Methods inherited from class org.jclarion.clarion.ClarionMemoryModel |
|---|
addChangeListener, addChangeListener, getListenerCount, isAnyoneInterestedInChange, isThreaded, lock, notifyChange, removeChangeListener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ClarionQueue()
| Method Detail |
|---|
public ClarionQueue.Order ORDER()
public void setNextAnchor(java.lang.Object anchor)
public void add()
public void add(ClarionNumber position)
order - public void add(int position)
public void add(ClarionObject order)
public void get(ClarionObject order)
public void add(ClarionString order)
order - public void add(java.lang.String order)
order - public void add(ClarionQueue.Order order)
public void put()
public void put(boolean keepIndexedSort)
public void put(ClarionQueue.Order order)
public void delete()
public void free()
public void sort(ClarionQueue.Order order)
order - public void sort(ClarionString order)
public int records()
records in interface ClarionQueueReader
public ClarionObject getValueAt(int row,
int column)
getValueAt in interface ClarionQueueReaderpublic ClarionObject[] getRecord(int pos)
getRecord in interface ClarionQueueReaderpublic void get(int pos)
public void get(ClarionNumber pos)
public void get(ClarionString order)
public void get(ClarionQueue.Order order)
public int getPosition()
public int getPointer()
public int getSortCount()
public void addListener(ClarionQueueListener cmcl)
addListener in interface ClarionQueueReadercmcl - public void removeListener(ClarionQueueListener cmcl)
removeListener in interface ClarionQueueReadercmcl - public java.lang.String debugString()
public void toggle(int row,
int column)
toggle in interface ClarionQueueReader
public boolean hasChildren(int row,
int pos)
hasChildren in interface ClarionQueueReader
public boolean[] getSiblingTree(int row,
int pos)
getSiblingTree in interface ClarionQueueReader
public boolean hasSibling(int row,
int pos)
public int convertQueueIndexToScreenIndex(int v)
convertQueueIndexToScreenIndex in interface ClarionQueueReaderpublic int convertScreenIndexToQueueIndex(int v)
convertScreenIndexToQueueIndex in interface ClarionQueueReaderpublic ClarionMemoryModel castTo(java.lang.Class<? extends ClarionMemoryModel> clazz)
castTo in class ClarionMemoryModel
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||