Module com.flexganttfx.model
Package com.flexganttfx.model.repository
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 Summary
Enum Constants Enum Constant Description BINARY_ITERATOR
Causes the repository to return an instance of typeListActivityRepository.BinarySearchActivityIterator
.LINEAR_ITERATOR
Causes the repository to return an instance of typeListActivityRepository.LinearSearchActivityIterator
.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.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ListActivityRepository.IteratorType
valueOf(String name)
Returns the enum constant of this type with the specified name.static ListActivityRepository.IteratorType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
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 typeListActivityRepository.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 typeListActivityRepository.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 Detail
-
values
public static ListActivityRepository.IteratorType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ListActivityRepository.IteratorType c : ListActivityRepository.IteratorType.values()) System.out.println(c);
- 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 nameNullPointerException
- if the argument is null
-
-