Comapres this to another Interval
@return {@code 1} if this Interval's lower bound is lower than the argument's, {@code 0} if they are the same, {@code 1} otherwise
761082
@Override
	public int compareTo(Object arg0) {
		if (arg0 instanceof SimpleInterval) {
			SimpleInterval that = (SimpleInterval)arg0;
			return intervalName.compareTo(that.getIntervalName());
		}
		return 0;
	}
1203288
public static Interval fromToBy(int from, int to, int stepBy)
    {
        if (stepBy == 0)
        {
            throw new IllegalArgumentException("Cannot use a step by of 0");
        }
        if (from > to && stepBy > 0 || from < to && stepBy < 0)
        {
            throw new IllegalArgumentException("Step by is incorrect for the range");
        }
        return new Interval(from, to, stepBy);
    }
496115
public boolean overlaps(Interval<E> other)
  {
    if (other == null) return false;
    int comp12 = this.first.compareTo(other.second());
    int comp21 = this.second.compareTo(other.first());
    if (comp12 > 0 || comp21 < 0) {
      return false;
    } else {
      if (comp12 == 0) {
        if (!this.includesBegin() || !other.includesEnd()) {
          return false;
        }
      }
      if (comp21 == 0) {
        if (!this.includesEnd() || !other.includesBegin()) {
          return false;
        }
      }
      return true;
    }
  }
708978
public E poll() {
        final ReentrantLock lock = this.lock;
        lock.lock();
        try {
            E first = q.peek();
            return (first == null || first.getDelay(NANOSECONDS) > 0)
                ? null
                : q.poll();
        } finally {
            lock.unlock();
        }
    }
806432
public Interval intervalTo(TrieNode toNode) {
    return new Interval(toNode.getCursorIndex() - this.getCursorIndex(),
      toNode.getCursorCount(), this.getCursorCount());
  }
31251
public boolean isIntervalComparable(Interval<E> other)
  {
    int flags = getRelationFlags(other);
    if (checkMultipleBitSet(flags & REL_FLAGS_INTERVAL_UNKNOWN)) {
      return false;
    }
    return checkFlagSet(flags, REL_FLAGS_INTERVAL_BEFORE) || checkFlagSet(flags, REL_FLAGS_INTERVAL_AFTER);
  }
600339
function() {
            var lc = this.lc(), l = this.coeffs.length; 
            for(var i=0; i<l; i++) this.coeffs[i] = this.coeffs[i].divide(lc);
            return this;
        }
330223
synchronized boolean removeInterval(Interval i) {
        calcMinDuration = null;
        calcMaxDuration = null;
        calcMinFinish = null;
        calcMaxFinish = null;
        calcMinStart = null;
        calcMaxStart = null;
        shortestDistancesFromTimeZeroSource = null;
        shortestDistancesFromTimeZeroDestination = null;

        if (directedGraph.remove(i.getStart()) != null) {
            if (directedGraph.remove(i.getFinish()) == null) {
                throw new IllegalStateException();
            }
            intervals.remove(i);
            return true;
        } else {
            return false;
        }
    }
965795
@Override
  public int compareTo(V1Annotation that) {
    if (this == that) return 0;
    int byTimestamp = timestamp < that.timestamp ? -1 : timestamp == that.timestamp ? 0 : 1;
    if (byTimestamp != 0) return byTimestamp;
    return value.compareTo(that.value);
  }
1214970
public long getFirstTimeout()
    {
        long lastTimeout = Math.max(System.currentTimeMillis(), start); // d666295

        // If we're already past the end date, then there is no timeout.
        if (lastTimeout > end)
        {
            return -1;
        }

        return getTimeout(lastTimeout, false);
    }
499788
public static Interval reverseOrder(Interval i) {
		return new Interval(i.getLabel(), i.getQuality(), (byte) -i.getDirection());
	}
236884
T getTemporalOfClosedStart() {

        T temporal = this.start.getTemporal();

        if (temporal == null) {
            throw new UnsupportedOperationException(
                "An infinite interval has no finite duration.");
        } else if (this.start.isOpen()) {
            return this.getTimeLine().stepForward(temporal);
        } else {
            return temporal;
        }

    }
161919
public Interval withTimes(LocalTime startTime, LocalTime endTime) {
        requireNonNull(startTime);
        requireNonNull(endTime);
        return new Interval(this.startDate, startTime, this.endDate, endTime, this.zoneId);
    }
369227
@Override
  public int compareTo(Comparable<?> other) {
    if (other instanceof Region) {
      Region r = (Region) other;
      if (this.start < r.start) {
        return -1;
      } else if (this.end > r.end) {
        return 1;
      } else {
        return 0;
      }
    } else if (other instanceof Long) {
      Long l = (Long) other;
      if (l > end) {
          return -1;
      } else if (l < start) {
          return 1;
      } else {
          return 0;
      }
    } else {
      throw new AssertionError();
    }
  }
1268445
public S interval(Long interval) {
        builder.interval(String.valueOf(interval));
        return self;
    }
896266
public NumberExpression<Integer> second() {
        if (seconds == null) {
            seconds = Expressions.numberOperation(Integer.class, Ops.DateTimeOps.SECOND, mixin);
        }
        return seconds;
    }
1170890
public Date getTo() {
        Long to = null;
        for (final TimeInterval interval : intervals) {
            if (to == null) {
                to = interval.getTo();
            } else {
                to = Math.max(interval.getTo(), to);
            }
        }
        if (to != null) {
            return new Date(to);
        }
        return null;
    }