public class ValidatorWrapper<T> extends Object implements Comparable<ValidatorWrapper<T>>
We sort based on priority first, then insertion order. The hashCode and equals function should prevent a set from containing 2 validators of the same type.
Constructor and Description |
---|
ValidatorWrapper(Validator<T> validator,
int insertionOrder)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(ValidatorWrapper<T> other) |
boolean |
equals(Object obj) |
Integer |
getInsertionOrder() |
String |
getName() |
Integer |
getPriority() |
Validator<T> |
getValidator() |
int |
hashCode() |
public ValidatorWrapper(Validator<T> validator, int insertionOrder)
validator
- the validatorinsertionOrder
- the insertion orderpublic int compareTo(ValidatorWrapper<T> other)
compareTo
in interface Comparable<ValidatorWrapper<T>>
public Integer getInsertionOrder()
public Integer getPriority()
public Validator<T> getValidator()
Copyright © 2018. All rights reserved.