Code formating and whitespace cleanup
[jpim.git] / src / de / j32 / pimstuff / data / Addressbook.java
1 package de.j32.pimstuff.data;
2
3 import java.util.Iterator;
4 import java.util.LinkedList;
5
6 public class Addressbook implements EntryConsumer, EntryProducer
7 {
8     LinkedList<Entry> data_ = new LinkedList<Entry>();
9
10     public void add(Entry entry)
11     {
12         data_.add(entry);
13     }
14
15     public Iterator<Entry> entries()
16     {
17         return data_.iterator();
18     }
19
20     public void consume(Entry entry)
21     {
22         add(entry);
23     }
24
25     public void sendTo(EntryConsumer consumer)
26     {
27         for (Entry entry : data_)
28             consumer.consume(entry);
29     }
30 }