Record Class SearchIndexEntry
java.lang.Object
java.lang.Record
com.puppycrawl.tools.checkstyle.site.SearchIndexEntry
- Record Components:
title- display nameurl- relative URLcategory- category labeltype- document typedescription- short descriptionkeywords- comma-separated keywords
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intMaximum ASCII value for the lookup table.private final StringThe field for thecategoryrecord component.private static final StringString literal for comma.private final StringThe field for thedescriptionrecord component.private static final String[]Lookup table for JSON escape sequences for characters < 128 (ASCII range).private final StringThe field for thekeywordsrecord component.private final StringThe field for thetitlerecord component.private final StringThe field for thetyperecord component.private final StringThe field for theurlrecord component. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncategory()Returns the value of thecategoryrecord component.Returns the value of thedescriptionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.private static StringjsonString(String value) Wraps a string value in JSON double quotes and escapes special characters.keywords()Returns the value of thekeywordsrecord component.title()Returns the value of thetitlerecord component.toJson()Serialises this entry to a compact JSON object string.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.url()Returns the value of theurlrecord component.
-
Field Details
-
title
-
url
-
category
-
type
-
description
The field for thedescriptionrecord component. -
keywords
-
COMMA
-
ASCII_MAX
private static final int ASCII_MAXMaximum ASCII value for the lookup table.- See Also:
-
JSON_ESCAPES
Lookup table for JSON escape sequences for characters < 128 (ASCII range).
-
-
Constructor Details
-
SearchIndexEntry
public SearchIndexEntry(String title, String url, String category, String type, String description, String keywords) Creates an instance of aSearchIndexEntryrecord class.- Parameters:
title- the value for thetitlerecord componenturl- the value for theurlrecord componentcategory- the value for thecategoryrecord componenttype- the value for thetyperecord componentdescription- the value for thedescriptionrecord componentkeywords- the value for thekeywordsrecord component
-
-
Method Details
-
toJson
Serialises this entry to a compact JSON object string.- Returns:
- JSON object string
-
jsonString
-
toString
-
hashCode
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
title
-
url
-
category
-
type
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
keywords
-