Package org.sonar.php.tree.impl
Class SeparatedListImpl<T extends Tree>
- java.lang.Object
-
- org.sonar.php.tree.impl.SeparatedListImpl<T>
-
- All Implemented Interfaces:
Iterable<T>,Collection<T>,List<T>,SeparatedList<T>
public class SeparatedListImpl<T extends Tree> extends Object implements SeparatedList<T>
-
-
Constructor Summary
Constructors Constructor Description SeparatedListImpl(List<T> list, List<SyntaxToken> separators)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(int index, T element)booleanadd(T e)booleanaddAll(int index, Collection<? extends T> c)booleanaddAll(Collection<? extends T> c)voidclear()booleancontains(Object o)booleancontainsAll(Collection<?> c)Iterator<Tree>elementsAndSeparators()Iterator<Tree>elementsAndSeparators(com.google.common.base.Function<T,? extends Tree> elementTransformer)static <T extends Tree>
SeparatedListImpl<T>empty()Tget(int index)SyntaxTokengetSeparator(int i)List<SyntaxToken>getSeparators()intindexOf(Object o)booleanisEmpty()Iterator<T>iterator()intlastIndexOf(Object o)ListIterator<T>listIterator()ListIterator<T>listIterator(int index)Tremove(int index)booleanremove(Object o)booleanremoveAll(Collection<?> c)booleanretainAll(Collection<?> c)Tset(int index, T element)intsize()List<T>subList(int fromIndex, int toIndex)Object[]toArray()<T> T[]toArray(T[] a)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream
-
Methods inherited from interface java.util.List
equals, hashCode, replaceAll, sort, spliterator
-
-
-
-
Constructor Detail
-
SeparatedListImpl
public SeparatedListImpl(List<T> list, List<SyntaxToken> separators)
-
-
Method Detail
-
empty
public static <T extends Tree> SeparatedListImpl<T> empty()
-
getSeparator
public SyntaxToken getSeparator(int i)
- Specified by:
getSeparatorin interfaceSeparatedList<T extends Tree>
-
getSeparators
public List<SyntaxToken> getSeparators()
- Specified by:
getSeparatorsin interfaceSeparatedList<T extends Tree>
-
size
public int size()
-
isEmpty
public boolean isEmpty()
-
contains
public boolean contains(Object o)
-
toArray
public Object[] toArray()
-
toArray
public <T> T[] toArray(T[] a)
-
add
public boolean add(T e)
-
remove
public boolean remove(Object o)
-
containsAll
public boolean containsAll(Collection<?> c)
- Specified by:
containsAllin interfaceCollection<T extends Tree>- Specified by:
containsAllin interfaceList<T extends Tree>
-
addAll
public boolean addAll(Collection<? extends T> c)
-
addAll
public boolean addAll(int index, Collection<? extends T> c)
-
removeAll
public boolean removeAll(Collection<?> c)
-
retainAll
public boolean retainAll(Collection<?> c)
-
clear
public void clear()
-
lastIndexOf
public int lastIndexOf(Object o)
- Specified by:
lastIndexOfin interfaceList<T extends Tree>
-
listIterator
public ListIterator<T> listIterator()
- Specified by:
listIteratorin interfaceList<T extends Tree>
-
listIterator
public ListIterator<T> listIterator(int index)
- Specified by:
listIteratorin interfaceList<T extends Tree>
-
elementsAndSeparators
public Iterator<Tree> elementsAndSeparators(com.google.common.base.Function<T,? extends Tree> elementTransformer)
- Specified by:
elementsAndSeparatorsin interfaceSeparatedList<T extends Tree>
-
elementsAndSeparators
public Iterator<Tree> elementsAndSeparators()
- Specified by:
elementsAndSeparatorsin interfaceSeparatedList<T extends Tree>
-
-