Build a constraint.

@param args the parameters of the constraint. Must be 2 non-empty set of virtual machines.
@return the constraint
963377
@Override
    public List<? extends SatConstraint> buildConstraint(BtrPlaceTree t, List<BtrpOperand> args) {
        if (checkConformance(t, args)) {
            @SuppressWarnings("unchecked") Collection<Collection<VM>> s = (Collection<Collection<VM>>) params[0].transform(this, t, args.get(0));
            return s != null ? Collections.singletonList(new Split(s, false)) : Collections.emptyList();
        }
        return Collections.emptyList();
    }
1204878
@Override
    public List<Fence> buildConstraint(BtrPlaceTree t, List<BtrpOperand> args) {
        if (checkConformance(t, args)) {
          @SuppressWarnings("unchecked")
          List<VM> vms = (List<VM>) params[0].transform(this, t, args.get(0));
          @SuppressWarnings("unchecked")
          List<Node> ns = (List<Node>) params[1].transform(this, t, args.get(1));
            return vms != null && ns != null ? Fence.newFence(vms, ns) : Collections.emptyList();
        }
        return Collections.emptyList();
    }
45607
def add_constraint(constr)
      terms = constr.expression.terms
      indexes_buffer = build_pointer_array(terms.each_key.map do |var|
        var.index
      end, :int)
      values_buffer = build_pointer_array terms.values, :double

      ret = Gurobi.GRBaddconstr @ptr, terms.length,
                                indexes_buffer, values_buffer,
                                gurobi_sense(constr.sense),
                                constr.rhs, constr.name
      fail if ret != 0

      constr.model = self
      constr.index = @constraints.length
      constr.freeze
      @constraints << constr
    end
5910
public List<ConstraintType<ParameterType<T>>> getAllConstraint()
   {
      List<ConstraintType<ParameterType<T>>> list = new ArrayList<ConstraintType<ParameterType<T>>>();
      List<Node> nodeList = childNode.get("constraint");
      for(Node node: nodeList)
      {
         ConstraintType<ParameterType<T>>  type = new ConstraintTypeImpl<ParameterType<T>>(this, "constraint", childNode, node);
         list.add(type);
      }
      return list;
   }
719488
public org.tensorflow.framework.KernelDef.AttrConstraintOrBuilder getConstraintOrBuilder(
      int index) {
    return constraint_.get(index);
  }
157226
public ArgumentBuilder withPreCompiledArguments(final List<String> preCompiledArguments) {

        // Check sanity
        Validate.notNull(preCompiledArguments, "preCompiledArguments");

        // Add the preCompiledArguments in the exact order they were given.
        synchronized (lock) {
            for (String current : preCompiledArguments) {
                arguments.add(current);
            }
        }

        // All done.
        return this;
    }
16552
public PropertyConstraint all(String propertyName, Constraint[] constraints) {
        return value(propertyName, all(constraints));
    }
498358
def check_constraint(self, pkge=None, constr=None):
        
        if not pkge is None:
            return javabridge.call(
                self.jobject, "checkConstraint", "(Lweka/core/packageManagement/Package;)Z", pkge.jobject)
        if not constr is None:
            return javabridge.call(
                self.jobject, "checkConstraint", "(Lweka/core/packageManagement/PackageConstraint;)Z", pkge.jobject)
        raise Exception("Either package or package constraing must be provided!")
303036
public static void main(String[] args) {
    System.exit(getConf(
        ClientContext.create(new InstancedConfiguration(ConfigurationUtils.defaults())), args));
  }
743750
public UniqueConstraint build(String name, boolean isPK) {
			ImmutableList<Attribute> attributes = builder.build();
			if (attributes.isEmpty())
				return null;
			return new UniqueConstraint(name, isPK, builder.build());
		}
623228
public Vm compile( String sql, String args[] ) throws jsqlite.Exception {
        synchronized (this) {
            Vm vm = new Vm();
            vm_compile_args(sql, vm, args);
            return vm;
        }
    }
885524
public T addServerArguments(final String... args) {
        if (args != null) {
            for (String arg : args) {
                addServerArgument(arg);
            }
        }
        return getThis();
    }
185765
public static <T> Constraint
            checking(Function<String, T> check, String messageOrKey, boolean isKey, String... extraMessageArgs) {
        return mkSimpleConstraint(((label, vString, messages) -> {
            logger.debug("checking for {}", vString);

            if (isEmptyStr(vString)) return null;
            else {
                try {
                    check.apply(vString);
                    return null;
                } catch (Exception ex) {
                    String msgTemplate = isKey ? messages.get(messageOrKey) : messageOrKey;
                    List<String> messageArgs = appendList(Arrays.asList(vString), extraMessageArgs);
                    return String.format(msgTemplate, messageArgs.toArray());
                }
            }
        }), null);
    }
877681
public final Coalesce<T> coalesce(T... args) {
        Coalesce<T> coalesce = new Coalesce<T>(getType(), mixin);
        for (T arg : args) {
            coalesce.add(arg);
        }
        return coalesce;
    }
1373966
function () {
      var args = arguments;
      var len = names.length;
      if (this instanceof ctr) {
        if (args.length !== len) {
          throw new Error(
            'Unexpected number of arguments for ' + ctr.className + ': ' +
            'got ' + args.length + ', but need ' + len + '.'
          );
        }
        var i = 0, n;
        for (; n = names[i]; i++) {
          this[n] = constraints[n](args[i], n, ctr);
        }
      } else {
        return args.length < len
          ? partial(ctr, toArray(args))
          : ctrApply(ctr, args);
      }
    }
451931
@Override
    public List<String> getConstraintMapping() {
        List<String> result = new ArrayList<String>();

        for (String constraintMappingString : constraintMapping) {
            if (constraintMappingString != null) {
                constraintMappingString = constraintMappingString.trim();
            }
            result.add(constraintMappingString);
        }
        return result;
    }
216358
public static List<String> buildList(String... args) {
        List<String> newList = new ArrayList<String>();
        Collections.addAll(newList, args);
        return newList;
    }