|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.rice.cs.drjava.model.definitions.reducedmodel.TokenList.Iterator
public class TokenList.Iterator
Constructor Summary | |
---|---|
TokenList.Iterator()
|
Method Summary | |
---|---|
boolean |
atEnd()
Return true if we're pointing at the tail. |
boolean |
atFirstItem()
Return true if we're pointing at the node after the head. |
boolean |
atLastItem()
Return true if we're pointing at the node before the tail. |
boolean |
atStart()
Return true if we're pointing at the head. |
void |
collapse(edu.rice.cs.drjava.model.definitions.reducedmodel.ModelList.ModelIterator iter)
Delete all nodes between the current position of this and the current position of the given iterator. |
TokenList.Iterator |
copy()
Makes a fresh copy of this TokenList.Iterator. |
T |
current()
Return the item associated with the current node. |
void |
delete(int count)
Update the BraceReduction to reflect text deletion. |
void |
dispose()
Disposes of an iterator by removing it from the listeners. |
boolean |
eq(edu.rice.cs.drjava.model.definitions.reducedmodel.ModelList.ModelIterator that)
Tests "that" for equality with "this". |
int |
getBlockOffset()
|
ReducedModelState |
getStateAtCurrent()
Returns the current commented/quoted state at the cursor. |
void |
insert(T item)
Inserts an item before the current item. |
void |
move(int count)
Updates the BraceReduction to reflect cursor movement. |
void |
next()
Moves to the next node. |
T |
nextItem()
Returns the item associated with the node after the current node. |
int |
pos()
|
void |
prev()
Moves to the previous node. |
T |
prevItem()
Returns the item associated with the node before the current node. |
void |
remove()
Removes the current item from the list. |
void |
setBlockOffset(int offset)
|
void |
setTo(edu.rice.cs.drjava.model.definitions.reducedmodel.ModelList.ModelIterator that)
Force "this" iterator to take the values of "that". |
void |
setTo(TokenList.Iterator that)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TokenList.Iterator()
Method Detail |
---|
public TokenList.Iterator copy()
public void setTo(TokenList.Iterator that)
public int getBlockOffset()
public void setBlockOffset(int offset)
public ReducedModelState getStateAtCurrent()
public void move(int count)
count
- indicates the direction and magnitude of cursor movementpublic void delete(int count)
Update the BraceReduction to reflect text deletion.
count
- A number specifying the size and direction of text deletion. Negative values delete text to the
left of the cursor; positive values delete text to the right. Assumes deletion is within range!public String toString()
toString
in class Object
public boolean eq(edu.rice.cs.drjava.model.definitions.reducedmodel.ModelList.ModelIterator that)
public void setTo(edu.rice.cs.drjava.model.definitions.reducedmodel.ModelList.ModelIterator that)
public void dispose()
public boolean atStart()
public boolean atEnd()
public boolean atFirstItem()
public boolean atLastItem()
public T current()
public T prevItem()
public T nextItem()
public int pos()
public void insert(T item)
public void remove()
public void prev()
public void next()
public void collapse(edu.rice.cs.drjava.model.definitions.reducedmodel.ModelList.ModelIterator iter)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |