Skip to content

Instantly share code, notes, and snippets.

@shekibobo
Created December 17, 2014 21:24
Show Gist options
  • Save shekibobo/52db27ecdd16875acfe2 to your computer and use it in GitHub Desktop.
Save shekibobo/52db27ecdd16875acfe2 to your computer and use it in GitHub Desktop.
public List<String> getOptions() {
if (mOptions == null) {
FluentIterable<String> options = FluentIterable
.from(mAvailableThings)
.transform(Thing::getName);
mOptions = Lists.newArrayList(ImmutableSet.copyOf(options));
}
return mOptions;
}
public List<String> getTranslatedOptions() {
FluentIterable<String> tOptions = FluentIterable.from(getOptions()).transform(s -> translate(s));
return Lists.newArrayList(tOptions);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment