aim4.config
Class Constants

java.lang.Object
  extended by aim4.config.Constants

public final class Constants
extends Object

A class to hold constants for the simulator.


Nested Class Summary
static class Constants.CardinalDirection
          The four cardinal directions: north, east, south, and west.
static class Constants.LightStatus
          The three possible states of a traffic light: green, yellow, and red.
static class Constants.TurnDirection
          A direction to turn at an intersection.
 
Field Summary
static int BITS_PER_BYTE
          The number of bits per byte (8).
static int BITS_PER_KB
          The number of bits per kilobyte (8192).
static int BOOLEAN_SIZE
          The size, in bits, of a boolean value on our theoretical platform.
static int BYTES_PER_KB
          The number of bytes per kilobyte (1024).
static int BYTES_PER_MB
          The number of bytes per megabyte (1048576).
static double DOUBLE_EQUAL_PRECISION
          The precision with which two double values are considered equal.
static double DOUBLE_EQUAL_WEAK_PRECISION
          The precision with which two double values are considered equal.
static int DOUBLE_SIZE
          The size, in bits, of a double-precision floating point number on our theoretical platform.
static int ENUM_SIZE
          The size, in bits, of an enumerated data type on our theoretical platform.
static int INTEGER_SIZE
          The size, in bits, of an integer on our theoretical platform.
static NumberFormat LEADING_ZEROES
          A NumberFormat that ensures a width of at least 8 with leading zeroes.
static int numOfSecondPerHour
          The number of second per hour
static NumberFormat ONE_DEC
          A NumberFormat for one place after the decimal.
static NumberFormat TEN_DEC
          A NumberFormat for ten places after the decimal.
static NumberFormat TWO_DEC
          A NumberFormat for two places after the decimal.
static NumberFormat ZERO_DEC
          A NumberFormat for zero places after the decimal.
 
Constructor Summary
Constants()
           
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ZERO_DEC

public static final NumberFormat ZERO_DEC
A NumberFormat for zero places after the decimal. Used a lot, so might as well just define it once.


ONE_DEC

public static final NumberFormat ONE_DEC
A NumberFormat for one place after the decimal. Used a lot, so might as well just define it once.


TWO_DEC

public static final NumberFormat TWO_DEC
A NumberFormat for two places after the decimal. Used a lot, so might as well just define it once.


TEN_DEC

public static final NumberFormat TEN_DEC
A NumberFormat for ten places after the decimal. Used a lot, so might as well just define it once.


numOfSecondPerHour

public static final int numOfSecondPerHour
The number of second per hour

See Also:
Constant Field Values

LEADING_ZEROES

public static final NumberFormat LEADING_ZEROES
A NumberFormat that ensures a width of at least 8 with leading zeroes.


INTEGER_SIZE

public static final int INTEGER_SIZE
The size, in bits, of an integer on our theoretical platform. 32 bits.

See Also:
Constant Field Values

DOUBLE_SIZE

public static final int DOUBLE_SIZE
The size, in bits, of a double-precision floating point number on our theoretical platform. 64 bits.

See Also:
Constant Field Values

BOOLEAN_SIZE

public static final int BOOLEAN_SIZE
The size, in bits, of a boolean value on our theoretical platform. 1 bits.

See Also:
Constant Field Values

ENUM_SIZE

public static final int ENUM_SIZE
The size, in bits, of an enumerated data type on our theoretical platform. 8 bits.

See Also:
Constant Field Values

BITS_PER_BYTE

public static final int BITS_PER_BYTE
The number of bits per byte (8).

See Also:
Constant Field Values

BYTES_PER_KB

public static final int BYTES_PER_KB
The number of bytes per kilobyte (1024).

See Also:
Constant Field Values

BITS_PER_KB

public static final int BITS_PER_KB
The number of bits per kilobyte (8192).

See Also:
Constant Field Values

BYTES_PER_MB

public static final int BYTES_PER_MB
The number of bytes per megabyte (1048576).

See Also:
Constant Field Values

DOUBLE_EQUAL_PRECISION

public static final double DOUBLE_EQUAL_PRECISION
The precision with which two double values are considered equal. The equality of two double values a and b should be tested by using Math.abs(a-b) < Constants.DOUBLE_EQUAL_PRECISION. 1.0E-10

See Also:
Constant Field Values

DOUBLE_EQUAL_WEAK_PRECISION

public static final double DOUBLE_EQUAL_WEAK_PRECISION
The precision with which two double values are considered equal. The equality of two double values a and b should be tested by using Math.abs(a-b) < Constants.DOUBLE_EQUAL_PRECISION. 1.0E-6

See Also:
Constant Field Values
Constructor Detail

Constants

public Constants()


Copyright © 2011. All Rights Reserved.