Class CharRange
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<Character>
-
- net.automatalib.common.util.collection.CharRange
-
- All Implemented Interfaces:
Iterable<Character>
,Collection<Character>
,List<Character>
,RandomAccess
,ArrayWritable<Character>
public class CharRange extends AbstractList<Character> implements ArrayWritable<Character>, RandomAccess
-
-
Field Summary
-
Fields inherited from class java.util.AbstractList
modCount
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description char
charGet(int index)
boolean
contains(@Nullable Object o)
Character
get(int index)
int
indexOf(char c)
int
indexOf(@Nullable Object o)
CharRangeIterator
iterator()
int
lastIndexOf(@Nullable Object o)
CharRangeIterator
listIterator()
CharRangeIterator
listIterator(int index)
int
size()
The size of this container.void
writeToArray(int offset, @Nullable Object[] array, int tgtOfs, int num)
Writes the contents of this container to an array.-
Methods inherited from class java.util.AbstractList
add, add, addAll, clear, equals, hashCode, remove, removeRange, set, subList
-
Methods inherited from class java.util.AbstractCollection
addAll, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream
-
Methods inherited from interface java.util.List
addAll, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
-
-
-
-
Constructor Detail
-
CharRange
public CharRange(char low, char high)
-
CharRange
public CharRange(char low, char high, int step)
-
CharRange
public CharRange(IntRange delegate)
-
-
Method Detail
-
get
public Character get(int index)
-
charGet
public char charGet(int index)
-
contains
public boolean contains(@Nullable Object o)
- Specified by:
contains
in interfaceCollection<Character>
- Specified by:
contains
in interfaceList<Character>
- Overrides:
contains
in classAbstractCollection<Character>
-
indexOf
public int indexOf(char c)
-
lastIndexOf
public int lastIndexOf(@Nullable Object o)
- Specified by:
lastIndexOf
in interfaceList<Character>
- Overrides:
lastIndexOf
in classAbstractList<Character>
-
iterator
public CharRangeIterator iterator()
-
listIterator
public CharRangeIterator listIterator()
- Specified by:
listIterator
in interfaceList<Character>
- Overrides:
listIterator
in classAbstractList<Character>
-
listIterator
public CharRangeIterator listIterator(int index)
- Specified by:
listIterator
in interfaceList<Character>
- Overrides:
listIterator
in classAbstractList<Character>
-
size
public int size()
Description copied from interface:ArrayWritable
The size of this container.- Specified by:
size
in interfaceArrayWritable<Character>
- Specified by:
size
in interfaceCollection<Character>
- Specified by:
size
in interfaceList<Character>
- Specified by:
size
in classAbstractCollection<Character>
-
writeToArray
public void writeToArray(int offset, @Nullable Object[] array, int tgtOfs, int num)
Description copied from interface:ArrayWritable
Writes the contents of this container to an array. The behavior of calling this method should be equivalent toSystem.arraycopy(this.toArray(), offset, array, tgtOfs, num);
- Specified by:
writeToArray
in interfaceArrayWritable<Character>
- Parameters:
offset
- how many elements of this container to skip.array
- the array in which to store the elements.tgtOfs
- the starting offset in the target array.num
- the maximum number of elements to copy.
-
-