@Override public List<String> getMatchedURIs(final boolean decode) { final List<String> result; if (decode) { result = Lists.transform(paths, PATH_DECODER); } else { result = paths; } return Collections.unmodifiableList(result); }
@Override public List<String> getMatchedURIs(final boolean decode) { final List<String> result; if (decode) { result = Lists.transform(paths, PATH_DECODER); } else { result = paths; } return Collections.unmodifiableList(result); }
@Override @SuppressWarnings("unchecked") public List<MessageBodyReader> getMessageBodyReadersForType(final Class<?> type) { return Lists.transform(getReaderModelsForType(type), MODEL_TO_READER); }
@Override public List<Locale> getAcceptableLanguages() { return Lists.transform(getQualifiedAcceptableLanguages(), new Function<AcceptableLanguageTag, Locale>() { @Override public Locale apply(final AcceptableLanguageTag input) { return input.getAsLocale(); } }); }
@Override public List<MediaType> getAcceptableMediaTypes() { return Lists.transform(getQualifiedAcceptableMediaTypes(), new Function<AcceptableMediaType, MediaType>() { @Override public MediaType apply(final AcceptableMediaType input) { return input; } }); }
private static List<Resource> transform(final Resource parent, final List<Data> list) { return Lists.transform(list, new Function<Data, Resource>() { @Override public Resource apply(Data data) { return new Resource(parent, data); } }); }
private static List<Resource> transform(final Resource parent, final List<Data> list) { return Lists.transform(list, new Function<Data, Resource>() { @Override public Resource apply(Data data) { return new Resource(parent, data); } }); }
@Override public List<MediaType> getAcceptableMediaTypes() { return Lists.transform(getQualifiedAcceptableMediaTypes(), new Function<AcceptableMediaType, MediaType>() { @Override public MediaType apply(final AcceptableMediaType input) { return input; } }); }
@Override public List<Locale> getAcceptableLanguages() { return Lists.transform(getQualifiedAcceptableLanguages(), new Function<AcceptableLanguageTag, Locale>() { @Override public Locale apply(final AcceptableLanguageTag input) { return input.getAsLocale(); } }); }
@Override @SuppressWarnings("unchecked") public List<MessageBodyReader> getMessageBodyReadersForType(final Class<?> type) { return Lists.transform(getReaderModelsForType(type), MODEL_TO_READER); }
@Override @SuppressWarnings("unchecked") public List<MessageBodyWriter> getMessageBodyWritersForType(final Class<?> type) { return Lists.transform(getWritersModelsForType(type), MODEL_TO_WRITER); }
private static List<Resource> transform(final Resource parent, final List<Data> list) { return Lists.transform(list, new Function<Data, Resource>() { @Override public Resource apply(Data data) { return new Resource(parent, data); } }); }
@Override @SuppressWarnings("unchecked") public List<MessageBodyWriter> getMessageBodyWritersForType(final Class<?> type) { return Lists.transform(getWritersModelsForType(type), MODEL_TO_WRITER); }
@Override @SuppressWarnings("unchecked") public List<MessageBodyReader> getMessageBodyReadersForType(final Class<?> type) { return Lists.transform(getReaderModelsForType(type), MODEL_TO_READER); }
Collection<V2> transform(K key, Collection<V1> values) { Function<? super V1, V2> function = Maps.asValueToValueFunction(transformer, key); if (values instanceof List) { return Lists.transform((List<V1>) values, function); } else { return Collections2.transform(values, function); } }
Collection<V2> transform(K key, Collection<V1> values) { Function<? super V1, V2> function = Maps.asValueToValueFunction(transformer, key); if (values instanceof List) { return Lists.transform((List<V1>) values, function); } else { return Collections2.transform(values, function); } }
Collection<V2> transform(K key, Collection<V1> values) { Function<? super V1, V2> function = Maps.asValueToValueFunction(transformer, key); if (values instanceof List) { return Lists.transform((List<V1>) values, function); } else { return Collections2.transform(values, function); } }
Collection<V2> transform(K key, Collection<V1> values) { Function<? super V1, V2> function = Maps.asValueToValueFunction(transformer, key); if (values instanceof List) { return Lists.transform((List<V1>) values, function); } else { return Collections2.transform(values, function); } }
@Override public List<FormDataContentDisposition> provide() { final List<FormDataBodyPart> parts = getEntity().getFields(name); return parts == null ? null : Lists.transform(parts, new Function<FormDataBodyPart, FormDataContentDisposition>() { @Override public FormDataContentDisposition apply(final FormDataBodyPart part) { return part.getFormDataContentDisposition(); } }); } }
@Override public List<FormDataContentDisposition> provide() { final List<FormDataBodyPart> parts = getEntity().getFields(name); return parts == null ? null : Lists.transform(parts, new Function<FormDataBodyPart, FormDataContentDisposition>() { @Override public FormDataContentDisposition apply(final FormDataBodyPart part) { return part.getFormDataContentDisposition(); } }); } }