@Test public void failOnMixedRawValuesTransformation() { ImmutableQueryParameter parameter = mixedParameterValues(); try { parameter.rawValuesAs(Integer.class); fail("Should nor parse a URI as an integer"); } catch (Exception e) { } }
@Override public <T> List<T> rawValuesAs(Class<? extends T> clazz) { Builder<T> builder = ImmutableList.<T>builder(); for(String rawValue:this.rawValues) { builder.add(ObjectUtil.fromString(clazz,rawValue)); } return builder.build(); }
ImmutableQueryParameter implements Parameter { @Override public <T> List<T> rawValuesAs(Class<? extends T> clazz) { Builder<T> builder = ImmutableList.<T>builder(); for(String rawValue:this.rawValues) { builder.add(ObjectUtil.fromString(clazz,rawValue)); } return builder.build(); } }
ImmutableQueryParameter implements Parameter { @Override public <T> List<T> rawValuesAs(Class<? extends T> clazz) { Builder<T> builder = ImmutableList.<T>builder(); for(String rawValue:this.rawValues) { builder.add(ObjectUtil.fromString(clazz,rawValue)); } return builder.build(); } private  ImmutableQueryParameter(String name, ImmutableList<String> rawValues); }
ImmutableQueryParameter implements Parameter { @Override public <T> List<T> rawValuesAs(Class<? extends T> clazz) { Builder<T> builder = ImmutableList.<T>builder(); for(String rawValue:this.rawValues) { builder.add(ObjectUtil.fromString(clazz,rawValue)); } return builder.build(); } private  ImmutableQueryParameter(String name, ImmutableList<String> rawValues); @Override String name(); @Override boolean isMultivalued(); @Override int cardinality(); @Override String rawValue(); @Override List<String> rawValues(); @Override T rawValueAs(Class<? extends T> clazz); @Override List<T> rawValuesAs(Class<? extends T> clazz); @Override String toString(); }
ImmutableQueryParameter implements Parameter { @Override public <T> List<T> rawValuesAs(Class<? extends T> clazz) { Builder<T> builder = ImmutableList.<T>builder(); for(String rawValue:this.rawValues) { builder.add(ObjectUtil.fromString(clazz,rawValue)); } return builder.build(); } private  ImmutableQueryParameter(String name, ImmutableList<String> rawValues); @Override String name(); @Override boolean isMultivalued(); @Override int cardinality(); @Override String rawValue(); @Override List<String> rawValues(); @Override T rawValueAs(Class<? extends T> clazz); @Override List<T> rawValuesAs(Class<? extends T> clazz); @Override String toString();  }