Blue Mind
Release 1.0

net.bluemind.core.api.calendar
Class Attendees

java.lang.Object
  extended by net.bluemind.core.api.calendar.Attendees

public class Attendees
extends java.lang.Object

Collection of Attendee.

This can be used to perform operations on all the Attendees of an Event. It also can be used to compare two Attendees.


Constructor Summary
Attendees()
          Constructs an empty list.
Attendees(java.util.List<Attendee> attendees)
          Constructs a list containing the Attendee of the specified list.
 
Method Summary
 boolean contains(Attendee a)
          Returns true if this list contains the specified Attendee.
 java.util.List<Attendee> diff(Attendees atts)
          Compare this list with the list atts and return the Attendees present in the present list but not contained in atts
 Attendee getAttendee(Attendee a)
          Returns the Attendee contained in the list and that match a.
 java.util.List<Attendee> getAttendees()
          Get all Attendee contained in this list as a List.
 java.util.List<Attendee> same(Attendees atts)
          Compare this list with the list atts and return the Attendees present in both lists.
 void setAttendees(java.util.LinkedList<Attendee> attendees)
          Replace all Attendee contained in this list by the elements contained in the list attendees.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Attendees

public Attendees()
Constructs an empty list.


Attendees

public Attendees(java.util.List<Attendee> attendees)
Constructs a list containing the Attendee of the specified list.

Parameters:
attendees - the collection whose Attendee are to be placed into this list
Method Detail

setAttendees

public void setAttendees(java.util.LinkedList<Attendee> attendees)
Replace all Attendee contained in this list by the elements contained in the list attendees.

Parameters:
attendees - collection containing elements to be added to this list

getAttendees

public java.util.List<Attendee> getAttendees()
Get all Attendee contained in this list as a List.

Returns:
Collection containing all elements of this list.

diff

public java.util.List<Attendee> diff(Attendees atts)
Compare this list with the list atts and return the Attendees present in the present list but not contained in atts

Parameters:
atts - The list to make a diff with.
Returns:
The collection of Attendee present in this list but absent from atts.

same

public java.util.List<Attendee> same(Attendees atts)
Compare this list with the list atts and return the Attendees present in both lists.

Parameters:
atts - The list to make a intersection with.
Returns:
The collection of Attendee present in both this list and atts.

contains

public boolean contains(Attendee a)
Returns true if this list contains the specified Attendee. More formally, returns true if and only if this collection contains at least one Attendee e such that

e.getType().equals(a.getType()) && e.getId() == a.getId()

or

e.getEmail() != null && e.getEmail().equals(a.getEmail()

Parameters:
a - Attendee whose presence in this list is to be tested
Returns:
true if this list contains the specified Attendee

getAttendee

public Attendee getAttendee(Attendee a)
Returns the Attendee contained in the list and that match a. More formally, returns the Attendee e that match

e.getType().equals(a.getType()) && e.getId() == a.getId()

or

e.getEmail() != null && e.getEmail().equals(a.getEmail()

Parameters:
a - Attendee that the element return will match
Returns:
the Attendee matching conditions.

Blue Mind
Release 1.0