Esempio n. 1
0
  private Parameter sortParameter(List<Field> restExposedFields, Locale locale) {
    Parameter sortParameter =
        queryParameter(SORT_BY_PARAM, msg(locale, SORT_DESC_KEY), STRING_TYPE);

    List<String> restExposedFieldNames =
        Lambda.extract(restExposedFields, Lambda.on(Field.class).getName());
    sortParameter.setEnumValues(restExposedFieldNames);

    return sortParameter;
  }
Esempio n. 2
0
 public static <T> T proxy(Class<T> clazz) {
   return Lambda.on(clazz);
 }
Esempio n. 3
0
 @SuppressWarnings("unchecked")
 public static <T> T proxy(T t) {
   Object object = Lambda.on(t.getClass());
   return (T) object;
 }