package com.encrox.cplot.constants; public class Direction { public static final byte NORTH = 0; public static final byte SOUTH = 1; public static final byte EAST = 2; public static final byte WEST = 3; public static final byte UP = 4; public static final byte DOWN = 5; public static byte getDirection(String label) { switch(label.toLowerCase()) { case "north": return NORTH; case "south": return SOUTH; case "east": return EAST; case "west": return WEST; case "up": return UP; case "down": return DOWN; } return -1; } }