/** * Returns the pixel orientation that matches the given string, or returns a new one if none * match it. * * @param code The name of the code to fetch or to create. * @return A code matching the given name. */ public static PixelOrientation valueOf(String code) { return valueOf(PixelOrientation.class, code); } }
/** * Creates a new pixel translation. The translation is added immediately in the {@link * #ORIENTATIONS} map (this behavior would need to be revisited if this method was public). */ private PixelTranslation(final String orientation, final double dx, final double dy) { this(valueOf(orientation), dx, dy); }