Class MemoList
Object
MemoList
- All Implemented Interfaces:
Iterable<VoxelizedMarkMemo>
,MemoForIndex
A list of
VoxelizedMarkMemo
objects that implements MemoForIndex
and Iterable
.
This class provides methods to manipulate and access the list of voxelized mark memos.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Appends the specified element to the end of this list.void
addAll
(MemoForIndex src) Adds all elements from anotherMemoForIndex
to this list.protected boolean
boolean
get
(int index) Returns the element at the specified position in this list.getMemoForIndex
(int index) Retrieves theVoxelizedMarkMemo
for the specified index.int
hashCode()
iterator()
remove
(int index) Removes the element at the specified position in this list.boolean
remove
(VoxelizedMarkMemo memo) Removes the first occurrence of the specified element from this list, if it is present.set
(int index, VoxelizedMarkMemo element) Replaces the element at the specified position in this list with the specified element.int
size()
Returns the number of elements in this list.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
MemoList
public MemoList()
-
-
Method Details
-
addAll
Adds all elements from anotherMemoForIndex
to this list.- Parameters:
src
- the sourceMemoForIndex
to add elements from
-
getMemoForIndex
Description copied from interface:MemoForIndex
Retrieves theVoxelizedMarkMemo
for the specified index.- Specified by:
getMemoForIndex
in interfaceMemoForIndex
- Parameters:
index
- the index of the desired memo, must be non-negative and less thanMemoForIndex.size()
- Returns:
- the
VoxelizedMarkMemo
corresponding to the given index
-
size
public int size()Returns the number of elements in this list.- Specified by:
size
in interfaceMemoForIndex
- Returns:
- the number of elements in this list
-
get
Returns the element at the specified position in this list.- Parameters:
index
- index of the element to return- Returns:
- the element at the specified position in this list
- Throws:
IndexOutOfBoundsException
- if the index is out of range
-
add
Appends the specified element to the end of this list.- Parameters:
e
- element to be appended to this list- Returns:
true
(as specified byCollection.add(E)
)
-
remove
Removes the element at the specified position in this list.- Parameters:
index
- the index of the element to be removed- Returns:
- the element that was removed from the list
- Throws:
IndexOutOfBoundsException
- if the index is out of range
-
remove
Removes the first occurrence of the specified element from this list, if it is present.- Parameters:
memo
- element to be removed from this list, if present- Returns:
true
if this list contained the specified element
-
iterator
- Specified by:
iterator
in interfaceIterable<VoxelizedMarkMemo>
-
set
Replaces the element at the specified position in this list with the specified element.- Parameters:
index
- index of the element to replaceelement
- element to be stored at the specified position- Returns:
- the element previously at the specified position
- Throws:
IndexOutOfBoundsException
- if the index is out of range
-
equals
-
canEqual
-
hashCode
public int hashCode()
-