@Test public void convertTest() { TestState state = stateConverterAdapter.convert("TEST_STATE"); Assert.assertEquals(TestState.TEST_STATE, state); }
@Override public S convert(String stateRepresentation) { for (S state : type.getEnumConstants()) { if (stateRepresentation.equalsIgnoreCase(state.toString())) { return state; } } return null; }
StateConverterAdapter implements StateConverter<S> { @Override public S convert(String stateRepresentation) { for (S state : type.getEnumConstants()) { if (stateRepresentation.equalsIgnoreCase(state.toString())) { return state; } } return null; } }
StateConverterAdapter implements StateConverter<S> { @Override public S convert(String stateRepresentation) { for (S state : type.getEnumConstants()) { if (stateRepresentation.equalsIgnoreCase(state.toString())) { return state; } } return null; } StateConverterAdapter(Class<S> clazz); }
StateConverterAdapter implements StateConverter<S> { @Override public S convert(String stateRepresentation) { for (S state : type.getEnumConstants()) { if (stateRepresentation.equalsIgnoreCase(state.toString())) { return state; } } return null; } StateConverterAdapter(Class<S> clazz); @Override S convert(String stateRepresentation); }
StateConverterAdapter implements StateConverter<S> { @Override public S convert(String stateRepresentation) { for (S state : type.getEnumConstants()) { if (stateRepresentation.equalsIgnoreCase(state.toString())) { return state; } } return null; } StateConverterAdapter(Class<S> clazz); @Override S convert(String stateRepresentation);  }