Checks if this word is a prefix of another word.

@param other
the other word

@return {@code true} if this word is a prefix of the other word, {@code false} otherwise.
356060
public boolean isPrefixOf(Word<?> other) {
        int len = length(), otherLen = other.length();
        if (otherLen < len) {
            return false;
        }

        for (int i = 0; i < len; i++) {
            I sym1 = getSymbol(i);
            Object sym2 = other.getSymbol(i);

            if (!Objects.equals(sym1, sym2)) {
                return false;
            }
        }
        return true;
    }
312025
public boolean negates( IAssertion other)
    {
    Assert assertion =
      other != null && other.getClass().equals( Assert.class)
      ? (Assert) other
      : null;

    return
      assertion != null
      && assertion.getProperty().equals( getProperty());
    }
972198
private boolean isNotCompound(String word) throws IOException {
    List<String> probablyCorrectWords = new ArrayList<>();
    List<String> testedTokens = new ArrayList<>(2);
    for (int i = 2; i < word.length(); i++) {
      // chop from left to right
      final String first = word.substring(0, i);
      final String second = word.substring(i, word.length());
      if (prefixes.contains(first.toLowerCase(conversionLocale))
              && !isMisspelled(speller1, second)
              && second.length() > first.length()) { // but not for short words such as "premoc"
        // ignore this match, it's fine
        probablyCorrectWords.add(word); // FIXME: some strange words are being accepted, like prekupa
      } else {
        testedTokens.clear();
        testedTokens.add(first);
        testedTokens.add(second);
        List<AnalyzedTokenReadings> taggedToks =
                language.getTagger().tag(testedTokens);
        if (taggedToks.size() == 2
                // "białozielony", trzynastobitowy
                && (taggedToks.get(0).hasPosTag("adja")
                || (taggedToks.get(0).hasPosTag("num:comp")
                   && !taggedToks.get(0).hasPosTag("adv")))
                && taggedToks.get(1).hasPartialPosTag("adj:")) {
          probablyCorrectWords.add(word);
        }
      }
    }
    if (!probablyCorrectWords.isEmpty()) {
      addIgnoreTokens(probablyCorrectWords);
      return false;
    }
    return true;
  }
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));
    }
770717
def cmp(other)
			if (!other.kind_of?(Mask128))
				raise ArgumentError, "Expected an Mask128 object for 'other' but got a #{other.class}."
			end
			if (self.prefix_len < other.prefix_len)
				return 1
			elsif (self.prefix_len > other.prefix_len)
				return -1
			end
			return 0
		end
1166587
public boolean overlaps(Span other) {
      return other != null && this.start() < other.end() && this.end() > other.start();
   }
287997
public boolean isSuperset(SmallSet<E> other) {
        if (this.list.size() < other.list.size()) {
            return false;
        }
        int j = 0;
        for (int i=0; i<list.size() && j<other.list.size(); i++) {
            E e1 = this.list.get(i);
            E e2 = other.list.get(j);
            int diff = e1.compareTo(e2);
            if (diff == 0) {
                // Equal entries. Just continue.
                j++;
                continue;
            } else if (diff > 0) {
                // e1 is greater than e2, which means e2 must not appear in this.list.
                return false;
            } else {
                // e1 is less than e2, so e2 might appear later in this.list.
                continue;
            }
        }
        if (j == other.list.size()) {
            return true;
        } else {
            return false;
        }
    }
1050357
public boolean sameAs(BlockType other) {
        if (!this.isValid) {
            return !other.isValid && (this.isTop == other.isTop);
        } else {
            if (!other.isValid) {
                return false;
            } else {
                // Both facts are valid
                if (this.depth != other.depth) {
                    return false;
                }

                // Compare bits
                for (int i = 0; i < this.depth; ++i) {
                    if (this.get(i) != other.get(i)) {
                        return false;
                    }
                }

                return true;
            }
        }
    }
1199040
public boolean containsAll(final LongHashSet other) {
        final LongIterator iterator = other.iterator();
        while (iterator.hasNext()) {
            if (!contains(iterator.nextValue())) {
                return false;
            }
        }
        return true;
    }
1010409
public boolean hasNext() {
		if(done) return false;
		if(cachedNext != null) {
			return true;
		}
		while(inner.hasNext()) {
			String tmp = inner.next();
			if(tmp.startsWith(prefix)) {
				cachedNext = tmp;
				return true;
			} else if(tmp.compareTo(prefix) > 0) {
				done = true;
				return false;
			}
		}
		return false;
	}
209469
public boolean equalsExact(Ort other) {
        return Objects.equals(this.plz, other.plz) && this.name.equals(other.name);
    }
1037144
public boolean same(MimeType other) {
	if (this == other) return true;
	return getTypeNotNull().equals(other.getTypeNotNull()) && getSubtypeNotNull().equals(other.getSubtypeNotNull());
    }
829955
public boolean isAdjacent(Marker other)
    {
        checkTypeCompatibility(other);
        if (isUpperUnbounded() || isLowerUnbounded() || other.isUpperUnbounded() || other.isLowerUnbounded()) {
            return false;
        }
        if (type.compareTo(valueBlock.get(), 0, other.valueBlock.get(), 0) != 0) {
            return false;
        }
        return (bound == Bound.EXACTLY && other.bound != Bound.EXACTLY) ||
                (bound != Bound.EXACTLY && other.bound == Bound.EXACTLY);
    }
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;
	}
577216
public boolean contains(Envelope3D other) {// Note: Will return False, if either envelope is empty.
		return other.xmin >= xmin && other.xmax <= xmax && other.ymin >= ymin && other.ymax <= ymax && other.zmin >= zmin && other.zmax <= zmax;
	}
888154
public boolean contains(String name) {
        if (name == null) {
            throw new IllegalArgumentException("Other cannot be null");
        }

        if (this.name.equals(name)) {
            return true;
        }

        if (hasReferences()) {
            for (Marker ref : referenceList) {
                if (ref.contains(name)) {
                    return true;
                }
            }
        }
        return false;
    }
1282287
public boolean sameAs(Frame<ValueType> other) {
        if (isTop != other.isTop) {
            return false;
        }

        if (isTop && other.isTop) {
            return true;
        }

        if (isBottom != other.isBottom) {
            return false;
        }

        if (isBottom && other.isBottom) {
            return true;
        }

        if (getNumSlots() != other.getNumSlots()) {
            return false;
        }

        for (int i = 0; i < getNumSlots(); ++i) {
            if (!getValue(i).equals(other.getValue(i))) {
                return false;
            }
        }

        return true;
    }