Get option value for this {@link ConstraintSolver}.
@param op The option to get (see {@link OPTIONS}).
@return <code>true</code> iff the given option is set.
198791
public boolean getOption(OPTIONS op) {
		if (op.equals(OPTIONS.AUTO_PROPAGATE)) return autoprop;
		else if (op.equals(OPTIONS.NO_PROP_ON_VAR_CREATION)) return noPropOnVarCreation;
		else if (op.equals(OPTIONS.MANUAL_PROPAGATE)) return !autoprop;
		else if (op.equals(OPTIONS.DOMAINS_AUTO_INSTANTIATED)) return domainsAutoInstantiated;
		else if (op.equals(OPTIONS.DOMAINS_MANUALLY_INSTANTIATED)) return !domainsAutoInstantiated;
		return false;
	}
1090714
protected final <O extends AbstractOption<V>, V> V getOrElse0(O option, V defaultValue) {
        return get0(option).orElse(defaultValue);
    }
1364816
public boolean is(CommandOption option) {

		if (option == null) {
			return false;
		}

		return StringUtils.equals(getCommand(), option.getCommand())
			|| StringUtils.equals(getLongCommand(), option.getLongCommand())
			|| StringUtils.equals(getSetting(), option.getSetting());
	}
140805
public String[] getOptionValues(String opt)
    {
        List<String> values = new ArrayList<String>();

        for (Option option : options)
        {
            if (opt.equals(option.getOpt()) || opt.equals(option.getLongOpt()))
            {
                values.addAll(option.getValuesList());
            }
        }

        return values.isEmpty() ? null : values.toArray(new String[values.size()]);
    }
1033172
public static CreateOptions getOpt(Class<? extends CreateOptions> theClass, CreateOptions... opts) {
    if (opts == null)
      return null;
    CreateOptions result = null;
    for (int i = 0; i < opts.length; ++i) {
      if (opts[i].getClass() == theClass) {
        if (result != null)
          throw new IllegalArgumentException("Multiple args with type " + theClass);
        result = opts[i];
      }
    }
    return result;
  }
1124594
def add_constraint(self, op, val):
        
        if len(self.constraints) > 0:
            if op.is_equality():
                clist = ', '.join(map(str, self.constraints))
                raise ValueError('Field {}: equality operator cannot be combined '
                                 'with others: {}'.format(self._field.name, clist))
            elif op.is_exists():
                raise ValueError('Field {}: existence is implied '
                                 'by other operators'.format(self._field.name))
        constraint = Constraint(self._field, op, val)
        self.constraints.append(constraint)
        if self._field.has_subfield():
            self._array = True
        elif op.is_inequality():
            self._range = True
144853
public static IndexOperator getIndexOperator(String operator)
    {
        if (operator.equals("="))
        {
            return IndexOperator.EQ;
        }
        else if (operator.equals(">="))
        {
            return IndexOperator.GTE;
        }
        else if (operator.equals(">"))
        {
            return IndexOperator.GT;
        }
        else if (operator.equals("<"))
        {
            return IndexOperator.LT;
        }
        else if (operator.equals("<="))
        {
            return IndexOperator.LTE;
        }

        return null;
    }
897527
private Method getMethod(final MBeanOperationInfo op) {
    final MBeanParameterInfo[] params = op.getSignature();
    final String[] paramTypes = new String[params.length];
    for (int i = 0; i < params.length; i++) {
      paramTypes[i] = params[i].getType();
    }

    return getMethod(getMBeanInterface(), op.getName(), paramTypes);
  }
659834
@PublicEvolving
	public float getFloat(ConfigOption<Float> configOption) {
		Object o = getValueOrDefaultFromOption(configOption);
		return convertToFloat(o, configOption.defaultValue());
	}
956470
public boolean hasOverride(String operation) {
        boolean result = false;

        if (this.overrideOnce.containsKey(operation) == true || this.override.containsKey(operation) == true) {
            result = true;
        }

        return result;
    }
1101513
public boolean isSet(@NonNull NamedOption option) {
      if (option.isBoolean()) {
         return option.getValue() != null && option.<Boolean>getValue();
      }

      return option.getValue() != null;
   }
316789
protected <V> V execute (Operation<V> op)
        throws PersistenceException
    {
        return execute(op, true, true);
    }
270456
public static String getOptionValue(String[] args, String optionName) {
		String opt = "-" + optionName + "=";
		for (String arg : args) {
			if (arg.startsWith(opt))
				return arg.substring(opt.length());
		}
		return null;
	}
714239
public boolean checkConformance(BtrPlaceTree t, List<BtrpOperand> ops) {
        //Arity error
        if (ops.size() != getParameters().length) {
            t.ignoreError("'" + pretty(ops) + "' cannot be casted to '" + getSignature() + "'");
            return false;
        }

        //Type checking
        for (int i = 0; i < ops.size(); i++) {
            BtrpOperand o = ops.get(i);
            ConstraintParam<?> p = params[i];
            if (o == IgnorableOperand.getInstance()) {
                return false;
            }
            if (!p.isCompatibleWith(t, o)) {
                t.ignoreError("'" + pretty(ops) + "' cannot be casted to '" + getSignature() + "'");
                return false;
            }
        }
        return true;
    }
353716
@PublicEvolving
	public String getValue(ConfigOption<?> configOption) {
		Object o = getValueOrDefaultFromOption(configOption);
		return o == null ? null : o.toString();
	}
367787
public String getOptionValue(String opt)
    {
        String[] values = getOptionValues(opt);

        return (values == null) ? null : values[0];
    }
868894
public Criteria is(Object o) {
        this.criteriaType = RelationalOperator.EQ;
        this.right = ValueNode.toValueNode(o);
        return this;
    }