DJDoc v.1.0.0b-1

net.sf.djdoc.util
Class BunchList

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

public class BunchList
extends java.lang.Object
implements HittableList<Bunch>

The BunchList class represents a user-specific list of all available packages of an API, together with information about the most recently and most often accessed packages.


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

Constructor Detail

BunchList

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

Parameters:
apiName - The name of the API whose packages are kept in this list
user - The user determining the access history for the package 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<Bunch>
Returns:
The name of this BunchList's API

getFavorite

public java.util.Collection<Bunch> getFavorite()
Collection valued getter method for the most often accessed packages in this BunchList.

Specified by:
getFavorite in interface HittableList<Bunch>
Returns:
A Collection of the top favorite packages of this BunchList

getRecent

public java.util.Collection<Bunch> getRecent()
Collection valued getter method for the most recently accessed packages in this BunchList.

Specified by:
getRecent in interface HittableList<Bunch>
Returns:
A Collection of the most recently accessed packages of this BunchList

getAll

public java.util.Collection<Bunch> getAll()
Collection valued getter method for all packages in this BunchList.

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

get

public Bunch get(java.lang.String targetName)
This method finds a particular Bunch object among this BunchList's packages.

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

hit

public void hit(java.lang.String targetName)
This method marks a particular Bunch object among this BunchList's packages as currently accessed.

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

hasHits

public boolean hasHits()
This method is used to determine whether this BunchList's API has any previously accessed packages or not.

Specified by:
hasHits in interface HittableList<Bunch>
Returns:
true if this BunchList's API has accessed packages; false otherwise

DJDoc v.1.0.0b-1