Enum ListActivityRepository.IteratorType

java.lang.Object
java.lang.Enum<ListActivityRepository.IteratorType>
com.flexganttfx.model.repository.ListActivityRepository.IteratorType
All Implemented Interfaces:
Serializable, Comparable<ListActivityRepository.IteratorType>
Enclosing class:
ListActivityRepository<A extends Activity>

public static enum ListActivityRepository.IteratorType
extends Enum<ListActivityRepository.IteratorType>
A list of possible iterators that the repository can return when the application queries the repository for the activities within a given time interval.
Since:
1.0
  • Enum Constant Details

    • SIMPLE_ITERATOR

      public static final ListActivityRepository.IteratorType SIMPLE_ITERATOR
      Causes the repository to return the normal list iterator ( List.iterator()), which means that the repository will always return all activities independent of whether they are located within the given time interval.
      Since:
      1.0
    • BINARY_ITERATOR

      public static final ListActivityRepository.IteratorType BINARY_ITERATOR
      Causes the repository to return an instance of type ListActivityRepository.BinarySearchActivityIterator. This type of iterator performs a log-n binary search to find only those activities that are located within the given time interval.
      Since:
      1.0
    • LINEAR_ITERATOR

      public static final ListActivityRepository.IteratorType LINEAR_ITERATOR
      Causes the repository to return an instance of type ListActivityRepository.LinearSearchActivityIterator. This type of iterator performs a left to right (index = 0 to n) within the underlying list to find the first visible activity inside the given time interval. The iterator stops once it reaches an activity with a start time after the given time interval.
  • Method Details

    • values

      public static ListActivityRepository.IteratorType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static ListActivityRepository.IteratorType valueOf​(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null