ConstraintUtilspublic class ConstraintUtils extends Object ConstraintUtils is an Object providing the Utilities.
formatFailureMessage methods, are the utility methods
to format the failure messages. These Methods are used to format
failure messages. Method print is the utility method
to print this Object |
Constructors Summary |
---|
ConstraintUtils()Creates a new instance of ConstraintUtils
|
Methods Summary |
---|
java.lang.String | formatFailureMessage(java.lang.String constraint, java.lang.String value, java.lang.String name)Formats the failure message from the given information.
String failureMessage = null;
if(!((constraint == null) || (constraint.length() == 0) ||
(value == null) || (name == null) || (name.length() == 0))){
String format = BundleReader.getValue("MSG_Failure"); //NOI18N
Object[] arguments = new Object[]{constraint, value, name};
failureMessage = MessageFormat.format(format, arguments);
}
return failureMessage;
| java.lang.String | formatFailureMessage(java.lang.String constraint, java.lang.String name)Formats the failure message from the given information.
String failureMessage = null;
if(!((constraint == null) || (constraint.length() == 0) ||
(name == null) || (name.length() == 0))){
String format = BundleReader.getValue("MSG_Failure_1"); //NOI18N
Object[] arguments = new Object[]{constraint, name};
failureMessage = MessageFormat.format(format, arguments);
}
return failureMessage;
| void | print()Prints this Object
String format = BundleReader.getValue("Name_Value_Pair_Format");//NOI18N
Object[] arguments = new Object[]{"Constraint", this}; //NOI18N
System.out.println(MessageFormat.format(format, arguments));
|
|