public class SimpleLinker extends AbstractLinker
description| Constructor and Description |
|---|
SimpleLinker(java.util.regex.Pattern regex,
java.lang.String href)
Create a simple linker.
|
SimpleLinker(SimpleLinker sl) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
java.lang.String |
getHref() |
java.util.regex.Pattern |
getRegex() |
int |
hashCode() |
static boolean |
isValidHref(java.lang.String s)
Verify whether
s is a valid URI. |
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.
|
getDescription, setDescriptionpublic SimpleLinker(java.util.regex.Pattern regex,
java.lang.String href)
See setRegex(java.util.regex.Pattern) and setHref(String)
for restrictions on the arguments.
public SimpleLinker(SimpleLinker sl)
public java.util.regex.Pattern getRegex()
public void setRegex(java.util.regex.Pattern regex)
java.lang.NullPointerException - if regex is nullpublic java.lang.String getHref()
public void setHref(java.lang.String href)
java.lang.NullPointerException - if href is nulljava.lang.IllegalArgumentException - if href isn't a valid URL (see isValidHref(String)public static boolean isValidHref(java.lang.String s)
s is a valid URI.true if the s is an URIpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object