Changeset 127 in tmcsimulator for trunk/src/atmsdriver/ConsoleDriver.java
- Timestamp:
- 10/16/2017 04:38:16 PM (9 years ago)
- File:
-
- 1 edited
-
trunk/src/atmsdriver/ConsoleDriver.java (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/atmsdriver/ConsoleDriver.java
r121 r127 409 409 410 410 /** 411 * Enum for highway status dot colors. 411 * Enum for highway status dot colors. Each color has associated volume 412 * and occupancy constants. 412 413 * 413 * @author John A. Torres 414 * @author John A. Torres, jdalbey 414 415 * @version 10/11/2017 415 416 */ 416 417 public static enum DOTCOLOR { 417 418 418 RED ,419 YELLOW ,420 GREEN ;419 RED(10,10), 420 YELLOW(5,5), 421 GREEN(0,0); 421 422 422 423 // All the first letters of the values, in order. 423 424 private static String allLetters = "RYG"; 424 425 426 private int vol; /* volume */ 427 private int occ; /* occupancy */ 428 429 private DOTCOLOR(int v, int o) 430 { 431 vol = v; 432 occ = o; 433 } 425 434 /** 426 435 * Return the first letter of this enum. … … 432 441 } 433 442 443 public int volume() 444 { 445 return vol; 446 } 447 public int occupancy() 448 { 449 return occ; 450 } 434 451 /** 435 452 * Returns a dot color given its first character.
Note: See TracChangeset
for help on using the changeset viewer.
