public static int getIndex(Navigation value) { return value == null ? -1 : value.ordinal(); }
public static Navigation getByIndex(int index) { int i = 0; for (Navigation value : values()) { if (i == index) { return value; } i++; } return null; }
getBooleanVal(hw.getButtonType().equals(ButtonType.HARD))); props.put(HardwareProperties.HW_TRACKBALL, getBooleanVal(hw.getNav().equals(Navigation.TRACKBALL))); props.put(HardwareProperties.HW_KEYBOARD, getBooleanVal(hw.getKeyboard().equals(Keyboard.QWERTY))); props.put(HardwareProperties.HW_DPAD, getBooleanVal(hw.getNav().equals(Navigation.DPAD)));
mHardware.setKeyboard(Keyboard.getEnum(getString(mStringAccumulator))); } else if (DeviceSchema.NODE_NAV.equals(localName)) { mHardware.setNav(Navigation.getEnum(getString(mStringAccumulator))); } else if (DeviceSchema.NODE_RAM.equals(localName)) { int val = getInteger(mStringAccumulator);
addElement(doc, hardware, DeviceSchema.NODE_NAV, hw.getNav().getResourceValue());
public static int getIndex(Navigation value) { int i = 0; for (Navigation nav : values()) { if (nav == value) { return i; } i++; } return -1; }
hash = mCameras.hashCode(); hash = 31 * hash + mKeyboard.ordinal(); hash = 31 * hash + mNav.ordinal(); hash = 31 * hash + mRam.hashCode(); hash = 31 * hash + mButtons.ordinal();
public static Navigation getByIndex(int index) { Navigation[] values = values(); if (index >= 0 && index < values.length) { return values[index]; } return null; }
/** * Returns the enum for matching the provided qualifier value. * @param value The qualifier value. * @return the enum for the qualifier value or null if no matching was found. */ public static Navigation getEnum(String value) { for (Navigation nav : values()) { if (nav.mValue.equals(value)) { return nav; } } return null; }
/** * Returns the enum for matching the provided qualifier value. * @param value The qualifier value. * @return the enum for the qualifier value or null if no matching was found. */ public static Navigation getEnum(String value) { for (Navigation nav : values()) { if (nav.mValue.equals(value)) { return nav; } } return null; }