Package io.anyline2.core
Class VectorOfChar
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<java.lang.Short>
-
- io.anyline2.core.VectorOfChar
-
- All Implemented Interfaces:
java.lang.Iterable<java.lang.Short>
,java.util.Collection<java.lang.Short>
,java.util.List<java.lang.Short>
,java.util.RandomAccess
public class VectorOfChar extends java.util.AbstractList<java.lang.Short> implements java.util.RandomAccess
-
-
Constructor Summary
Constructors Constructor Description VectorOfChar()
VectorOfChar(int count, short value)
VectorOfChar(short[] initialElements)
VectorOfChar(VectorOfChar other)
VectorOfChar(java.lang.Iterable<java.lang.Short> initialElements)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(int index, java.lang.Short e)
boolean
add(java.lang.Short e)
long
capacity()
void
clear()
void
delete()
java.lang.Short
get(int index)
boolean
isEmpty()
java.lang.Short
remove(int index)
void
reserve(long n)
java.lang.Short
set(int index, java.lang.Short e)
int
size()
-
Methods inherited from class java.util.AbstractList
addAll, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, subList
-
-
-
-
Constructor Detail
-
VectorOfChar
public VectorOfChar(short[] initialElements)
-
VectorOfChar
public VectorOfChar(java.lang.Iterable<java.lang.Short> initialElements)
-
VectorOfChar
public VectorOfChar()
-
VectorOfChar
public VectorOfChar(VectorOfChar other)
-
VectorOfChar
public VectorOfChar(int count, short value)
-
-
Method Detail
-
delete
public void delete()
-
get
public java.lang.Short get(int index)
- Specified by:
get
in interfacejava.util.List<java.lang.Short>
- Specified by:
get
in classjava.util.AbstractList<java.lang.Short>
-
set
public java.lang.Short set(int index, java.lang.Short e)
- Specified by:
set
in interfacejava.util.List<java.lang.Short>
- Overrides:
set
in classjava.util.AbstractList<java.lang.Short>
-
add
public boolean add(java.lang.Short e)
- Specified by:
add
in interfacejava.util.Collection<java.lang.Short>
- Specified by:
add
in interfacejava.util.List<java.lang.Short>
- Overrides:
add
in classjava.util.AbstractList<java.lang.Short>
-
add
public void add(int index, java.lang.Short e)
- Specified by:
add
in interfacejava.util.List<java.lang.Short>
- Overrides:
add
in classjava.util.AbstractList<java.lang.Short>
-
remove
public java.lang.Short remove(int index)
- Specified by:
remove
in interfacejava.util.List<java.lang.Short>
- Overrides:
remove
in classjava.util.AbstractList<java.lang.Short>
-
size
public int size()
- Specified by:
size
in interfacejava.util.Collection<java.lang.Short>
- Specified by:
size
in interfacejava.util.List<java.lang.Short>
- Specified by:
size
in classjava.util.AbstractCollection<java.lang.Short>
-
capacity
public long capacity()
-
reserve
public void reserve(long n)
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfacejava.util.Collection<java.lang.Short>
- Specified by:
isEmpty
in interfacejava.util.List<java.lang.Short>
- Overrides:
isEmpty
in classjava.util.AbstractCollection<java.lang.Short>
-
clear
public void clear()
- Specified by:
clear
in interfacejava.util.Collection<java.lang.Short>
- Specified by:
clear
in interfacejava.util.List<java.lang.Short>
- Overrides:
clear
in classjava.util.AbstractList<java.lang.Short>
-
-