Holger's
Java API

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

All Known Subinterfaces:
DocumentEntry, GEvent, GItem, SortedGroupable<T>
All Known Implementing Classes:
BaseDocument, ContactImpl, DBDocument, GEventEntry, GEventImpl, GPerson, GPersonalBlogEntry, ImageURLEntry, PersonImpl, SortedGroupable.Adapter, Taggable.Adapter

public interface Taggable<T extends Tag>

represents an object that can be a member of several groups

Since:
07.11.2008, 11:47:16
Author:
Holger Antelmann

Nested Class Summary
static class Taggable.Adapter<T extends Tag>
           
 
Method Summary
 boolean add(T tag)
          makes this instance member of the given group
 Collection<T> getTags()
          lists all groups that this instance is currently a member of (the data is essentially derived from a set)
 boolean isTagged(T tag)
          allows to determine the membership of the given tag or group
 boolean remove(T tag)
          terminates the membership of this instance to the given group
 

Method Detail

add

boolean add(T tag)
            throws IllegalArgumentException
makes this instance member of the given group

Parameters:
tag - 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

remove

boolean remove(T tag)
terminates the membership of this instance to the given group

Parameters:
tag - 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.

getTags

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


isTagged

boolean isTagged(T tag)
allows to determine the membership of the given tag or group



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