Holger's
Java API

com.antelmann.db
Interface SortedGroupable<T extends Tag>

All Superinterfaces:
Taggable<T>
All Known Implementing Classes:
SortedGroupable.Adapter

public interface SortedGroupable<T extends Tag>
extends Taggable<T>

same as a Groupable, except this one also supports a stable order of groups, meaning the groups are prioritized. Here, the groups must be maintained as a list (still with unique elements) as opposed to a set.

Since:
22.04.2009, 17:29:07
Author:
Holger Antelmann

Nested Class Summary
static class SortedGroupable.Adapter<T extends Tag>
           
 
Method Summary
 boolean add(T group)
          the given group is appended to the list of groups
 List<T> getSortedGroups()
          lists all groups that this instance is currently a member of while ordering them by relevance.
 boolean insertAt(T group, int index)
          inserts the given group at the given index
 
Methods inherited from interface com.antelmann.db.Taggable
getTags, isTagged, remove
 

Method Detail

insertAt

boolean insertAt(T group,
                 int index)
inserts the given group at the given index


getSortedGroups

List<T> getSortedGroups()
lists all groups that this instance is currently a member of while ordering them by relevance.


add

boolean add(T group)
            throws IllegalArgumentException
the given group is appended to the list of groups

Specified by:
add in interface Taggable<T extends Tag>
Parameters:
group - the Group object that this instance is to become a member of
Returns:
true only if the group was actually added to this instance or false if it already was a member of that group
Throws:
IllegalArgumentException - if this instance cannot be part of the given group


(c) Holger Antelmann since 2001- all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads