示例#1
0
 @Override
 public List<MediaType> getAcceptableMediaTypes() {
   return Lists.transform(
       getQualifiedAcceptableMediaTypes(),
       new Function<AcceptableMediaType, MediaType>() {
         @Override
         public MediaType apply(AcceptableMediaType input) {
           return input;
         }
       });
 }
示例#2
0
  @Override
  public List<Locale> getAcceptableLanguages() {
    return Lists.transform(
        getQualifiedAcceptableLanguages(),
        new Function<AcceptableLanguageTag, Locale>() {

          @Override
          public Locale apply(AcceptableLanguageTag input) {
            return input.getAsLocale();
          }
        });
  }