android/guava/src/com/google/common/collect/Range.java
public boolean encloses(Range<C> other) {
    return lowerBound.compareTo(other.lowerBound) <= 0
        && upperBound.compareTo(other.upperBound) >= 0;
  }
public boolean encloses(Range<C> other) {
    return lowerBound.compareTo(other.lowerBound) <= 0
        && upperBound.compareTo(other.upperBound) >= 0;
  }
public boolean encloses ( Range < C > other ) { return lowerBound . compareTo ( other . lowerBound ) <= 0 && upperBound . compareTo ( other . upperBound ) >= 0 ; }
Returns {@code true} if the bounds of {@code other} do not extend outside the bounds of this
range. Examples:

<ul>
<li>{@code [3..6]} encloses {@code [4..5]}
<li>{@code (3..6)} encloses {@code (3..6)}
<li>{@code [3..6]} encloses {@code [4..4)} (even though the latter is empty)
<li>{@code (3..6]} does not enclose {@code [3..6]}
<li>{@code [4..5]} does not enclose {@code (3..6)} (even though it contains every value
contained by the latter range)
<li>{@code [3..6]} does not enclose {@code (1..1]} (even though it contains every value
contained by the latter range)
</ul>

<p>Note that if {@code a.encloses(b)}, then {@code b.contains(v)} implies {@code
a.contains(v)}, but as the last two examples illustrate, the converse is not always true.

<p>Being reflexive, antisymmetric and transitive, the {@code encloses} relation defines a
<i>partial order</i> over ranges. There exists a unique {@linkplain Range#all maximal} range
according to this relation, and also numerous {@linkplain #isEmpty minimal} ranges. Enclosure
also implies {@linkplain #isConnected connectedness}.
Returns { @code true } if the bounds of { @code other } do not extend outside the bounds of this range . Examples :