Gets a set of intervals representing the times that are NOT represented
in this timeline.

@return
546705
public SortedSet<TimeInterval> getTimeGapIntervals() {
		SortedSet<TimeInterval> flattenedIntervals = getFlattenedIntervals();
		SortedSet<TimeInterval> gaps = new TreeSet<TimeInterval>();

		TimeInterval previous = null;
		for (TimeInterval timeInterval : flattenedIntervals) {
			if (previous != null) {
				long from = previous.getTo();
				long to = timeInterval.getFrom();
				TimeInterval gap = new TimeInterval(from, to);
				gaps.add(gap);
			}
			previous = timeInterval;
		}

		return gaps;
	}
1275745
public static List<Interval> combine(List<Interval> intervals) {
        List<Interval> combined = new ArrayList<Interval>();
        Collections.sort(intervals);
        int len = intervals.size();
        for (int i = 0; i < len; i++) {
            combined.add(intervals.get(i));

            int j;
            for (j = i + 1; j < len; j++) {
                if (intervals.get(i).stop >= intervals.get(j).start) {
                    intervals.get(i).stop = intervals.get(j).stop;
                } else {
                    break;
                }
            }
            i = j - 1;
        }

        return combined;
    }
597574
public int determineMedian(List<Intervalable> intervals)
    {
        int start = -1;
        int end = -1;
        for (Intervalable interval : intervals)
        {
            int currentStart = interval.getStart();
            int currentEnd = interval.getEnd();
            if (start == -1 || currentStart < start)
            {
                start = currentStart;
            }
            if (end == -1 || currentEnd > end)
            {
                end = currentEnd;
            }
        }
        return (start + end) / 2;
    }
358335
@Override
  public long getNextIncludedTime (final long nTimeStamp)
  {

    // Call base calendar implementation first
    long timeStamp = nTimeStamp;
    final long baseTime = super.getNextIncludedTime (timeStamp);
    if ((baseTime > 0) && (baseTime > timeStamp))
    {
      timeStamp = baseTime;
    }

    // Get timestamp for 00:00:00
    final Calendar day = getStartOfDayJavaCalendar (timeStamp);
    while (isTimeIncluded (day.getTime ().getTime ()) == false)
    {
      day.add (Calendar.DATE, 1);
    }

    return day.getTime ().getTime ();
  }
1090295
public List<SchedulerListener> getInternalSchedulerListeners() {

    synchronized (internalSchedulerListeners) {
      return java.util.Collections.unmodifiableList(
          new ArrayList<SchedulerListener>(internalSchedulerListeners));
    }
  }
232874
public List<T> getMostFrequentAll()
    {
        List<T> ret = new ArrayList<T>();
        int maxfreq = getMaximalFrequency();
        for (Map.Entry<T, Integer> entry : styles.entrySet())
        {
            if (entry.getValue() == maxfreq)
                ret.add(entry.getKey());
        }
        return ret;
    }
1067480
public IntervalCollection<T> intersect(IntervalCollection<T> other) {

        if (this.isEmpty() || other.isEmpty()) {
            List<ChronoInterval<T>> zero = Collections.emptyList();
            return this.create(zero);
        }

        List<ChronoInterval<T>> list = new ArrayList<>();

        for (ChronoInterval<T> a : this.intervals) {
            for (ChronoInterval<T> b : other.intervals) {
                List<ChronoInterval<T>> candidates = new ArrayList<>(2);
                candidates.add(a);
                candidates.add(b);
                candidates.sort(this.getComparator());
                candidates = this.intersect(candidates);
                if (!candidates.isEmpty()) {
                    list.addAll(candidates);
                }
            }
        }

        list.sort(this.getComparator());
        return this.create(list).withBlocks();

    }
1222589
public int[] getDurations() {
		int[] durations = new int[frames.size()];
		for (int i=0;i<frames.size();i++) {
			durations[i] = getDuration(i);
		}
		
		return durations;
	}
355487
public long getNextIncludedTime (final long timeStamp)
  {
    if (timeStamp <= 0)
      throw new IllegalArgumentException ("timeStamp must be greater 0");

    if (m_aBaseCalendar != null)
    {
      return m_aBaseCalendar.getNextIncludedTime (timeStamp);
    }

    return timeStamp;
  }
402308
public DiscreteInterval getNanoTime() {
        long granularity = getGranularity();
        long err = granularity / 2;
        if (granularity % 2 == 1) err += 1;
        long now = env.nanoTime() + getOffset();
        return new DiscreteInterval(now - err, now + err);
    }
677961
public Set<NFAState<T>> getNonEpsilonDestinations()
    {
        Set<NFAState<T>> set = new HashSet<>();
        for (CharRange range : transitions.keySet())
        {
            if (range != null)
            {
                Set<Transition<NFAState<T>>> set2 = transitions.get(range);
                for (Transition<NFAState<T>> tr : set2)
                {
                    set.add(tr.getTo());
                }
            }
        }
        return set;
    }
1001593
public List<ScheduleRotation> getRotations() {
        if (getTimeZone() != null && rotations != null)
            for (ScheduleRotation scheduleRotation : rotations)
                scheduleRotation.setScheduleTimeZone(getTimeZone());
        return rotations;
    }
526037
public ChronoInterval<T> getRange() {

        Boundary<T> start = Boundary.infinitePast();
        Boundary<T> end = Boundary.infiniteFuture();

        T min = this.getMinimum();
        T max = this.getMaximum();

        if (min != null) {
            start = Boundary.ofClosed(min);
        }

        if (max != null) {
            if (this.isCalendrical()) {
                end = Boundary.ofClosed(max);
            } else {
                T max2 = this.getTimeLine().stepForward(max);
                if (max2 != null) {
                    end = Boundary.ofOpen(max2);
                } else {
                    end = Boundary.ofClosed(max);
                }
            }
        }

        return this.newInterval(start, end);

    }
989474
public Interval toInterval() {
        DateTimeField field = getField();
        long start = field.roundFloor(getMillis());
        long end = field.add(start, 1);
        Interval interval = new Interval(start, end, getChronology());
        return interval;
    }
1112902
public PeriodConverter[] getPeriodConverters() {
        ConverterSet set = iPeriodConverters;
        PeriodConverter[] converters = new PeriodConverter[set.size()];
        set.copyInto(converters);
        return converters;
    }
727198
public AbstractLongList times(int times) {
	AbstractLongList newList = new LongArrayList(times*size());
	for (int i=times; --i >= 0; ) {
		newList.addAllOfFromTo(this,0,size()-1);
	}
	return newList;
}
117511
public Calendar getTime() {
        Calendar result = Calendar.getInstance();
        result.set(Calendar.HOUR_OF_DAY, hour);
        result.set(Calendar.MINUTE, minute);
        return result;
    }