Package Torello.REST
Class YouTube.Thumbnail
- java.lang.Object
-
- Torello.REST.YouTube.Thumbnail
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
- Enclosing class:
- YouTube
public static class YouTube.Thumbnail extends java.lang.Object implements java.io.Serializable, java.lang.Cloneable
YouTube.Thumbnail Documentation.
This is a small "Return Result" class. Whenever a user performs a video search for videos on YouTube, the returned results that are encapsulated in this class.- See Also:
- Serialized Form
Hi-Lited Source-Code:
- View Here: Torello/REST/YouTube.java
- Open New Browser-Tab: Torello/REST/YouTube.java
-
-
Field Summary
Fields Modifier and Type Field short
height
String
imageURL
String
name
protected static long
serialVersionUID
short
width
-
Constructor Summary
Constructors Constructor Thumbnail(String name, String imageURL, short width, short height)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method YouTube.Thumbnail
clone()
String
toString()
-
-
-
Field Detail
-
serialVersionUID
protected static final long serialVersionUID
This fulfils the SerialVersion UID requirement for all classes that implement Java'sinterface java.io.Serializable
. Using theSerializable
Implementation offered by java is very easy, and can make saving program state when debugging a lot easier. It can also be used in place of more complicated systems like "hibernate" to store data as well.- See Also:
- Constant Field Values
- Code:
- Exact Field Declaration Expression:
1
protected static final long serialVersionUID = 1;
-
name
public final java.lang.String name
The name of the thumbnail result. Common values for this field include:"default", "medium", "high", "low"
(medium, high as in 'resolution').- Code:
- Exact Field Declaration Expression:
1
public final String name;
-
imageURL
public final java.lang.String imageURL
TheURL
of the thumbnail image for a YouTube Video.- Code:
- Exact Field Declaration Expression:
1
public final String imageURL;
-
width
public final short width
The width of the thumbnail image.- Code:
- Exact Field Declaration Expression:
1
public final short width;
-
height
public final short height
The height of the thumbnail image.- Code:
- Exact Field Declaration Expression:
1
public final short height;
-
-
Constructor Detail
-
Thumbnail
public Thumbnail(java.lang.String name, java.lang.String imageURL, short width, short height)
Constructs an instance ofThumbnail
- Parameters:
name
- The name of this thumbnail. This is usually text such as'default', 'medium', or 'high'
.imageURL
- This is the imageURL
width
- The width of the image.height
- The height of the image.
-
-
Method Detail
-
toString
public java.lang.String toString()
This converts this thumbnail image data to aString
.- Overrides:
toString
in classjava.lang.Object
- Returns:
- This
Thumbnail
as ajava.lang.String
. - Code:
- Exact Method Body:
1
return "(" + width + "x" + height + ")\n" + imageURL;
-
clone
public YouTube.Thumbnail clone()
Clone's'this'
instance ofThumbnail
- Overrides:
clone
in classjava.lang.Object
- Returns:
- An identical clone of this instance of
Thumbnail
- Code:
- Exact Method Body:
1
return new Thumbnail(this.name, this.imageURL, this.width, this.height);
-
-