org.gwtbootstrap3.client.ui.form.validator
Class ValidatorWrapper<T>

java.lang.Object
  extended by 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

Constructor Summary
ValidatorWrapper(Validator<T> validator, int insertionOrder)
           
 
Method Summary
 int compareTo(ValidatorWrapper<T> other)
           
 boolean equals(Object obj)
          
 Integer getInsertionOrder()
           
 String getName()
           
 Integer getPriority()
           
 Validator<T> getValidator()
           
 int hashCode()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValidatorWrapper

public ValidatorWrapper(Validator<T> validator,
                        int insertionOrder)
Method Detail

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.