@Test public void shouldDecodeValueAsStarWhenEqualsStarSymbol() { Object decoded = type.decode("*", null, null); assertThat(decoded).isInstanceOf(Star.class); }
@Override public Object decode(String value, Type<?> type, Matcher matcher) { if (value != null && value.equals("*")) { return Star.star(); } if (type != null) { return type.decode(value).getValue(); } if (value != null && value.isEmpty()) { return null; } return value; }
SimpleMatcherType implements MatcherType<Object> { @Override public Object decode(String value, Type<?> type, Matcher matcher) { if (value != null && value.equals("*")) { return Star.star(); } if (type != null) { return type.decode(value).getValue(); } if (value != null && value.isEmpty()) { return null; } return value; } }
SimpleMatcherType implements MatcherType<Object> { @Override public Object decode(String value, Type<?> type, Matcher matcher) { if (value != null && value.equals("*")) { return Star.star(); } if (type != null) { return type.decode(value).getValue(); } if (value != null && value.isEmpty()) { return null; } return value; }  }
SimpleMatcherType implements MatcherType<Object> { @Override public Object decode(String value, Type<?> type, Matcher matcher) { if (value != null && value.equals("*")) { return Star.star(); } if (type != null) { return type.decode(value).getValue(); } if (value != null && value.isEmpty()) { return null; } return value; }  @Override Object decode(String value, Type<?> type, Matcher matcher); @Override @SuppressWarnings("unchecked") String encode(Object object, Type type, Matcher matcher); }
SimpleMatcherType implements MatcherType<Object> { @Override public Object decode(String value, Type<?> type, Matcher matcher) { if (value != null && value.equals("*")) { return Star.star(); } if (type != null) { return type.decode(value).getValue(); } if (value != null && value.isEmpty()) { return null; } return value; }  @Override Object decode(String value, Type<?> type, Matcher matcher); @Override @SuppressWarnings("unchecked") String encode(Object object, Type type, Matcher matcher);  }