Returns the logical AND of this term with the specified
term.

@param other the term to and this term with.
@return the result of ANDing this term with the specified term
497388
public BooleanTerm andWith(BooleanTerm other) {
		if (isFalse() || other.isFalse()) {
			// anding with false, the result is false
			return BooleanTerm.FALSE;
		}
		if (other.isTrue()) {
			// anding with true, the result is unchanged
			return this;
		}
		if (isTrue()) {
			// anding with true, other is unchanged
			return other;
		}
		Set<BooleanVar> result = new HashSet<BooleanVar>(this);
		for (BooleanVar var : other) {
			if (result.contains(var.negate())) {
				// If the same term has the same var with opposite states
				// then the resulting term is false;
				return BooleanTerm.FALSE;
			}
			result.add(var);
		}
		return new BooleanTerm(result);
	}
644259
protected boolean semanticallyEquivalent(BioPAXElement other)
	{
		final xref anXref = (xref) other;

		return
			(DB != null ?
				DB.equalsIgnoreCase(anXref.getDB()) :
				anXref.getDB() == null)
				&&
				(ID != null ?
					ID.equalsIgnoreCase(anXref.getID()) :
					anXref.getID() == null)
				&&
				(DB_VERSION != null ?
					DB_VERSION.equalsIgnoreCase(anXref.getDB_VERSION()) :
					anXref.getDB_VERSION() == null)
				&&
				(ID_VERSION != null ?
					ID_VERSION.equalsIgnoreCase(anXref.getID_VERSION()) :
					anXref.getID_VERSION() != null);
	}
895988
public boolean matches(T other) {
    if (matchAny) {
      return true;
    } else if (other == null) {
      return negation ? value != null : value == null;
    } else {
      if (value instanceof byte[]) {
        boolean equal = Arrays.equals((byte[]) value, (byte[]) other);
        return negation ? !equal : equal;
      }
      return negation ? !Objects.equals(value, other) : Objects.equals(value, other);
    }
797521
def satisfies(self, other):  # type: (Term) -> bool
        
        return (
            self.dependency.name == other.dependency.name
            and self.relation(other) == SetRelation.SUBSET
        )
693407
public static <T> Predicate<T> AND(final Predicate<T> a, final Predicate<T> b) {
	return new Predicate<T>() {
	    public boolean check(T obj) {
		return a.check(obj) && b.check(obj);
	    }
	};
    }
693406
public static ListValue of(String first, String... other) {
    return newBuilder().addValue(first, other).build();
  }
33510
public function logicalOr(self $other){
		
		$l = \max(array($this->count(), $other->count()));
		$new = new static();
		
		for($i = 0; $i < $l; ++$i){
			
			if(isset($this[$i]) && $other[$i]){
				$new[$i] = true;
			}
			else if(isset($other[$i]) && $other[$i]){
				$new[$i] = true;
			}
			else{
				$new[$i] = false;
			}
			
		}
		
		return $new;
		
	}
947646
public boolean isMetBy(LocalProperties other) {
		if (this.ordering != null) {
			// we demand an ordering
			return other.getOrdering() != null && this.ordering.isMetBy(other.getOrdering());
		} else if (this.groupedFields != null) {
			// check if the other fields are unique
			if (other.getGroupedFields() != null && other.getGroupedFields().isValidUnorderedPrefix(this.groupedFields)) {
				return true;
			} else  {
				return other.areFieldsUnique(this.groupedFields);
			}
		} else {
			return true;
		}
	}
295304
public boolean isInGroup(final String other) {
        return ParserRegistry.getParser(group).getGroup().equals(ParserRegistry.getParser(other).getGroup());
    }
854057
Expr and() {
		Expr expr = equalNotEqual();
		for (Tok tok=peek(); tok.sym==Sym.AND; tok=peek()) {
			move();
			expr = new Logic(Sym.AND, expr, equalNotEqual(), location);
		}
		return expr;
	}
831285
public static SMARTSAtom or(IQueryAtom left, IQueryAtom right) {
        return new Disjunction(left.getBuilder(), left, right);
    }
195171
def resolve(self, other: Type) -> Optional[Type]:
        """"""
        if not isinstance(other, NltkComplexType):
            return None
        if not isinstance(other.second, NltkComplexType):
            return None
        other_first = other.first.resolve(other.second.first)
        if other_first is None:
            return None
        other_first = other_first.resolve(other.second.second)
        if not other_first:
            return None
        other_second = other.second.resolve(ComplexType(other_first, other_first))
        if not other_second:
            return None
        return BinaryOpType(other_first, self._allowed_substitutions, self._signature)
203238
public boolean match(MimeType other) {
	if (this == other) return true;
	if (type != null && other.type != null && !type.equals(other.type)) return false;
	if (subtype != null && other.subtype != null && !subtype.equals(other.subtype)) return false;
	return true;
    }
225876
public boolean add(ModuleDepInfo other) {
		Boolean modified = false;
		if (formula.isTrue()) {
			// No terms added to a true formula will change the evaluation.
			return false;
		}
		if (other.formula.isTrue()) {
			// Adding true to this formula makes this formula true.
			modified = !formula.isTrue();
			formula = new BooleanFormula(true);
			if (modified && other.comment != null && other.commentTermSize < commentTermSize) {
				comment = other.comment;
				commentTermSize = other.commentTermSize;
			}
			return modified;
		}
		// Add the terms
		modified = formula.addAll(other.formula);

		// Copy over plugin name if needed
		if (!isPluginNameDeclared && other.isPluginNameDeclared) {
			pluginName = other.pluginName;
			isPluginNameDeclared = true;
			modified = true;
		}
		// And comments...
		if (other.comment != null && other.commentTermSize < commentTermSize) {
			comment = other.comment;
			commentTermSize = other.commentTermSize;
		}
		return modified;
	}
539374
@Nullable
    public T orElse(@Nullable T other) {
        return value != null ? value : other;
    }
991723
public static Number and(Number left, Number right) {
        return NumberMath.and(left, right);
    }
721633
public Filter<S> mergeRemainderFilter(FilteringScore<S> other) {
        Filter<S> thisRemainderFilter = getRemainderFilter();

        if (this == other) {
            return thisRemainderFilter;
        }

        Filter<S> otherRemainderFilter = other.getRemainderFilter();

        if (thisRemainderFilter == null) {
            return otherRemainderFilter;
        } else if (otherRemainderFilter == null) {
            return thisRemainderFilter;
        } else if (thisRemainderFilter.equals(otherRemainderFilter)) {
            return thisRemainderFilter;
        } else {
            return thisRemainderFilter.or(otherRemainderFilter);
        }
    }