comics.core
Class ComicURLFactory

java.lang.Object
  extended bycomics.core.ComicURLFactory

public class ComicURLFactory
extends java.lang.Object

This class creates URLs based on the specified comic provider, comic name and date.

Author:
Lennart Martens

Field Summary
static java.lang.String UCOMICS
          The comic provider 'UComics'.
 
Constructor Summary
ComicURLFactory()
           
 
Method Summary
static java.net.URL createURL(java.lang.String aComicProvider, java.lang.String aComicName, java.util.Calendar aDate)
          This factory method creates a comic retrieval URL, based on the specified comic provider (eg.
static java.net.URL createURL(java.lang.String aComicProvider, java.lang.String aComicName, java.util.Date aDate)
          This factory method creates a comic retrieval URL, based on the specified comic provider (eg.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UCOMICS

public static final java.lang.String UCOMICS
The comic provider 'UComics'.

See Also:
Constant Field Values
Constructor Detail

ComicURLFactory

public ComicURLFactory()
Method Detail

createURL

public static java.net.URL createURL(java.lang.String aComicProvider,
                                     java.lang.String aComicName,
                                     java.util.Calendar aDate)
This factory method creates a comic retrieval URL, based on the specified comic provider (eg. UComics), comic name (eg. 'ga' for Garfield at UComics) and date.

Parameters:
aComicProvider - String with the comic provider. Please restrict this parameter to the constants defined on this class. They constitute the only supported comic providers.
aComicName - String with the name of the comic, this name is specific for the provider
aDate - Calendar with the date for which the specified comic should be retrieved.
Returns:
URL pointing to the desired comic image.

createURL

public static java.net.URL createURL(java.lang.String aComicProvider,
                                     java.lang.String aComicName,
                                     java.util.Date aDate)
This factory method creates a comic retrieval URL, based on the specified comic provider (eg. UComics), comic name (eg. 'ga' for Garfield at UComics) and date (Date class is converted to a Calendar class through a GregorianCalendar).

Parameters:
aComicProvider - String with the comic provider. Please restrict this parameter to the constants defined on this class. They constitute the only supported comic providers.
aComicName - String with the name of the comic, this name is specific for the provider
aDate - Date with the date for which the specified comic should be retrieved. This Date will be converted to a GregorianCalendar via the setTime method on GregorianCalendar.
Returns:
URL pointing to the desired comic image.


Copyright © Lennart Martens. All Rights Reserved.