Methods Summary |
---|
public RecipientInformation | get(RecipientId selector)Return the first RecipientInformation object that matches the
passed in selector. Null if there are no matches.
Object o = table.get(selector);
if (o instanceof List)
{
return (RecipientInformation)((List)o).get(0);
}
else
{
return (RecipientInformation)o;
}
|
public java.util.Collection | getRecipients()Return all recipients in the collection
List list = new ArrayList(table.size());
Iterator it = table.values().iterator();
while (it.hasNext())
{
Object o = it.next();
if (o instanceof List)
{
list.addAll((List)o);
}
else
{
list.add(o);
}
}
return list;
|
public java.util.Collection | getRecipients(RecipientId selector)Return possible empty collection with recipients matching the passed in RecipientId
Object o = table.get(selector);
if (o instanceof List)
{
return new ArrayList((List)o);
}
else if (o != null)
{
return Collections.singletonList(o);
}
return new ArrayList();
|
public int | size()Return the number of recipients in the collection.
Iterator it = table.values().iterator();
int count = 0;
while (it.hasNext())
{
Object o = it.next();
if (o instanceof List)
{
count += ((List)o).size();
}
else
{
count++;
}
}
return count;
|