com.atlassian.fisheye.spi.admin.data
Class SimpleLinker
java.lang.Object
com.atlassian.fisheye.spi.admin.data.AbstractLinker
com.atlassian.fisheye.spi.admin.data.SimpleLinker
public class SimpleLinker
- extends AbstractLinker
|
Method Summary |
boolean |
equals(java.lang.Object o)
|
java.lang.String |
getHref()
|
java.util.regex.Pattern |
getRegex()
|
int |
hashCode()
|
static boolean |
isValidHref(java.lang.String href)
Whether href is a valid linker URL, meaning it must include
the protocol as a prefix, e.g., "http://". |
void |
setHref(java.lang.String href)
Set the linker's href attribute. |
void |
setRegex(java.util.regex.Pattern regex)
Set the regex used to match a linker. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
SimpleLinker
public SimpleLinker(java.util.regex.Pattern regex,
java.lang.String href)
- Create a simple linker.
See setRegex(java.util.regex.Pattern) and setHref(String)
for restrictions on the arguments.
SimpleLinker
public SimpleLinker(SimpleLinker sl)
getRegex
public java.util.regex.Pattern getRegex()
setRegex
public void setRegex(java.util.regex.Pattern regex)
- Set the regex used to match a linker.
- Throws:
java.lang.NullPointerException - if regex is null
getHref
public java.lang.String getHref()
setHref
public void setHref(java.lang.String href)
- Set the linker's href attribute.
- Throws:
java.lang.NullPointerException - if href is null
java.lang.IllegalArgumentException - if href isn't a valid URL (see isValidHref(String)
isValidHref
public static boolean isValidHref(java.lang.String href)
- Whether href is a valid linker URL, meaning it must include
the protocol as a prefix, e.g., "http://".
- Throws:
java.lang.NullPointerException - if href is null
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode in class java.lang.Object