GSVNumberMethods Class Reference

Collaboration diagram for GSVNumberMethods:

Collaboration graph
base refererrect $struct___string.html 48,33 112,57
[legend]

List of all members.

Static Public Member Functions

static final boolean compareTo (Object object, Object attribute, String key, NSDictionary params)
static final boolean isInRange (Object object, Object attribute, String key, NSDictionary params)
static final boolean isNegativeNumber (Object object, Object attribute, String key, NSDictionary params)
static final boolean isPositiveNumber (Object object, Object attribute, String key, NSDictionary params)

Static Public Attributes

static final String EQUAL = "=="
static final String GREATER_EQUAL = ">="
static final String GREATER_THAN = ">"
static final String LESS_EQUAL = "<="
static final String LESS_THAN = "<"
static final String NOT_EQUAL = "!="


Detailed Description

This class provides a set of predefined rules for performing validation on Numbers. These rules are part of the default set of 'QuickRules'.

Author:
GammaStream Technologies, Inc.

Member Function Documentation

static final boolean compareTo ( Object  object,
Object  attribute,
String  key,
NSDictionary  params 
) [static]

Compares the specified attribute to a number provided in the params dictionary.

The required key-value pairs include:
"Operator" = The specified operator string. (i.e. "==", "!=", ">", ">=", "<", or "<=" )
"RightOperand" = The number to compare the attribute to. (i.e. 0, 20, etc.)

Parameters:
object The object whose attribute is being validated.
attribute The attribute being validated.
key The key used to access the attribute.
params The param dictionary which must contain the above mentioned key-value pairs.
Returns:
true if the comparision succeeds; otherwise, false

static final boolean isInRange ( Object  object,
Object  attribute,
String  key,
NSDictionary  params 
) [static]

Checks to make sure the attribute falls within the range specified in the params dictionary.
The attribute is allowed to equal the 'Low' or 'High' value.

The required key-value pairs include:
"Low" = The lowest possible value for this attribute.
"High" = The highest possible value for this attribute.

Parameters:
object The object whose attribute is being validated.
attribute The attribute being validated.
key The key used to access the attribute.
params The param dictionary which must contain the above mentioned key-value pairs.
Returns:
true if the provided number false within the specified range; otherwise, false

static final boolean isNegativeNumber ( Object  object,
Object  attribute,
String  key,
NSDictionary  params 
) [static]

Verifies that attribute is a negative number.

Parameters:
object The object whose attribute is being validated.
attribute The attribute being validated.
key The key used to access the attribute.
params The param dictionary which must contain the above mentioned key-value pairs.
Returns:
true if the provided number is a negative value; otherwise, false

static final boolean isPositiveNumber ( Object  object,
Object  attribute,
String  key,
NSDictionary  params 
) [static]

Verifies that attribute is a positive number.

Parameters:
object The object whose attribute is being validated.
attribute The attribute being validated.
key The key used to access the attribute.
params The param dictionary which must contain the above mentioned key-value pairs.
Returns:
true if the provided number is positive value; otherwise, false


Member Data Documentation

final String EQUAL = "==" [static]

For programatic purposes, we include this constant which is used for the compareTo method.

final String GREATER_EQUAL = ">=" [static]

For programatic purposes, we include this constant which is used for the compareTo method.

final String GREATER_THAN = ">" [static]

For programatic purposes, we include this constant which is used for the compareTo method.

final String LESS_EQUAL = "<=" [static]

For programatic purposes, we include this constant which is used for the compareTo method.

final String LESS_THAN = "<" [static]

For programatic purposes, we include this constant which is used for the compareTo method.

final String NOT_EQUAL = "!=" [static]

For programatic purposes, we include this constant which is used for the compareTo method.


The documentation for this class was generated from the following file:

Generated on Sat May 26 06:42:30 2012 for Project Wonder by  doxygen 1.5.8