Klasse IntervalTreeActivityRepository<A extends Activity>

Typparameter:
A - the activity type
Alle implementierten Schnittstellen:
ActivityRepository<A>, MutableActivityRepository<A>, EventTarget

public class IntervalTreeActivityRepository<A extends Activity> extends MutableActivityRepositoryBase<A>
A repository implementation that utilizes binary interval trees to store its activities. A binary tree provides the best performance when searching for activities within a given time interval when the total number of activities is very large. The repository manages one binary tree per layer.
Seit:
1.0
Siehe auch:
  • Konstruktordetails

    • IntervalTreeActivityRepository

      public IntervalTreeActivityRepository()
  • Methodendetails

    • addActivity

      public final void addActivity(ActivityRef<A> activityRef)
      Beschreibung aus Schnittstelle kopiert: MutableActivityRepository
      Adds the given activity to the repository.
      Parameter:
      activityRef - the activity
    • removeActivity

      public final void removeActivity(ActivityRef<A> activityRef)
      Beschreibung aus Schnittstelle kopiert: MutableActivityRepository
      Removes the given activity from the repository.
      Parameter:
      activityRef - the activity
    • clearActivities

      public final void clearActivities()
      Beschreibung aus Schnittstelle kopiert: MutableActivityRepository
      Removes all activities from all layers from the repository.
    • clearActivities

      public final void clearActivities(Layer layer)
      Beschreibung aus Schnittstelle kopiert: MutableActivityRepository
      Removes the activities on the given layer from the repository.
      Parameter:
      layer - the layer to clear
    • getEarliestTimeUsed

      public final Instant getEarliestTimeUsed()
      Beschreibung aus Schnittstelle kopiert: ActivityRepository
      Returns the earliest time used by the activities stored in this repository / on this row. This method gets used for navigation (e.g. "scroll to earliest time used in the Gantt chart", "zoom out to show all activities").
      Angegeben von:
      getEarliestTimeUsed in Schnittstelle ActivityRepository<A extends Activity>
      Setzt außer Kraft:
      getEarliestTimeUsed in Klasse ActivityRepositoryBase<A extends Activity>
      Gibt zurück:
      the earliest time used by the activities in this repository / row (null if no activities found)
    • getLatestTimeUsed

      public final Instant getLatestTimeUsed()
      Beschreibung aus Schnittstelle kopiert: ActivityRepository
      Returns the latest time used by the activities stored in this repository / on this row. This method gets used for navigation (e.g. "scroll to latest time used in the Gantt chart", "zoom out to show all activities").
      Angegeben von:
      getLatestTimeUsed in Schnittstelle ActivityRepository<A extends Activity>
      Setzt außer Kraft:
      getLatestTimeUsed in Klasse ActivityRepositoryBase<A extends Activity>
      Gibt zurück:
      the latest time used by the activities in this repository / row (null if no activities found)
    • getActivities

      public final Iterator<A> getActivities(Layer layer, Instant startTime, Instant endTime, TemporalUnit temporalUnit, ZoneId zoneId)
      Beschreibung aus Schnittstelle kopiert: ActivityRepository
      Returns an iterator for iterating over all activities found for the given layer and time interval. This method has to return very fast as it gets called many times during rendering of the chart. A slow implementation will have a direct impact on scrolling / rendering performance.
      Parameter:
      layer - the layer for which to return the activities
      startTime - the start time of the time interval for which to return the activities
      endTime - the end time of the time interval for which to return the activities
      temporalUnit - the temporal unit currently displayed in the dateline
      zoneId - the timezone currently displayed in the dateline
      Gibt zurück:
      the activities on the given layer and in the given time interval
    • getAllActivities

      public final List<A> getAllActivities()
      Returns all activities for all layers.
      Gibt zurück:
      all activities
      Seit:
      1.0