com.google.code.validationframework.experimental.rule
Class JSpinnerNumberModelRule<D extends Number>

java.lang.Object
  extended by com.google.code.validationframework.experimental.rule.JSpinnerNumberModelRule<D>
All Implemented Interfaces:
com.google.code.validationframework.api.rule.Rule<Comparable<D>,Boolean>

public class JSpinnerNumberModelRule<D extends Number>
extends Object
implements com.google.code.validationframework.api.rule.Rule<Comparable<D>,Boolean>

Convenience rule that will check if the data is within the bounds of the spinner model.
Note that the model of the spinner should be an AbstractSpinnerModel.


Constructor Summary
JSpinnerNumberModelRule(JSpinner spinner)
          Constructor specifying the spinner whose SpinnerNumberModel is to be checked.
 
Method Summary
 Boolean validate(Comparable<D> data)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JSpinnerNumberModelRule

public JSpinnerNumberModelRule(JSpinner spinner)
Constructor specifying the spinner whose SpinnerNumberModel is to be checked.

Parameters:
spinner - Spinner whose SpinnerNumberModel is to be checked.
Method Detail

validate

public Boolean validate(Comparable<D> data)
Specified by:
validate in interface com.google.code.validationframework.api.rule.Rule<Comparable<D extends Number>,Boolean>
See Also:
Rule.validate(Object)


Copyright © 2013. All Rights Reserved.