Skip to content

Instantly share code, notes, and snippets.

import java.util.function.Function;
public class BaseText implements Function<String,String>{
public BaseText(){
}
@Override
public String apply(String t) {
return t;
public abstract class TextDecorator implements Text
{
Text text;
public TextDecorator(Text text) {
this.text = text;
}
public abstract String format(String s);
private List<Person> getPeopleWithFilter(List<Person> persons, Predicate<Person> personFilter)
{
return persons.stream()
.filter(personFilter)
.collect(Collectors.toList());
}