de.enough.polish.ant.requirements
Class IntRequirement

java.lang.Object
  extended by de.enough.polish.ant.requirements.Requirement
      extended by de.enough.polish.ant.requirements.IntRequirement
All Implemented Interfaces:
DeviceFilter
Direct Known Subclasses:
BitsPerPixelRequirement, ScreenHeightRequirement, ScreenWidthRequirement

public class IntRequirement
extends Requirement

Selects devices by matching simple numbers, e.g. "4" matches "2+".

Copyright Enough Software 2004 - 2011

 history
        10-Feb-2004 - rob creation
 

Author:
Robert Virkus, robert@enough.de

Field Summary
 
Fields inherited from class de.enough.polish.ant.requirements.Requirement
needsToBeUndefined, propertyName
 
Constructor Summary
IntRequirement(String value, String propertyName)
          Creates a new integer requirement.
 
Method Summary
protected  boolean isMet(Device device, String property)
          Checks if this requirement is met by the given device.
 
Methods inherited from class de.enough.polish.ant.requirements.Requirement
getBuildProperties, getInstance, getProperty, isMet, setBuildProperties
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IntRequirement

public IntRequirement(String value,
                      String propertyName)
Creates a new integer requirement.

Parameters:
value - the value
propertyName - the name of the property
Method Detail

isMet

protected boolean isMet(Device device,
                        String property)
Description copied from class: Requirement
Checks if this requirement is met by the given device.

Specified by:
isMet in class Requirement
Parameters:
device - the device which should be tested against this requirement.
property - the property-value of the given device. Property is never null.
Returns:
true when this requirement is satisfied by the given device.