Package com.github.javaparser.utils
Class VisitorList<N extends Node>
java.lang.Object
com.github.javaparser.utils.VisitorList<N>
- All Implemented Interfaces:
Iterable<N>,Collection<N>,List<N>
A list that overrides the equals and hashcode calculation of the added nodes
by using another equals and hashcode visitor for those methods.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected GenericVisitor<Boolean,Visitable>protected GenericVisitor<Integer,Void>protected List<com.github.javaparser.utils.VisitorList.EqualsHashcodeOverridingFacade> -
Constructor Summary
ConstructorsConstructorDescriptionVisitorList(GenericVisitor<Integer,Void> hashcodeVisitor, GenericVisitor<Boolean,Visitable> equalsVisitor)Pass the visitors to use for equals and hashcode. -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanbooleanaddAll(int index, Collection<? extends N> col)booleanaddAll(Collection<? extends N> col)voidclear()booleanbooleancontainsAll(Collection<?> col)get(int index)intbooleanisEmpty()iterator()intlastIndexOf(Object elem)listIterator(int index)remove(int index)booleanbooleanremoveAll(Collection<?> col)booleanretainAll(Collection<?> col)intsize()subList(int fromIndex, int toIndex)Object[]toArray()<T> T[]toArray(T[] arr)toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.List
equals, hashCode, replaceAll, sort, spliterator
-
Field Details
-
innerList
-
hashcodeVisitor
-
equalsVisitor
-
-
Constructor Details
-
VisitorList
public VisitorList(GenericVisitor<Integer,Void> hashcodeVisitor, GenericVisitor<Boolean,Visitable> equalsVisitor)Pass the visitors to use for equals and hashcode.
-
-
Method Details
-
add
-
add
-
addAll
-
addAll
-
clear
public void clear() -
contains
-
containsAll
- Specified by:
containsAllin interfaceCollection<N extends Node>- Specified by:
containsAllin interfaceList<N extends Node>
-
get
-
indexOf
-
isEmpty
public boolean isEmpty() -
iterator
-
lastIndexOf
- Specified by:
lastIndexOfin interfaceList<N extends Node>
-
listIterator
- Specified by:
listIteratorin interfaceList<N extends Node>
-
listIterator
- Specified by:
listIteratorin interfaceList<N extends Node>
-
remove
-
remove
-
removeAll
-
retainAll
-
set
-
size
public int size() -
subList
-
toArray
-
toArray
public <T> T[] toArray(T[] arr) -
toString
-