com.aetrion.flickr.photos
Class PhotoPlace

java.lang.Object
  extended by com.aetrion.flickr.photos.PhotoPlace

public class PhotoPlace
extends java.lang.Object

Represents either a photo pool or a photo set with it's id and title. Instances of this class are distinguished as set or pool by their kind property. There are two possible kinds represented as public int constants:

Version:
$Id: PhotoPlace.java,v 1.3 2009/07/12 22:43:07 x-mago Exp $
Author:
till (Till Krech) flickr:extranoise

Field Summary
static int POOL
           
static int SET
           
 
Constructor Summary
PhotoPlace(int kind, java.lang.String id, java.lang.String title)
          creates a new one.
PhotoPlace(java.lang.String kind, java.lang.String id, java.lang.String title)
          creates a new one where the kind may be specified as String "set" or "pool"
 
Method Summary
 boolean equals(java.lang.Object obj)
          compares this to another object.
 java.lang.String getId()
           
 int getKind()
           
 java.lang.String getKindAsString()
           
 java.lang.String getTitle()
           
 int hashCode()
          primitive hashCode.
protected  void setKind(int kind)
           
protected  void setKind(java.lang.String kindStr)
           
 java.lang.String toString()
          returns a human readable but ugly representation of this object
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

SET

public static final int SET
See Also:
Constant Field Values

POOL

public static final int POOL
See Also:
Constant Field Values
Constructor Detail

PhotoPlace

public PhotoPlace(int kind,
                  java.lang.String id,
                  java.lang.String title)
creates a new one.

Parameters:
kind - either SET or POOL
id - id of the pool or set
title - name of the pool or set
Throws:
java.lang.IllegalArgumentException - if kind is invalid

PhotoPlace

public PhotoPlace(java.lang.String kind,
                  java.lang.String id,
                  java.lang.String title)
creates a new one where the kind may be specified as String "set" or "pool"

Parameters:
kind - either "set" or "pool"
id - id of the pool or set
title - name of the pool or set
Throws:
java.lang.IllegalArgumentException - if kind is invalid
Method Detail

getId

public java.lang.String getId()
Returns:
the pool or set id

getKind

public int getKind()
Returns:
what I am

setKind

protected void setKind(int kind)

setKind

protected void setKind(java.lang.String kindStr)

getTitle

public java.lang.String getTitle()
Returns:
the name of the pool or set

getKindAsString

public java.lang.String getKindAsString()
Returns:
what I am as String

equals

public boolean equals(java.lang.Object obj)
compares this to another object. Makes is possible to put PhotPlaces into a Java Set.

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
primitive hashCode. Makes is possible to put PhotPlaces into a Java Set.

Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
returns a human readable but ugly representation of this object

Overrides:
toString in class java.lang.Object


Copyright (C) 2005-2008 Aetrion LLC. All Rights Reserved.