Package org.drasyl.handler.stream
Class MessageChunksBufferInputList
java.lang.Object
org.drasyl.handler.stream.MessageChunksBufferInputList
- All Implemented Interfaces:
Iterable<MessageChunk>
,Collection<MessageChunk>
,List<MessageChunk>
Special
List
implementation which is used within our MessageChunksBuffer
.
Beware: Only size()
, isEmpty()
, iterator()
, toArray()
, clear()
, get(int)
, and List.set(int, Object)
are implemented.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(int index, MessageChunk element) boolean
add
(MessageChunk e) boolean
addAll
(int index, Collection<? extends MessageChunk> c) boolean
addAll
(Collection<? extends MessageChunk> c) void
clear()
boolean
boolean
containsAll
(Collection<?> c) get
(int index) int
boolean
isEmpty()
iterator()
int
listIterator
(int index) remove
(int index) boolean
boolean
removeAll
(Collection<?> c) boolean
retainAll
(Collection<?> c) set
(int index, MessageChunk element) int
size()
subList
(int fromIndex, int toIndex) Object[]
toArray()
<T> T[]
toArray
(T[] a) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface java.util.List
equals, hashCode, replaceAll, sort, spliterator
-
Constructor Details
-
MessageChunksBufferInputList
public MessageChunksBufferInputList(int capacity)
-
-
Method Details
-
size
public int size()- Specified by:
size
in interfaceCollection<MessageChunk>
- Specified by:
size
in interfaceList<MessageChunk>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfaceCollection<MessageChunk>
- Specified by:
isEmpty
in interfaceList<MessageChunk>
-
contains
- Specified by:
contains
in interfaceCollection<MessageChunk>
- Specified by:
contains
in interfaceList<MessageChunk>
-
iterator
- Specified by:
iterator
in interfaceCollection<MessageChunk>
- Specified by:
iterator
in interfaceIterable<MessageChunk>
- Specified by:
iterator
in interfaceList<MessageChunk>
-
toArray
- Specified by:
toArray
in interfaceCollection<MessageChunk>
- Specified by:
toArray
in interfaceList<MessageChunk>
-
toArray
public <T> T[] toArray(T[] a) - Specified by:
toArray
in interfaceCollection<MessageChunk>
- Specified by:
toArray
in interfaceList<MessageChunk>
-
add
- Specified by:
add
in interfaceCollection<MessageChunk>
- Specified by:
add
in interfaceList<MessageChunk>
-
remove
- Specified by:
remove
in interfaceCollection<MessageChunk>
- Specified by:
remove
in interfaceList<MessageChunk>
-
containsAll
- Specified by:
containsAll
in interfaceCollection<MessageChunk>
- Specified by:
containsAll
in interfaceList<MessageChunk>
-
addAll
- Specified by:
addAll
in interfaceCollection<MessageChunk>
- Specified by:
addAll
in interfaceList<MessageChunk>
-
addAll
- Specified by:
addAll
in interfaceList<MessageChunk>
-
removeAll
- Specified by:
removeAll
in interfaceCollection<MessageChunk>
- Specified by:
removeAll
in interfaceList<MessageChunk>
-
retainAll
- Specified by:
retainAll
in interfaceCollection<MessageChunk>
- Specified by:
retainAll
in interfaceList<MessageChunk>
-
clear
public void clear()- Specified by:
clear
in interfaceCollection<MessageChunk>
- Specified by:
clear
in interfaceList<MessageChunk>
-
get
- Specified by:
get
in interfaceList<MessageChunk>
-
set
- Specified by:
set
in interfaceList<MessageChunk>
-
add
- Specified by:
add
in interfaceList<MessageChunk>
-
remove
- Specified by:
remove
in interfaceList<MessageChunk>
-
indexOf
- Specified by:
indexOf
in interfaceList<MessageChunk>
-
lastIndexOf
- Specified by:
lastIndexOf
in interfaceList<MessageChunk>
-
listIterator
- Specified by:
listIterator
in interfaceList<MessageChunk>
-
listIterator
- Specified by:
listIterator
in interfaceList<MessageChunk>
-
subList
- Specified by:
subList
in interfaceList<MessageChunk>
-