org.gwtbootstrap3.client.ui.form.validator
Class ValidatorWrapper<T>
java.lang.Object
org.gwtbootstrap3.client.ui.form.validator.ValidatorWrapper<T>
- All Implemented Interfaces:
- Comparable<ValidatorWrapper<T>>
public class ValidatorWrapper<T>
- extends Object
- implements Comparable<ValidatorWrapper<T>>
Wraps a validator in order to provide sorting capability.
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.
- Author:
- Steven Jardine
ValidatorWrapper
public ValidatorWrapper(Validator<T> validator,
int insertionOrder)
compareTo
public int compareTo(ValidatorWrapper<T> other)
- Specified by:
compareTo in interface Comparable<ValidatorWrapper<T>>
equals
public boolean equals(Object obj)
-
- Overrides:
equals in class Object
getInsertionOrder
public Integer getInsertionOrder()
- Returns:
- the insertionOrder
getName
public String getName()
- Returns:
- the name
getPriority
public Integer getPriority()
- Returns:
- the priority
getValidator
public Validator<T> getValidator()
- Returns:
- the validator
hashCode
public int hashCode()
-
- Overrides:
hashCode in class Object
Copyright © 2015. All rights reserved.