public static int fromString (String dirstr)
    {
        for (int ii = 0; ii < FINE_DIRECTION_COUNT; ii++) {
            if (DIR_STRINGS[ii].equals(dirstr)) {
                return ii;
            }
        }
        return NONE;
    }
public static int fromString ( String dirstr ) { for ( int ii = 0 ; ii < FINE_DIRECTION_COUNT ; ii ++ ) { if ( DIR_STRINGS [ ii ] . equals ( dirstr ) ) { return ii ; } } return NONE ; }
Returns the direction code that corresponds to the supplied string or {@link #NONE} if the
string does not correspond to a known direction code.