Package Torello.REST

Class 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



    • Field Detail

      • serialVersionUID

        protected static final long serialVersionUID
        This fulfils the SerialVersion UID requirement for all classes that implement Java's interface java.io.Serializable. Using the Serializable 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
        The URL 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 of Thumbnail
        Parameters:
        name - The name of this thumbnail. This is usually text such as 'default', 'medium', or 'high'.
        imageURL - This is the image URL
        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 a String.
        Overrides:
        toString in class java.lang.Object
        Returns:
        This Thumbnail as a java.lang.String.
        Code:
        Exact Method Body:
        1
         return "(" + width + "x" + height + ")\n" + imageURL;
        
      • clone

        public YouTube.Thumbnail clone()
        Clone's 'this' instance of Thumbnail
        Overrides:
        clone in class java.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);