class App {

  public static void main(String[] args) {
    // initialize creatures list
    List<Creature> creatures =
        Arrays.asList(new Goblin(), new Octopus(), new Dragon(), new Shark(), new Troll(),
            new KillerBee());
    // find all walking creatures
    LOGGER.info("Find all walking creatures");
    List<Creature> walkingCreatures =
        creatures.stream().filter(new MovementSelector(Movement.WALKING))
            .collect(Collectors.toList());
    walkingCreatures.forEach(c -> LOGGER.info(c.toString()));
    // find all dark creatures
    LOGGER.info("Find all dark creatures");
    List<Creature> darkCreatures =
        creatures.stream().filter(new ColorSelector(Color.DARK)).collect(Collectors.toList());
    darkCreatures.forEach(c -> LOGGER.info(c.toString()));
    // find all red and flying creatures
    LOGGER.info("Find all red and flying creatures");
    List<Creature> redAndFlyingCreatures =
        creatures.stream()
            .filter(new ColorSelector(Color.RED).and(new MovementSelector(Movement.FLYING)))
            .collect(Collectors.toList());
    redAndFlyingCreatures.forEach(c -> LOGGER.info(c.toString()));
  }

}