Class MemoList

Object
MemoList
All Implemented Interfaces:
Iterable<VoxelizedMarkMemo>, MemoForIndex

public class MemoList extends Object implements MemoForIndex, Iterable<VoxelizedMarkMemo>
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 Details

    • MemoList

      public MemoList()
  • Method Details

    • addAll

      public void addAll(MemoForIndex src)
      Adds all elements from another MemoForIndex to this list.
      Parameters:
      src - the source MemoForIndex to add elements from
    • getMemoForIndex

      public VoxelizedMarkMemo getMemoForIndex(int index)
      Description copied from interface: MemoForIndex
      Retrieves the VoxelizedMarkMemo for the specified index.
      Specified by:
      getMemoForIndex in interface MemoForIndex
      Parameters:
      index - the index of the desired memo, must be non-negative and less than MemoForIndex.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 interface MemoForIndex
      Returns:
      the number of elements in this list
    • get

      public VoxelizedMarkMemo get(int index)
      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

      public boolean add(VoxelizedMarkMemo e)
      Appends the specified element to the end of this list.
      Parameters:
      e - element to be appended to this list
      Returns:
      true (as specified by Collection.add(E))
    • remove

      public VoxelizedMarkMemo remove(int index)
      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

      public boolean remove(VoxelizedMarkMemo memo)
      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

      public Iterator<VoxelizedMarkMemo> iterator()
      Specified by:
      iterator in interface Iterable<VoxelizedMarkMemo>
    • set

      public VoxelizedMarkMemo set(int index, VoxelizedMarkMemo element)
      Replaces the element at the specified position in this list with the specified element.
      Parameters:
      index - index of the element to replace
      element - 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

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object