public class ImageEntry extends java.lang.Object implements java.lang.Comparable<ImageEntry>, java.util.Comparator<ImageEntry>
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
alt |
private long |
fileSize |
private int |
height |
private DigestURL |
imageurl |
private AnchorURL |
linkurl |
private int |
width |
Constructor and Description |
---|
ImageEntry(DigestURL imageurl,
java.lang.String alt,
int width,
int height,
long fileSize)
an ImageEntry represents the appearance of an image in a document.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
alt() |
int |
compare(ImageEntry o1,
ImageEntry o2) |
int |
compareTo(ImageEntry h) |
boolean |
equals(java.lang.Object o) |
long |
fileSize() |
int |
hashCode() |
int |
height() |
AnchorURL |
linkurl() |
void |
setLinkurl(AnchorURL linkurl) |
java.lang.String |
toString() |
DigestURL |
url() |
int |
width() |
private final DigestURL imageurl
private AnchorURL linkurl
private final java.lang.String alt
private final int width
private final int height
private final long fileSize
public ImageEntry(DigestURL imageurl, java.lang.String alt, int width, int height, long fileSize)
imageurl
- the link to the imagelinkurl
- the link which is called when the image is pressed on a web browser. null if the image was not used as link buttonanchortext
- the text inside the anchor body where the image link appears (including the image tag). null if the image was not used as link buttonalt
- the als text in the alt tagwidth
- the width of the image if known, or -1 if unknownheight
- the height of the image if known, or -1 if unknownfileSize
- the number of bytes that the image uses on file or -1 if unknownpublic DigestURL url()
public void setLinkurl(AnchorURL linkurl)
public AnchorURL linkurl()
public java.lang.String alt()
public int width()
public int height()
public long fileSize()
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public int compareTo(ImageEntry h)
compareTo
in interface java.lang.Comparable<ImageEntry>
public int compare(ImageEntry o1, ImageEntry o2)
compare
in interface java.util.Comparator<ImageEntry>
public boolean equals(java.lang.Object o)
equals
in interface java.util.Comparator<ImageEntry>
equals
in class java.lang.Object