This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.function.Function; | |
public class BaseText implements Function<String,String>{ | |
public BaseText(){ | |
} | |
@Override | |
public String apply(String t) { | |
return t; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public abstract class TextDecorator implements Text | |
{ | |
Text text; | |
public TextDecorator(Text text) { | |
this.text = text; | |
} | |
public abstract String format(String s); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private List<Person> getPeopleWithFilter(List<Person> persons, Predicate<Person> personFilter) | |
{ | |
return persons.stream() | |
.filter(personFilter) | |
.collect(Collectors.toList()); | |
} |