/// <summary> Adds a constraint to this network. /// If the constraint is already in the nework, this invocation has no effect. /// Please notice that variables in the constraint are not automatically added. /// </summary> /// <param name="c">the constraint to be added /// </param> /// <returns> the constraint itself /// </returns> /// <throws> NullPointerException if <tt>c</tt> is <tt>null</tt> </throws> /// <throws> IllegalArgumentException if <tt>c</tt> is already added to another network </throws> protected internal virtual Constraint ADD(Constraint c) { if (!_constraints.Contains(c)) { if (c.Index >= 0) { throw new ArgumentException(); } c.Index = _constraints.Count; _constraints.Add(c); } return c; }
public ConstraintToken(Constraint value) { _value = value; }