@Test public void convertFromValidMixedCaseString() throws Exception { final ConsistencyLevel consistencyLevel = new ConsistencyLevelConverter().convertFrom("local_One"); assertEquals(ConsistencyLevel.LOCAL_ONE, consistencyLevel); }
@Override public ConsistencyLevel convertFrom(String value) { if (Strings.isNullOrEmpty(value)) { throw new ParameterException("Couldn't convert empty string to a Cassandra consistency level."); } try { return ConsistencyLevel.valueOf(value.toUpperCase(Locale.ENGLISH)); } catch (Exception e) { throw new ParameterException(e.getMessage(), e); } }
ConsistencyLevelConverter implements Converter<ConsistencyLevel> { @Override public ConsistencyLevel convertFrom(String value) { if (Strings.isNullOrEmpty(value)) { throw new ParameterException("Couldn't convert empty string to a Cassandra consistency level."); } try { return ConsistencyLevel.valueOf(value.toUpperCase(Locale.ENGLISH)); } catch (Exception e) { throw new ParameterException(e.getMessage(), e); } } }
ConsistencyLevelConverter implements Converter<ConsistencyLevel> { @Override public ConsistencyLevel convertFrom(String value) { if (Strings.isNullOrEmpty(value)) { throw new ParameterException("Couldn't convert empty string to a Cassandra consistency level."); } try { return ConsistencyLevel.valueOf(value.toUpperCase(Locale.ENGLISH)); } catch (Exception e) { throw new ParameterException(e.getMessage(), e); } }  }
ConsistencyLevelConverter implements Converter<ConsistencyLevel> { @Override public ConsistencyLevel convertFrom(String value) { if (Strings.isNullOrEmpty(value)) { throw new ParameterException("Couldn't convert empty string to a Cassandra consistency level."); } try { return ConsistencyLevel.valueOf(value.toUpperCase(Locale.ENGLISH)); } catch (Exception e) { throw new ParameterException(e.getMessage(), e); } }  @Override ConsistencyLevel convertFrom(String value); @Override String convertTo(ConsistencyLevel value); }
ConsistencyLevelConverter implements Converter<ConsistencyLevel> { @Override public ConsistencyLevel convertFrom(String value) { if (Strings.isNullOrEmpty(value)) { throw new ParameterException("Couldn't convert empty string to a Cassandra consistency level."); } try { return ConsistencyLevel.valueOf(value.toUpperCase(Locale.ENGLISH)); } catch (Exception e) { throw new ParameterException(e.getMessage(), e); } }  @Override ConsistencyLevel convertFrom(String value); @Override String convertTo(ConsistencyLevel value);  }