Package jodd.json
Class LazyList
- All Implemented Interfaces:
Iterable<Object>,Collection<Object>,List<Object>,SequencedCollection<Object>
Similar to
LazyMap, the list elements are resolved only when required.-
Field Summary
FieldsFields inherited from class java.util.AbstractList
modCount -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.util.AbstractList
add, addAll, equals, hashCode, indexOf, lastIndexOf, listIterator, remove, removeRange, subListMethods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.List
add, addAll, addAll, addFirst, addLast, contains, containsAll, equals, getFirst, getLast, hashCode, indexOf, isEmpty, lastIndexOf, listIterator, remove, remove, removeAll, removeFirst, removeLast, replaceAll, retainAll, reversed, sort, spliterator, subList, toArray, toArray
-
Field Details
-
list
-
converted
private boolean converted
-
-
Constructor Details
-
LazyList
public LazyList()
-
-
Method Details
-
get
-
size
public int size()- Specified by:
sizein interfaceCollection<Object>- Specified by:
sizein interfaceList<Object>- Specified by:
sizein classAbstractCollection<Object>
-
iterator
-
convertAllIfNeeded
private void convertAllIfNeeded() -
clear
public void clear()- Specified by:
clearin interfaceCollection<Object>- Specified by:
clearin interfaceList<Object>- Overrides:
clearin classAbstractList<Object>
-
add
- Specified by:
addin interfaceCollection<Object>- Specified by:
addin interfaceList<Object>- Overrides:
addin classAbstractList<Object>
-
set
-
listIterator
- Specified by:
listIteratorin interfaceList<Object>- Overrides:
listIteratorin classAbstractList<Object>
-
list
-