|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.cburch.editor.tokens.TokenList<T>
com.cburch.editor.tokens.MutableTokenList<T>
T - the type of token maintained in the list.public class MutableTokenList<T extends BasicToken>
Maintains a list of tokens, just as with TokenList,
except that modifications are allowed here. The Tokenizer
class does not use this class, but other classes may find this
useful to maintain their own lists of tokens.
| Constructor Summary | |
|---|---|
MutableTokenList()
Constructs an empty list of tokens. |
|
MutableTokenList(java.util.List<? extends T> initialValues)
Constructs a list of tokens initially holding the given values. |
|
| Method Summary | |
|---|---|
void |
add(int arg0,
T arg1)
Implemented as defined in the List interface. |
boolean |
add(T arg0)
Implemented as defined in the List interface. |
boolean |
addAll(java.util.Collection<? extends T> arg0)
Implemented as defined in the List interface. |
boolean |
addAll(int arg0,
java.util.Collection<? extends T> arg1)
Implemented as defined in the List interface. |
void |
clear()
Implemented as defined in the List interface. |
java.util.Iterator<T> |
iterator()
|
java.util.ListIterator<T> |
listIterator()
|
java.util.ListIterator<T> |
listIterator(int arg0)
|
T |
remove(int arg0)
Implemented as defined in the List interface. |
boolean |
remove(java.lang.Object arg0)
Implemented as defined in the List interface. |
boolean |
removeAll(java.util.Collection<?> arg0)
Implemented as defined in the List interface. |
void |
replace(int from,
int to,
java.util.List<T> newTokens)
Replaces a range of the list with a different list instead. |
boolean |
retainAll(java.util.Collection<?> arg0)
Implemented as defined in the List interface. |
T |
set(int arg0,
T arg1)
Implemented as defined in the List interface. |
java.util.List<T> |
subList(int arg0,
int arg1)
|
| Methods inherited from class com.cburch.editor.tokens.TokenList |
|---|
contains, containsAll, get, getIndexContaining, getIndexContaining, getIndexEndingBefore, getIndexEndingBefore, getIndexStartingAfter, getIndexStartingAfter, indexOf, isEmpty, lastIndexOf, size, toArray, toArray |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.util.List |
|---|
equals, hashCode |
| Constructor Detail |
|---|
public MutableTokenList()
public MutableTokenList(java.util.List<? extends T> initialValues)
initialValues - the tokens to have in the list initially.| Method Detail |
|---|
public void replace(int from,
int to,
java.util.List<T> newTokens)
from - the first index to be removed.to - the first index to be retained, one after the
index of the last index to be removed.newTokens - the tokens to be inserted in place of the
removed tokens.public java.util.Iterator<T> iterator()
iterator in interface java.lang.Iterable<T extends BasicToken>iterator in interface java.util.Collection<T extends BasicToken>iterator in interface java.util.List<T extends BasicToken>iterator in class TokenList<T extends BasicToken>public java.util.ListIterator<T> listIterator()
listIterator in interface java.util.List<T extends BasicToken>listIterator in class TokenList<T extends BasicToken>public java.util.ListIterator<T> listIterator(int arg0)
listIterator in interface java.util.List<T extends BasicToken>listIterator in class TokenList<T extends BasicToken>
public java.util.List<T> subList(int arg0,
int arg1)
subList in interface java.util.List<T extends BasicToken>subList in class TokenList<T extends BasicToken>public boolean add(T arg0)
List interface.
add in interface java.util.Collection<T extends BasicToken>add in interface java.util.List<T extends BasicToken>add in class TokenList<T extends BasicToken>
public void add(int arg0,
T arg1)
List interface.
add in interface java.util.List<T extends BasicToken>add in class TokenList<T extends BasicToken>public boolean addAll(java.util.Collection<? extends T> arg0)
List interface.
addAll in interface java.util.Collection<T extends BasicToken>addAll in interface java.util.List<T extends BasicToken>addAll in class TokenList<T extends BasicToken>
public boolean addAll(int arg0,
java.util.Collection<? extends T> arg1)
List interface.
addAll in interface java.util.List<T extends BasicToken>addAll in class TokenList<T extends BasicToken>public boolean removeAll(java.util.Collection<?> arg0)
List interface.
removeAll in interface java.util.Collection<T extends BasicToken>removeAll in interface java.util.List<T extends BasicToken>removeAll in class TokenList<T extends BasicToken>public boolean retainAll(java.util.Collection<?> arg0)
List interface.
retainAll in interface java.util.Collection<T extends BasicToken>retainAll in interface java.util.List<T extends BasicToken>retainAll in class TokenList<T extends BasicToken>public void clear()
List interface.
clear in interface java.util.Collection<T extends BasicToken>clear in interface java.util.List<T extends BasicToken>clear in class TokenList<T extends BasicToken>
public T set(int arg0,
T arg1)
List interface.
set in interface java.util.List<T extends BasicToken>set in class TokenList<T extends BasicToken>public T remove(int arg0)
List interface.
remove in interface java.util.List<T extends BasicToken>remove in class TokenList<T extends BasicToken>public boolean remove(java.lang.Object arg0)
List interface.
remove in interface java.util.Collection<T extends BasicToken>remove in interface java.util.List<T extends BasicToken>remove in class TokenList<T extends BasicToken>
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||