com.empireclassic.Remote
Class Criteria

java.lang.Object
  extended by com.empireclassic.Remote.Criteria

public class Criteria
extends java.lang.Object

This class encapsulates the criteria parameters used in many commands. For each of the testable sector values a min and max value are provided as well as a test to see if a certain value lies within that range (all tests are inclusive of the range (low <= x <= high).

In general, the command line is parsed for selection criteria which are used to build this structure. Sector values are then tested against this structure on an individual basis to see if they meet the users criteria.

Author:
chas
See Also:
SelectionMap

Nested Class Summary
static class Criteria.LowHigh
           
 
Field Summary
 Criteria.LowHigh artillery
           
 Criteria.LowHigh authorization
           
 Criteria.LowHigh bombers
           
 Criteria.LowHigh civilians
           
 Criteria.LowHigh designation
           
 Criteria.LowHigh eff
           
 boolean even
           
 Criteria.LowHigh explosives
           
 Criteria.LowHigh fighters
           
 Criteria.LowHigh military
           
 Criteria.LowHigh nation
           
 boolean odd
           
 Criteria.LowHigh ore
           
 int percentage
           
 Criteria.LowHigh prod
           
 Criteria.LowHigh sample
           
 Criteria.LowHigh x
           
 Criteria.LowHigh y
           
 
Constructor Summary
Criteria(java.awt.Dimension islandSize)
          Initialize to the specified island size
 
Method Summary
 boolean artilleryQualifies(int value)
           
 boolean authQualifies(int value)
           
 boolean bomberQualifies(int value)
           
 boolean civilianQualifies(int value)
           
 boolean desQualifies(Sector.Des value)
           
 boolean effQualifies(int value)
           
 boolean evenQualifies()
           
 boolean explosiveQualifies(int value)
           
 boolean fighterQualifies(int value)
           
 boolean militaryQualifies(int value)
           
 boolean nationQualifies(int value)
           
 boolean oddQualifies()
           
 boolean oreQualifies(int value)
           
 boolean prodQualifies(int value)
           
 boolean sampleQualifies(int value)
           
 boolean xQualifies(int value)
           
 boolean yQualifies(int value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

designation

public Criteria.LowHigh designation

x

public Criteria.LowHigh x

y

public Criteria.LowHigh y

nation

public Criteria.LowHigh nation

civilians

public Criteria.LowHigh civilians

military

public Criteria.LowHigh military

artillery

public Criteria.LowHigh artillery

explosives

public Criteria.LowHigh explosives

fighters

public Criteria.LowHigh fighters

bombers

public Criteria.LowHigh bombers

ore

public Criteria.LowHigh ore

prod

public Criteria.LowHigh prod

eff

public Criteria.LowHigh eff

sample

public Criteria.LowHigh sample

authorization

public Criteria.LowHigh authorization

even

public boolean even

odd

public boolean odd

percentage

public int percentage
Constructor Detail

Criteria

public Criteria(java.awt.Dimension islandSize)
Initialize to the specified island size

Parameters:
islandSize -
Method Detail

desQualifies

public boolean desQualifies(Sector.Des value)

xQualifies

public boolean xQualifies(int value)

yQualifies

public boolean yQualifies(int value)

nationQualifies

public boolean nationQualifies(int value)

civilianQualifies

public boolean civilianQualifies(int value)

militaryQualifies

public boolean militaryQualifies(int value)

artilleryQualifies

public boolean artilleryQualifies(int value)

explosiveQualifies

public boolean explosiveQualifies(int value)

fighterQualifies

public boolean fighterQualifies(int value)

bomberQualifies

public boolean bomberQualifies(int value)

oreQualifies

public boolean oreQualifies(int value)

prodQualifies

public boolean prodQualifies(int value)

effQualifies

public boolean effQualifies(int value)

sampleQualifies

public boolean sampleQualifies(int value)

authQualifies

public boolean authQualifies(int value)

evenQualifies

public boolean evenQualifies()

oddQualifies

public boolean oddQualifies()