Package org.apache.calcite.avatica.util
Class Spaces.SpaceList
- java.lang.Object
-
- java.util.concurrent.CopyOnWriteArrayList<java.lang.String>
-
- org.apache.calcite.avatica.util.Spaces.SpaceList
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,java.lang.Iterable<java.lang.String>,java.util.Collection<java.lang.String>,java.util.List<java.lang.String>,java.util.RandomAccess
- Enclosing class:
- Spaces
private static class Spaces.SpaceList extends java.util.concurrent.CopyOnWriteArrayList<java.lang.String>List whoseith entry is a string consisting ofispaces. It populates itself the first time you ask for a particular string, and caches the result.
-
-
Constructor Summary
Constructors Modifier Constructor Description privateSpaceList()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Stringget(int index)private voidpopulate(int newSize)Populates this list with all prefix strings of a given string.-
Methods inherited from class java.util.concurrent.CopyOnWriteArrayList
add, add, addAll, addAll, addAllAbsent, addIfAbsent, clear, clone, contains, containsAll, equals, forEach, hashCode, indexOf, indexOf, isEmpty, iterator, lastIndexOf, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, toString
-
-
-
-
Method Detail
-
get
public java.lang.String get(int index)
- Specified by:
getin interfacejava.util.List<java.lang.String>- Overrides:
getin classjava.util.concurrent.CopyOnWriteArrayList<java.lang.String>
-
populate
private void populate(int newSize)
Populates this list with all prefix strings of a given string. All of the prefix strings share the same backing array of chars.
-
-