Package com.attribyte.parser.model
Class Anchor
java.lang.Object
com.attribyte.parser.model.Anchor
An immutable anchor element.
- Author:
- Matt Hamer
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
href
The href attribute. -
title
The title attribute. -
anchorText
The anchor text.
-
-
Constructor Details
-
Anchor
Creates an anchor.- Null values converted to empty string
- Values trimmed
- Parameters:
href- The href.title- The title.anchorText- The anchor text (text content of 'a' element).
-
-
Method Details
-
toString
-
hashCode
public int hashCode() -
equals
-
matchesDomain
public boolean matchesDomain(com.google.common.net.InternetDomainName checkDomain) Determine if the domain name for the href matches a specified domain name.- Parameters:
checkDomain- The domain to check.- Returns:
- Does the domain match?
-