public class SponsoredLink extends Object implements Comparable<SponsoredLink>
compareTo| Modifier and Type | Field and Description |
|---|---|
static int |
ALT
Key for the alt attribute in the link
|
static int |
CONTENT
Key for the content in the link
|
static int |
HREF
Key for the href attribute in the link
|
static int |
TITLE
Key for the title attribute in the link
|
| Constructor and Description |
|---|
SponsoredLink() |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(SponsoredLink otherLink)
Defines the ordering of SponsoredLink object based on their
order |
String |
getLink() |
String |
getLinkAttribute(int nAttr)
Parses the link to find the specified attribute or the content.
|
int |
getOrder() |
boolean |
isValidLink()
Check if the link is a valid html link (as returned by an InsertService).
|
void |
setLink(String link)
Sets the html link of this SponsoredLink
|
void |
setOrder(int order)
Sets the order of the SponsoredLink in the set
|
public static final int HREF
public static final int TITLE
public static final int ALT
public static final int CONTENT
public int getOrder()
public void setOrder(int order)
order - The order in the setpublic String getLink()
public void setLink(String link)
link - The urlpublic int compareTo(SponsoredLink otherLink)
ordercompareTo in interface Comparable<SponsoredLink>otherLink - the SponsoredLink to be comparedpublic boolean isValidLink()
public String getLinkAttribute(int nAttr)
nAttr - the key for the attribute. Has to be in the set
{ALT, HREF, TITLE, CONTENT}Copyright © 2015 City of Paris. All rights reserved.