org.nuiton.wikitty.search
Class Between

java.lang.Object
  extended by org.nuiton.wikitty.search.Restriction
      extended by org.nuiton.wikitty.search.Between
All Implemented Interfaces:
Serializable

public class Between
extends Restriction
implements Serializable

Between operator is used to build restriction containing "min < element < max" where element could be a Integer, a Float or a Date.

For example, use: RestrictionHelper.between( myElement , "15.5" , "22.5" )

See Also:
Serialized Form

Field Summary
protected  Element element
           
protected  String max
           
protected  String min
           
 
Fields inherited from class org.nuiton.wikitty.search.Restriction
name
 
Constructor Summary
Between()
          Default constructor
Between(Element element, String min, String max)
          Constructor with all parameters initialized
 
Method Summary
 boolean equals(Object other)
          Equality test based attributes values
 Element getElement()
          Return element
 String getMax()
          Return max
 String getMin()
          Return min
 int hashCode()
           
 void setElement(Element element)
          Set a value to parameter element.
 void setMax(String max)
          Set a value to parameter max.
 void setMin(String min)
          Set a value to parameter min.
 
Methods inherited from class org.nuiton.wikitty.search.Restriction
getName, setName
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

element

protected Element element

min

protected String min

max

protected String max
Constructor Detail

Between

public Between()
Default constructor


Between

public Between(Element element,
               String min,
               String max)
Constructor with all parameters initialized

Parameters:
element -
min -
max -
Method Detail

getElement

public Element getElement()
Return element

Returns:

setElement

public void setElement(Element element)
Set a value to parameter element.

Parameters:
element -

getMin

public String getMin()
Return min

Returns:

setMin

public void setMin(String min)
Set a value to parameter min.

Parameters:
min -

getMax

public String getMax()
Return max

Returns:

setMax

public void setMax(String max)
Set a value to parameter max.

Parameters:
max -

equals

public boolean equals(Object other)
Equality test based attributes values

Overrides:
equals in class Restriction
Parameters:
value - Value to compare

hashCode

public int hashCode()
Overrides:
hashCode in class Restriction


Copyright © 2009-2010 CodeLutin. All Rights Reserved.