BrightSide Workbench Full Report + Source Code
org.turro.contacts.AddressMap Class Reference
Inheritance diagram for org.turro.contacts.AddressMap:
Collaboration diagram for org.turro.contacts.AddressMap:

Public Member Functions

 AddressMap (Contact contact)
 
int size ()
 
boolean isEmpty ()
 
boolean containsKey (Object key)
 
boolean containsValue (Object value)
 
Address get (Object key)
 
Address put (String key, Address value)
 
Address remove (Object key)
 
void putAll (Map<? extends String, ? extends Address > m)
 
void clear ()
 
Set< String > keySet ()
 
Collection< Addressvalues ()
 
Set< Entry< String, Address > > entrySet ()
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 31 of file AddressMap.java.

Constructor & Destructor Documentation

◆ AddressMap()

org.turro.contacts.AddressMap.AddressMap ( Contact  contact)

Definition at line 35 of file AddressMap.java.

35  {
36  this.contact = contact;
37  }

Member Function Documentation

◆ clear()

void org.turro.contacts.AddressMap.clear ( )

Definition at line 90 of file AddressMap.java.

90  {
91  throw new UnsupportedOperationException("Not supported yet.");
92  }

◆ containsKey()

boolean org.turro.contacts.AddressMap.containsKey ( Object  key)

Definition at line 50 of file AddressMap.java.

50  {
51  for(Address a : contact.getAddresses()) {
52  if(a.getDescription().equalsIgnoreCase(key.toString())) {
53  return true;
54  }
55  }
56  return false;
57  }
Set< Address > getAddresses()
Definition: Contact.java:355
Here is the call graph for this function:

◆ containsValue()

boolean org.turro.contacts.AddressMap.containsValue ( Object  value)

Definition at line 60 of file AddressMap.java.

60  {
61  throw new UnsupportedOperationException("Not supported yet.");
62  }

◆ entrySet()

Set<Entry<String, Address> > org.turro.contacts.AddressMap.entrySet ( )

Definition at line 113 of file AddressMap.java.

113  {
114  HashSet<Entry<String, Address>> set = new HashSet();
115  for(final Address a : contact.getAddresses()) {
116  set.add(new Entry<String, Address>() {
117  @Override
118  public String getKey() {
119  return a.getDescription();
120  }
121  @Override
122  public Address getValue() {
123  return a;
124  }
125  @Override
126  public Address setValue(Address value) {
127  throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
128  }
129  });
130  }
131  return set;
132  }
Here is the call graph for this function:

◆ get()

Address org.turro.contacts.AddressMap.get ( Object  key)

Definition at line 65 of file AddressMap.java.

65  {
66  for(Address a : contact.getAddresses()) {
67  if(a.getDescription().equalsIgnoreCase(key.toString())) {
68  return a;
69  }
70  }
71  return null;
72  }
Here is the call graph for this function:

◆ isEmpty()

boolean org.turro.contacts.AddressMap.isEmpty ( )

Definition at line 45 of file AddressMap.java.

45  {
46  return contact.getAddresses().isEmpty();
47  }
Here is the call graph for this function:

◆ keySet()

Set<String> org.turro.contacts.AddressMap.keySet ( )

Definition at line 95 of file AddressMap.java.

95  {
96  Set<String> set = new HashSet<>();
97  for(Address a : contact.getAddresses()) {
98  set.add(a.getDescription());
99  }
100  return set;
101  }
Here is the call graph for this function:

◆ put()

Address org.turro.contacts.AddressMap.put ( String  key,
Address  value 
)

Definition at line 75 of file AddressMap.java.

75  {
76  throw new UnsupportedOperationException("Not supported yet.");
77  }

◆ putAll()

void org.turro.contacts.AddressMap.putAll ( Map<? extends String, ? extends Address m)

Definition at line 85 of file AddressMap.java.

85  {
86  throw new UnsupportedOperationException("Not supported yet.");
87  }

◆ remove()

Address org.turro.contacts.AddressMap.remove ( Object  key)

Definition at line 80 of file AddressMap.java.

80  {
81  throw new UnsupportedOperationException("Not supported yet.");
82  }

◆ size()

int org.turro.contacts.AddressMap.size ( )

Definition at line 40 of file AddressMap.java.

40  {
41  return contact.getAddresses().size();
42  }
Here is the call graph for this function:

◆ values()

Collection<Address> org.turro.contacts.AddressMap.values ( )

Definition at line 104 of file AddressMap.java.

104  {
105  Collection<Address> list = new ArrayList<>();
106  for(Address a : contact.getAddresses()) {
107  list.add(a);
108  }
109  return list;
110  }
Here is the call graph for this function:

The documentation for this class was generated from the following file: