Iterative
This commit is contained in:
@@ -1,40 +1,57 @@
|
||||
package dataStructures;
|
||||
|
||||
// This is a structure representing an image reponse for handing around.
|
||||
import java.awt.Color;
|
||||
|
||||
// This is a structure representing an image response for handing around.
|
||||
public class GenericImage
|
||||
{
|
||||
private String artist;
|
||||
private String postURL;
|
||||
private String imageURL;
|
||||
private KittyEmbed response= new KittyEmbed();
|
||||
|
||||
public GenericImage(String artist, String postURL, String imageURL)
|
||||
{
|
||||
this.artist = artist;
|
||||
this.postURL = postURL;
|
||||
this.imageURL = imageURL;
|
||||
response.authorText = null;
|
||||
response.color = new Color(0,0,0);
|
||||
}
|
||||
|
||||
public void editArtist(String artist)
|
||||
{
|
||||
this.artist = artist;
|
||||
response.authorText = artist;
|
||||
}
|
||||
|
||||
public void editAuthorImage(String URL)
|
||||
{
|
||||
response.authorImage = URL;
|
||||
}
|
||||
|
||||
public void editPostURL(String postURL)
|
||||
{
|
||||
this.postURL = postURL;
|
||||
response.authorLink = postURL;
|
||||
}
|
||||
|
||||
public void editImageURL(String imageURL)
|
||||
{
|
||||
this.imageURL = imageURL;
|
||||
response.imageURL = imageURL;
|
||||
}
|
||||
|
||||
public String toString()
|
||||
public void editDescriptionText(String score)
|
||||
{
|
||||
if(imageURL.isEmpty())
|
||||
{
|
||||
return "I couldn't find anything! Please try again!";
|
||||
}
|
||||
return "Artist: " + artist + "\n<" + postURL.trim() + ">\n" + imageURL;
|
||||
response.descriptionText = score;
|
||||
}
|
||||
|
||||
public void editFooterText(String tags)
|
||||
{
|
||||
response.footerText = tags;
|
||||
}
|
||||
|
||||
public KittyEmbed output()
|
||||
{
|
||||
return response;
|
||||
}
|
||||
|
||||
public boolean isValid()
|
||||
{
|
||||
if(response.title != null)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user