Record Class SitemapEntry
java.lang.Object
java.lang.Record
com.endurancetrio.business.common.dto.SitemapEntry
- Record Components:
urlEn- the absolute URL of the English variant (must be non-null and non-blank)urlPt- the absolute URL of the Portuguese variant (must be non-null and non-blank)lastModified- the ISO-8601 date the page was last modified, ornullwhen unknownpriority- the sitemap priority of the page, between 0.0 and 1.0
public record SitemapEntry(String urlEn, String urlPt, String lastModified, double priority)
extends Record
SitemapEntry represents a single <url> element of the generated
/sitemap.xml, pairing the English and Portuguese variants of the same page so the
sitemap template can emit hreflang annotations.-
Constructor Summary
ConstructorsConstructorDescriptionSitemapEntry(String urlEn, String urlPt, String lastModified, double priority) Creates an instance of aSitemapEntryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thelastModifiedrecord component.doublepriority()Returns the value of thepriorityrecord component.final StringtoString()Returns a string representation of this record class.urlEn()Returns the value of theurlEnrecord component.urlPt()Returns the value of theurlPtrecord component.
-
Constructor Details
-
SitemapEntry
Creates an instance of aSitemapEntryrecord class.- Parameters:
urlEn- the value for theurlEnrecord componenturlPt- the value for theurlPtrecord componentlastModified- the value for thelastModifiedrecord componentpriority- the value for thepriorityrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
urlEn
Returns the value of theurlEnrecord component.- Returns:
- the value of the
urlEnrecord component
-
urlPt
Returns the value of theurlPtrecord component.- Returns:
- the value of the
urlPtrecord component
-
lastModified
Returns the value of thelastModifiedrecord component.- Returns:
- the value of the
lastModifiedrecord component
-
priority
public double priority()Returns the value of thepriorityrecord component.- Returns:
- the value of the
priorityrecord component
-