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 TypeMethodDescriptionbooleanAppends the specified element to the end of this list.voidaddAll(MemoForIndex src) Adds all elements from anotherMemoForIndexto this list.protected booleanbooleanget(int index) Returns the element at the specified position in this list.getMemoForIndex(int index) Retrieves theVoxelizedMarkMemofor the specified index.inthashCode()iterator()remove(int index) Removes the element at the specified position in this list.booleanremove(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.intsize()Returns the number of elements in this list.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
MemoList
public MemoList()
-
-
Method Details
-
addAll
Adds all elements from anotherMemoForIndexto this list.- Parameters:
src- the sourceMemoForIndexto add elements from
-
getMemoForIndex
Description copied from interface:MemoForIndexRetrieves theVoxelizedMarkMemofor the specified index.- Specified by:
getMemoForIndexin interfaceMemoForIndex- Parameters:
index- the index of the desired memo, must be non-negative and less thanMemoForIndex.size()- Returns:
- the
VoxelizedMarkMemocorresponding to the given index
-
size
public int size()Returns the number of elements in this list.- Specified by:
sizein 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:
trueif this list contained the specified element
-
iterator
- Specified by:
iteratorin 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()
-