2015-04-20 15:36:01 -07:00
|
|
|
|
//: containers/IndividualTest.java
|
2015-05-29 14:18:51 -07:00
|
|
|
|
// <20>2015 MindView LLC: see Copyright.txt
|
2015-04-20 15:36:01 -07:00
|
|
|
|
import holding.MapOfList;
|
|
|
|
|
import typeinfo.pets.*;
|
|
|
|
|
import java.util.*;
|
|
|
|
|
|
|
|
|
|
public class IndividualTest {
|
|
|
|
|
public static void main(String[] args) {
|
2015-05-05 11:20:13 -07:00
|
|
|
|
Set<Individual> pets = new TreeSet<>();
|
2015-04-20 15:36:01 -07:00
|
|
|
|
for(List<? extends Pet> lp :
|
|
|
|
|
MapOfList.petPeople.values())
|
|
|
|
|
for(Pet p : lp)
|
|
|
|
|
pets.add(p);
|
|
|
|
|
System.out.println(pets);
|
|
|
|
|
}
|
|
|
|
|
} /* Output:
|
|
|
|
|
[Cat Elsie May, Cat Pinkola, Cat Shackleton, Cat Stanford aka Stinky el Negro, Cymric Molly, Dog Margrett, Mutt Spot, Pug Louie aka Louis Snorkelstein Dupree, Rat Fizzy, Rat Freckly, Rat Fuzzy]
|
|
|
|
|
*///:~
|