## net.percederberg.mib.type
Class Constraint

    java.lang.Object
      |
      +--net.percederberg.mib.type.Constraint

Direct Known Subclasses:
  SizeConstraint, ValueConstraint, ValueRangeConstraint

public abstract class Constraint
extends java.lang.Object

The common superclass for all type constraints.

Author:
  Per Cederberg, per@percederberg.net

Constructor Summary
`Constraint()`

Method Summary
`abstract boolean` `equals(java.lang.Object obj)` Checks if this constraint equals another constraint.
`protected static boolean` `equalsValue(java.lang.Object a, java.lang.Object b)` Checks if two values are equal, considering two null values to be equal.
`abstract java.lang.String` `toString()` Returns a string description of this constraint.
`abstract void` `transferConstraint(TypeConverter converter)` Transfers the constraint information from this object to a type converter object.

Methods inherited from class java.lang.Object
`clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### Constraint

    public Constraint()

Method Detail

### equals

    public abstract boolean equals(java.lang.Object obj)

  Checks if this constraint equals another constraint.
  Overrides:
    `equals` in class `java.lang.Object`
  Parameters:
    `obj` - the object to compare with
  Returns:
    true if equal, otherwise false

### equalsValue

    protected static boolean equalsValue(java.lang.Object a,
                                         java.lang.Object b)

  Checks if two values are equal, considering two null values to be equal.
  Parameters:
    `a` - the first object
    `b` - the second object
  Returns:
    true if the objects are equal, false otherwise

### toString

    public abstract java.lang.String toString()

  Returns a string description of this constraint.
  Overrides:
    `toString` in class `java.lang.Object`
  Returns:
    a string description

### transferConstraint

    public abstract void transferConstraint(TypeConverter converter)

  Transfers the constraint information from this object to a type converter object. The calling conventions declared in the TypeConverter class are followed.
  Parameters:
    `converter` - a type converter