Test if an interval precedes another.
@param that interval
@return true if this interval (upper endpoint) is before that (lower
endpoint)
@see #after(org.nmdp.ngs.fca.Interval)
545931
public boolean before(final Interval<C> that) {
        if(this.hasNone() || that.hasNone()) {
            return false;
        }
        return this.dimension == that.dimension &&
               this.range.upperEndpoint().compareTo(that.range.lowerEndpoint()) < 0;
    }
1224351
protected List<Intervalable> checkForOverlaps(Intervalable interval, Direction direction)
    {

        List<Intervalable> overlaps = new ArrayList<Intervalable>();
        for (Intervalable currentInterval : this.intervals)
        {
            switch (direction)
            {
                case LEFT:
                    if (currentInterval.getStart() <= interval.getEnd())
                    {
                        overlaps.add(currentInterval);
                    }
                    break;
                case RIGHT:
                    if (currentInterval.getEnd() >= interval.getStart())
                    {
                        overlaps.add(currentInterval);
                    }
                    break;
            }
        }
        return overlaps;
    }
352462
public boolean isSameOrNewerThan(JavaVersion other) {
        return this.major > other.major || (this.major == other.major && this.minor >= other.minor);
    }
1128840
public boolean isConnected(final Interval<C> that) {
        if(this.hasNone() || that.hasNone()) {
            return false; 
        }
        return this.range.isConnected(that.range);
    }
755605
public boolean isBeforeRange(final Range<T> other) {
        if (other == null) {
            return false;
        }

        return other.lowerEndpoint.isClosed ? isBefore(other.lowerEndpoint.value) : this.upperEndpoint.compareTo(other.lowerEndpoint.value) <= 0;
    }
390607
def contains_interval(self, other):
        
        return (
            self.begin <= other.begin and
            self.end >= other.end
        )
555377
public boolean preceeds(final Operation rightOp)
    {
        if (getLevel() > rightOp.getLevel())
            return true;

        if (getLevel() < rightOp.getLevel())
            return false;

        if (precedence() <= rightOp.precedence())
            return true;

        return false;
    }
1296061
private int compareStarts(Interval<T> other){
		if (start == null && other.start == null)
			return 0;
		if (start == null)
			return -1;
		if (other.start == null)
			return 1;
		int compare = start.compareTo(other.start);
		if (compare != 0)
			return compare;
		if (isStartInclusive ^ other.isStartInclusive)
			return isStartInclusive ? -1 : 1;
		return 0;
	}
1061419
@Override
    public boolean overlaps(Range<T> other) {
        dbc.precondition(other != null, "checking for overlaps between a DenseRange<T> and null");
        if (other instanceof DenseRange == false) {
            return other.overlaps(this);
        }
        return !Order.of(comparator, Optional.of(this.begin()), other.end()).isGte() && !Order.of(comparator, Optional.of(other.begin()), this.end()).isGte();
    }
830420
public Interval<C> behind() {
        if(this.hasNone()) {
            return new Interval(this.dimension, Range.all());
        }
        if(this.range.equals(Range.all())) {
            return new Interval(this.dimension);
        }
        return new Interval(this.dimension,
                            Range.upTo(this.range.lowerEndpoint(),
                            reverse(this.range.lowerBoundType())));
    }
306103
public boolean contains(ChronoInterval<T> interval) {

        // trivial case
        if (interval.isEmpty()) {
            return false;
        }

        T low = interval.getStart().getTemporal();

        if ((low != null) && interval.getStart().isOpen()) {
            low = this.timeLine.stepForward(low);
        }

        List<ChronoInterval<T>> found = new ArrayList<>();
        this.findByEquals(interval, low, found, this.root);
        return !found.isEmpty();

    }
947555
function(that) {
    if (this.sourceString !== that.sourceString) {
      throw errors.intervalSourcesDontMatch();
    }
    assert(this.startIdx >= that.startIdx && this.endIdx <= that.endIdx,
           'other interval does not cover this one');
    return new Interval(this.sourceString,
                        this.startIdx - that.startIdx,
                        this.endIdx - that.startIdx);
  }
223915
public Interval<C> ahead() {
        if(this.hasNone()) {
            return new Interval(this.dimension, Range.all());
        }
        if(this.range.equals(Range.all())) {
            return new Interval(this.dimension);
        }
        return new Interval(this.dimension,
                            Range.downTo(this.range.upperEndpoint(),
                            reverse(this.range.upperBoundType())));
    }
976379
public boolean isTouchedByRange(int globalStartIndex, int globalEndIndex) {
        return ((startIndex >= globalStartIndex) && (startIndex <= globalEndIndex))
                || ((endIndex >= globalStartIndex) && (endIndex <= globalEndIndex))
                || ((startIndex <= globalStartIndex) && (endIndex >= globalEndIndex));

    }
633064
public boolean intersectsWith(Range other) {
        return !other.isEmpty() && !this.isEmpty() &&
                (this.contains(other.lower) || other.contains(this.lower)
                        || (other.upper > upper && other.lower < lower));
    }
1101728
public boolean isWithin(Date date) {
		if(first == null) {
			return false;
		} else if(date.equals(first)) {
			return true;
		} else if(date.equals(last)) {
			return true;
		} else if(date.after(first) && date.before(last)) {
			return true;
		} else {
			return false;
		}
	}
143102
public static boolean valueChanged(String before, String after) {
        if ((before == null && after == null) || after == null) {
            return false;
        }

        if (before == null) {
            return true;
        }

        return !before.trim().equals(after.trim());
    }