Klasse IntervalTree<A extends Activity>
java.lang.Object
com.flexganttfx.model.util.IntervalTree<A>
- Typparameter:
A- the activity type
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungfinal booleanAdds an activity to the tree.final voidclear()Removes all activities from the tree.final InstantReturns the earliest time used by all activities currently stored inside the tree.final Collection<A> getIntersectingObjects(long start, long end) Returns all activities found within the given time interval.final Collection<A> getIntersectingObjects(TimeInterval interval) Returns all activities found within the given time interval.final InstantReturns the latest time used by all activities currently stored inside the tree.final booleanMethod to remove period/key object from tree.final booleanfinal Collection<A> removePeriod(TimeInterval interval) Removes all activities found within the given time interval.final longsize()Returns the number of activities stored inside the tree.
-
Konstruktordetails
-
IntervalTree
public IntervalTree()
-
-
Methodendetails
-
getEarliestTimeUsed
Returns the earliest time used by all activities currently stored inside the tree.- Gibt zurück:
- the earliest time used
-
getLatestTimeUsed
Returns the latest time used by all activities currently stored inside the tree.- Gibt zurück:
- the latest time used
-
add
Adds an activity to the tree.- Parameter:
activity- the activity to add- Gibt zurück:
- true if the activity could be added
-
remove
Method to remove period/key object from tree. Entry to delete will be found by period and key values of given activity (not by given object reference).- Parameter:
activity- the activity to remove- Gibt zurück:
- true if the activity was a member of this tree
-
removeIf
-
removePeriod
Removes all activities found within the given time interval.- Parameter:
interval- the time interval- Gibt zurück:
- the removed activities
-
getIntersectingObjects
Returns all activities found within the given time interval.- Parameter:
interval- the time interval- Gibt zurück:
- the found activities
-
getIntersectingObjects
Returns all activities found within the given time interval.- Parameter:
start- the time interval startend- the time interval end- Gibt zurück:
- the found activities
-
size
public final long size()Returns the number of activities stored inside the tree.- Gibt zurück:
- the tree size
-
clear
public final void clear()Removes all activities from the tree.
-