DJDoc v.1.0.0b-1

net.sf.djdoc.util
Class ItemList

java.lang.Object
  extended by net.sf.djdoc.util.ItemList
All Implemented Interfaces:
HittableList<Item>

public class ItemList
extends java.lang.Object
implements HittableList<Item>

The ItemList class represents a user-specific list of all available class items (i.e. classes, interfaces, enums etc.) of a package, together with information about the most recently and most often accessed items.


Constructor Summary
ItemList(java.lang.String apiName, java.lang.String bunchName, User user)
          Public constructor.
 
Method Summary
 Item get(java.lang.String targetName)
          This method finds a particular Item object among this ItemList's class items.
 java.util.Collection<Item> getAll()
          Collection valued getter method for all class items in this ItemList.
 java.util.Collection<Item> getFavorite()
          Collection valued getter method for the most often accessed class items in this ItemList.
 java.lang.String getParentName()
          Getter method for the name of this list's parent object.
 java.util.Collection<Item> getRecent()
          Collection valued getter method for the most recently accessed class items in this ItemList.
 boolean hasHits()
          This method is used to determine whether this ItemList's package has any previously accessed class items or not.
 void hit(java.lang.String targetName)
          This method marks a particular Item object among this ItemList's class items as currently accessed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ItemList

public ItemList(java.lang.String apiName,
                java.lang.String bunchName,
                User user)
Public constructor. Initializes the list with the name of the API, the name of the package and the User.

Parameters:
apiName - The name of the API of the package whose items are kept in this ItemList
bunchName - The name of the package the items of which are kept in this list
user - The user determining the access history for the item list
Method Detail

getParentName

public java.lang.String getParentName()
Getter method for the name of this list's parent object.

Specified by:
getParentName in interface HittableList<Item>
Returns:
The name of this ItemList's package

getFavorite

public java.util.Collection<Item> getFavorite()
Collection valued getter method for the most often accessed class items in this ItemList.

Specified by:
getFavorite in interface HittableList<Item>
Returns:
A Collection of the top favorite class items of this ItemList

getRecent

public java.util.Collection<Item> getRecent()
Collection valued getter method for the most recently accessed class items in this ItemList.

Specified by:
getRecent in interface HittableList<Item>
Returns:
A Collection of the most recently accessed class items of this ItemList

getAll

public java.util.Collection<Item> getAll()
Collection valued getter method for all class items in this ItemList.

Specified by:
getAll in interface HittableList<Item>
Returns:
A Collection of all packages of this BunchList

get

public Item get(java.lang.String targetName)
This method finds a particular Item object among this ItemList's class items.

Specified by:
get in interface HittableList<Item>
Parameters:
targetName - The name of the class item to be found
Returns:
The Item object of this list with the specified name

hit

public void hit(java.lang.String targetName)
This method marks a particular Item object among this ItemList's class items as currently accessed.

Specified by:
hit in interface HittableList<Item>
Parameters:
targetName - The name of the class item to be marked accessed

hasHits

public boolean hasHits()
This method is used to determine whether this ItemList's package has any previously accessed class items or not.

Specified by:
hasHits in interface HittableList<Item>
Returns:
true if this ItemList's package has accessed class items; false otherwise

DJDoc v.1.0.0b-1