Creates a new Operator instance for the given parameters,
adds it to the registry and return it

@param operatorId the identification symbol of the operator
@param isNegated true if it is negated

@return the newly created operator
197095
public static Operator addOperatorToRegistry(final String operatorId,
                                                 final boolean isNegated) {
        Operator op = new Operator( operatorId,
                                    isNegated );
        CACHE.put( getKey( operatorId,
                           isNegated ),
                   op );
        return op;
    }
1072504
public static ZoneOperationId of(String zone, String operation) {
    return new ZoneOperationId(null, zone, operation);
  }
969416
public static <T> UnaryOperator<T> unaryOperator(CheckedUnaryOperator<T> operator) {
        return Unchecked.unaryOperator(operator, Unchecked.RETHROW_ALL);
    }
819481
private void assertUnaryOperator(final String operator) {
    if (!("+".equals(operator) || "-".equals(operator) || "~".equals(operator))) {
      throw new JBBPCompilationException("Wrong unary operator '" + operator + "' [" + this.expressionSource + ']');
    }
  }
452108
public static EntityGetOperation<ContentKeyAuthorizationPolicyInfo> get(String contentKeyAuthorizationPolicyId) {
        return new DefaultGetOperation<ContentKeyAuthorizationPolicyInfo>(ENTITY_SET, contentKeyAuthorizationPolicyId,
                ContentKeyAuthorizationPolicyInfo.class);
    }
966073
public static <T> UnaryOperator<T> unaryOperator(CheckedUnaryOperator<T> operator) {
        return unaryOperator(operator, THROWABLE_TO_RUNTIME_EXCEPTION);
    }
1038060
protected String naryOperator(final NAryOperator operator, final String opString) {
        final StringBuilder sb = new StringBuilder();
        int count = 0;
        final int size = operator.numberOfOperands();
        Formula last = null;
        for (final Formula op : operator) {
            if (++count == size) {
                last = op;
            } else {
                sb.append(operator.type().precedence() < op.type().precedence() ? this.toString(op) : this.bracket(op));
                sb.append(opString);
            }
        }
        if (last != null) {
            sb.append(operator.type().precedence() < last.type().precedence() ? this.toString(last) : this.bracket(last));
        }
        return sb.toString();
    }
1090976
def new(self, attribute, operation=ChainOperator.AND):
        
        if isinstance(operation, str):
            operation = ChainOperator(operation)
        self._chain = operation
        self._attribute = self._get_mapping(attribute) if attribute else None
        self._negation = False
        return self
582764
private static Operator substitute(Operator oper, List[] equatedIds) {
    Selector op1 = oper.getOperands()[0];
    Selector op2 = (oper.getOperands().length == 1) ? null : oper.getOperands()[1];
    if (op1 instanceof Identifier)
      op1 = substitute((Identifier) op1, equatedIds);
    else if (op1 instanceof Operator)
      op1 = substitute((Operator) op1, equatedIds);
    if (op1 == null)
      return null;
    if (op2 != null) {
      if (op2 instanceof Identifier)
        op2 = substitute((Identifier) op2, equatedIds);
      else if (op2 instanceof Operator)
        op2 = substitute((Operator) op2, equatedIds);
      if (op2 == null)
        return null;
    }
    if (op1 == oper.getOperands()[0] && (op2 == null || op2 == oper.getOperands()[1]))
      return oper;
    else if (oper instanceof LikeOperator) {
      LikeOperatorImpl loper = (LikeOperatorImpl) oper;
        return new LikeOperatorImpl(loper.getOp(), op1, loper.getInternalPattern(), loper.getPattern(), loper.isEscaped(), loper.getEscape());
    }
    else
      return (op2 == null) ? new OperatorImpl(oper.getOp(), op1) : new OperatorImpl(oper.getOp(), op1, op2);
  }
825746
public static FunctionalType primitiveUnaryOperator(PrimitiveType type) {
    switch (type.getKind()) {
      case INT:
        return new FunctionalType(
            Type.from(IntUnaryOperator.class),
            "applyAsInt",
            ImmutableList.of(type),
            type);

      case LONG:
        return new FunctionalType(
            Type.from(LongUnaryOperator.class),
            "applyAsLong",
            ImmutableList.of(type),
            type);

      case DOUBLE:
        return new FunctionalType(
            Type.from(DoubleUnaryOperator.class),
            "applyAsDouble",
            ImmutableList.of(type),
            type);

      default:
        throw new IllegalArgumentException("No primitive unary operator exists for " + type);
    }
  }
506042
public Assertion newAssertion(final List<Statement> authnStatement, final String issuer,
                                  final ZonedDateTime issuedAt, final String id) {
        val assertion = newSamlObject(Assertion.class);
        assertion.setID(id);
        assertion.setIssueInstant(DateTimeUtils.dateTimeOf(issuedAt));
        assertion.setIssuer(newIssuer(issuer));
        assertion.getStatements().addAll(authnStatement);
        return assertion;
    }
366136
public static HeaderActionRule newInstance(String id, Boolean hidden) {
        HeaderActionRule headerActionRule = new HeaderActionRule();
        headerActionRule.setActionId(id);
        headerActionRule.setHidden(hidden);
        return headerActionRule;
    }
465461
public <T> boolean registerDelegate(Delegate<T> delegate)
    {
        return null == delegateMapping.putIfAbsent(delegate.typeClass().getName(), 
                delegate);
    }
115535
protected BasicAuthAuthenticator createBasicAuthenticator() throws RegistryException {
        SecurityService securityService = securityServiceRef.getService();
        UserRegistryService userRegistryService = securityService.getUserRegistryService();
        UserRegistry userRegistry = null;
        if (userRegistryService.isUserRegistryConfigured())
            userRegistry = userRegistryService.getUserRegistry();
        SSOCookieHelper sSOCookieHelper = webAppSecurityConfig.createSSOCookieHelper();
        return new BasicAuthAuthenticator(securityService.getAuthenticationService(), userRegistry, sSOCookieHelper, webAppSecurityConfig);
    }
181940
public ExpressionBuilder operator(Operator operator) {
        this.checkOperatorSymbol(operator);
        this.userOperators.put(operator.getSymbol(), operator);
        return this;
    }
996181
public Operator createOperator(int op, Selector operand)
  {
	Operator operator = new OperatorImpl(op, operand);

	return operator; 
  }
778049
@Nullable
  private static SoyType getSoyTypeFromUnionForBinaryOperator(
      UnionType t0, SoyType t1, boolean isNullable, SoyTypeBinaryOperator operator) {
    List<SoyType> subTypes = new ArrayList<>();
    for (SoyType unionMember : t0.getMembers()) {
      SoyType result = getSoyTypeForBinaryOperator(unionMember, t1, operator);
      if (result == null) {
        return null;
      }
      subTypes.add(result);
    }
    SoyType result = UnionType.of(subTypes);
    return isNullable ? makeNullable(result) : result;
  }