Class Image

java.lang.Object
  extended by Image

public class Image
extends java.lang.Object

An Image object contains the name of the file containing the image and a positive integer indicating the length of time (duration) the image should be displayed in hundredths of a seconds (i.e., 1/100 is 1 hundredth; 100 hundredths = 1). Do not modify this file in any way!


Constructor Summary
Image(java.lang.String fileName)
          Creates a new Image object with specified file name.
 
Method Summary
 int getDuration()
          Returns the duration for this image (in hundreths of seconds).
 java.lang.String getFile()
          Returns the file name associated with this image.
 void setDuration(int duration)
          Sets the duration for this image to the one given.
 java.lang.String toString()
          Returns the string representation of this image in the form:
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Image

public Image(java.lang.String fileName)
Creates a new Image object with specified file name. The durations is initially 0.

Parameters:
fileName - the name of the file containing the image.
Method Detail

getFile

public java.lang.String getFile()
Returns the file name associated with this image.

Returns:
the file associated with this image

getDuration

public int getDuration()
Returns the duration for this image (in hundreths of seconds).

Returns:
the duration for this image (in hundreths of seconds)

setDuration

public void setDuration(int duration)
Sets the duration for this image to the one given.

Parameters:
duration - the new duration (in hundreths of seconds) for this photo

toString

public java.lang.String toString()
Returns the string representation of this image in the form:

file_name [duration]

where the duration is given in hundredths of seconds

Overrides:
toString in class java.lang.Object
Returns:
The string representation of this photo.