예제 #1
0
 private void enqueueSamples(AnimalShelter shelter) {
   shelter
       .enqueue(new Dog("Charlie"))
       .enqueue(new Dog("Silver"))
       .enqueue(new Cat("Muscat Love"))
       .enqueue(new Dog("Snoopy"))
       .enqueue(new Cat("Persian"));
 }
예제 #2
0
 private void dequeueAndPrints(AnimalShelter shelter) {
   System.out.println("dequeueAny() - " + shelter.dequeueAny().name);
   System.out.println("dequeueCat() - " + shelter.dequeueCat().name);
   System.out.println("dequeueDog() - " + shelter.dequeueDog().name);
 }