Checks if this HString encloses the given other.

@param other The other HString
@return True of this one encloses the given other.
501390
public final boolean encloses(HString other) {
      if (other == null) {
         return false;
      }
      return (document() != null && other.document() != null) &&
                (document() == other.document())
                && super.encloses(other);
   }
773688
def merge(self, other):
        
        other = StringCell.coerce(other)
        if self.is_equal(other):
            # pick among dependencies
            return self
        elif other.is_entailed_by(self):
            return self
        elif self.is_entailed_by(other):
            self.value = other.value
        elif self.is_contradictory(other):
            raise Contradiction("Cannot merge string '%s' with '%s'" % \
                    (self, other))
        else:
            self._perform_merge(other)
        return self
914152
public boolean intersectsWithOrTouches(Range other) {
        return contains(other.lower) || contains(other.upper - 1) || (other.upper > upper && other.lower < lower) ||
                other.lower == upper || other.upper == lower;
    }
518788
@Override
    public boolean endsWith(final Path other) {
        // Precondition checks
        if (other == null) {
            throw new IllegalArgumentException("other path must be specified");
        }
        // Unequal FS? (also ensures that we can safely cast to this type later)
        if (this.getFileSystem() != other.getFileSystem()) {
            return false;
        }
        final List<String> ourTokens = tokenize(this);
        final List<String> otherTokens = tokenize((ShrinkWrapPath) other);

        // Bigger than us, fails
        final int numOtherTokens = otherTokens.size();
        if (numOtherTokens > ourTokens.size()) {
            return false;
        }

        // Difference in component size
        final int differential = ourTokens.size() - numOtherTokens;
        // Given an absolute?
        if (other.isAbsolute()) {
            // We must have the same number of elements
            if (differential != 0) {
                return false;
            }
        }
        // Compare all components
        for (int i = numOtherTokens - 1; i >= 0; i--) {
            if (!ourTokens.get(i + differential).equals(otherTokens.get(i))) {
                // Any tokens don't match, punt
                return false;
            }
        }

        // All conditions met
        return true;
    }
124848
function (other) {
        assertNotNull(other);

        if (this.count() === 0) {
            this.unionWith(other);
            return;
        }

        else if (other === this) {
            this.clear();
            return;
        }

        // If other is a HashSet, it has unique elements according to its equality comparer,
        // but if they're using different equality comparers, then assumption of uniqueness
        // will fail. So first check if other is a hashset using the same equality comparer;
        // symmetric except is a lot faster if we can assume uniqueness

        if (areEqualityComparersEqual(this, other)) {
            var table = this.table;

            forOf(other, function (element) {
                if (!table.remove(element)) {
                    table.add(element, null);
                }
            });
        }
        else {
            this.symmetricExceptWith(new HashSet(other, this.comparer));
        }
    }
140006
public boolean guidMatches(Rule other) {
		if (other == null) {
			throw new IllegalArgumentException("other must be non-null");
		}

		boolean matches = true;

		matches &= (guid != null) ? guid.equals(other.getGuid()) : true;

		return matches;
	}
1168665
public boolean canMerge(Space other) {
		if (!hasJoinedEdge(other)) {
			return false;
		}
		
		if ((x == other.x) && (width == other.width)) {
			return true;
		}
		if ((y == other.y) && (height == other.height)) {
			return true;
		}
		
		return false;
	}
427752
public boolean similar(Object other) {
        if (!(other instanceof JSONArray)) {
            return false;
        }
        int len = this.length();
        if (len != ((JSONArray)other).length()) {
            return false;
        }
        for (int i = 0; i < len; i += 1) {
            Object valueThis = this.get(i);
            Object valueOther = ((JSONArray)other).get(i);
            if (valueThis instanceof JSONObject) {
                if (!((JSONObject)valueThis).similar(valueOther)) {
                    return false;
                }
            } else if (valueThis instanceof JSONArray) {
                if (!((JSONArray)valueThis).similar(valueOther)) {
                    return false;
                }
            } else if (!valueThis.equals(valueOther)) {
                return false;
            }
        }
        return true;
    }
1346930
public boolean isIntersecting(Envelope2D other) {
		// No need to check if empty, this will work for empty envelopes too
		// (IEEE math)
		return ((xmin <= other.xmin) ? xmax >= other.xmin : other.xmax >= xmin)
				&& // check that x projections overlap
				((ymin <= other.ymin) ? ymax >= other.ymin : other.ymax >= ymin); // check
																					// that
																					// y
																					// projections
																					// overlap
	}
1134589
public boolean isIntersecting(Envelope3D other) {
		return !isEmpty() && !other.isEmpty() && ((xmin <= other.xmin) ? xmax >= other.xmin : other.xmax >= xmin) && // check that x projections overlap
			((ymin <= other.ymin) ? ymax >= other.ymin : other.ymax >= ymin) && // check that y projections overlap
			((zmin <= other.zmin) ? zmax >= other.zmin : other.zmax >= zmin); // check that z projections overlap
	}
1037144
public boolean same(MimeType other) {
	if (this == other) return true;
	return getTypeNotNull().equals(other.getTypeNotNull()) && getSubtypeNotNull().equals(other.getSubtypeNotNull());
    }
149919
public boolean conflictsWith(OptionalBoolean other) {
		return state == State.CONFLICTING
			|| other.state == State.CONFLICTING
			|| (state == State.TRUE && other.state == State.FALSE)
			|| (state == State.FALSE && other.state == State.TRUE);
	}
988682
public boolean isConsistentWith(final BaseBankCardTrackData other)
  {
    if (this == other)
    {
      return true;
    }
    if (other == null)
    {
      return false;
    }
    boolean equals = true;

    if (hasAccountNumber() && other.hasAccountNumber())
    {
      if (!getAccountNumber().equals(other.getAccountNumber()))
      {
        equals = false;
      }
    }

    if (hasExpirationDate() && other.hasExpirationDate())
    {
      if (!getExpirationDate().equals(other.getExpirationDate()))
      {
        equals = false;
      }
    }

    if (hasServiceCode() && other.hasServiceCode())
    {
      if (!getServiceCode().equals(other.getServiceCode()))
      {
        equals = false;
      }
    }

    return equals;
  }
1053439
def is_subset(self, other):
		
		if isinstance(other, _basebag):
			for elem, count in self.counts():
				if not count <= other.count(elem):
					return False
		else:
			for elem in self:
				if self.count(elem) > 1 or elem not in other:
					return False
		return True
223714
public boolean precedesForAllOffsetTypesInBoth(final OffsetGroup other) {
    return charOffset().precedes(other.charOffset())
        && edtOffset().precedes(other.edtOffset())
        && (!byteOffset().isPresent() || !other.byteOffset().isPresent()
                || byteOffset().get().precedes(other.byteOffset().get()))
        && (!asrTime().isPresent() || !other.asrTime().isPresent()
                || asrTime().get().precedes(other.asrTime().get()));
  }
1259903
public final boolean matchEncoding(final EnhancedMimeType other) {
        return match(other) && Objects.equals(getEncoding(), other.getEncoding());

    }
1157869
def contains(self, other):
        
        if not isinstance(other, Period):
            other = period(other)
        return self.start <= other.start and self.stop >= other.stop