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 keywordssince- the version this module/property was introduced (can be empty)weight- ranking weight for search results
-
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 thesincerecord component.private final StringThe field for thetitlerecord component.private final StringThe field for thetyperecord component.private final StringThe field for theurlrecord component.private final intThe field for theweightrecord 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.since()Returns the value of thesincerecord 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.intweight()Returns the value of theweightrecord component.
-
Field Details
-
title
-
url
-
category
-
type
-
description
The field for thedescriptionrecord component. -
keywords
-
since
-
weight
private final int weightThe field for theweightrecord component. -
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, String since, int weight) 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 componentsince- the value for thesincerecord componentweight- the value for theweightrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
title
-
url
-
category
-
type
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
keywords
-
since
-
weight
-