*
* @return Return a list of violations, if this pattern isn't valid.
*/
public Violations validate()
{
Violations violations = new Violations();
if ((first==null) || (last==null))
violations.addViolation("Interval is incomplete", getLocation());
if (first.getCharacter()>last.getCharacter())
violations.addViolation("First is greater than the last", getLocation());
if (first.getCharacter()==last.getCharacter())
violations.addViolation("First is equal than the last", getLocation());
return violations;
}