Holger's
Java API

com.antelmann.db
Class SortedGroupable.Adapter<T extends Tag>

java.lang.Object
  extended by com.antelmann.db.SortedGroupable.Adapter<T>
All Implemented Interfaces:
SortedGroupable<T>, Taggable<T>
Enclosing interface:
SortedGroupable<T extends Tag>

public static class SortedGroupable.Adapter<T extends Tag>
extends Object
implements SortedGroupable<T>


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.antelmann.db.SortedGroupable
SortedGroupable.Adapter<T extends Tag>
 
Constructor Summary
SortedGroupable.Adapter()
           
 
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.
 Collection<T> getTags()
          lists all groups that this instance is currently a member of (the data is essentially derived from a set)
 boolean insertAt(T group, int index)
          inserts the given group at the given index
 boolean isTagged(T group)
          allows to determine the membership of the given tag or group
 boolean remove(T group)
          terminates the membership of this instance to the given group
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SortedGroupable.Adapter

public SortedGroupable.Adapter()
Method Detail

add

public boolean add(T group)
            throws IllegalArgumentException
Description copied from interface: SortedGroupable
the given group is appended to the list of groups

Specified by:
add in interface SortedGroupable<T extends Tag>
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

getTags

public Collection<T> getTags()
Description copied from interface: Taggable
lists all groups that this instance is currently a member of (the data is essentially derived from a set)

Specified by:
getTags in interface Taggable<T extends Tag>

isTagged

public boolean isTagged(T group)
Description copied from interface: Taggable
allows to determine the membership of the given tag or group

Specified by:
isTagged in interface Taggable<T extends Tag>

remove

public boolean remove(T group)
Description copied from interface: Taggable
terminates the membership of this instance to the given group

Specified by:
remove in interface Taggable<T extends Tag>
Parameters:
group - the Group that this instance is to be removed from as a member
Returns:
true only if this instance was previously a member of the given group.

insertAt

public boolean insertAt(T group,
                        int index)
Description copied from interface: SortedGroupable
inserts the given group at the given index

Specified by:
insertAt in interface SortedGroupable<T extends Tag>

getSortedGroups

public List<T> getSortedGroups()
Description copied from interface: SortedGroupable
lists all groups that this instance is currently a member of while ordering them by relevance.

Specified by:
getSortedGroups in interface SortedGroupable<T extends Tag>


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