Record Class Listing
java.lang.Object
java.lang.Record
io.github.yvasyliev.telegramforwarderbot.reddit.dto.Listing
- Record Components:
after- the name of the last element in the listing, used for paginationdist- the number of elements in the listingmodhash- a hash used to prevent CSRF attacks, can be nullgeoFilter- a filter for geographical content, can be nullchildren- child elements of the listing, each containing aThingwith aLinkobjectbefore- the name of the first element in the listing, used for pagination
public record Listing(String after, Integer dist, String modhash, String geoFilter, List<Thing<Link>> children, String before)
extends Record
Represents a Reddit listing response.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionafter()Returns the value of theafterrecord component.before()Returns the value of thebeforerecord component.children()Returns the value of thechildrenrecord component.dist()Returns the value of thedistrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thegeoFilterrecord component.final inthashCode()Returns a hash code value for this object.modhash()Returns the value of themodhashrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Listing
public Listing(String after, Integer dist, String modhash, String geoFilter, List<Thing<Link>> children, String before) Creates an instance of aListingrecord class.- Parameters:
after- the value for theafterrecord componentdist- the value for thedistrecord componentmodhash- the value for themodhashrecord componentgeoFilter- the value for thegeoFilterrecord componentchildren- the value for thechildrenrecord componentbefore- the value for thebeforerecord 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. All components in this record class are compared withObjects::equals(Object,Object). -
after
Returns the value of theafterrecord component.- Returns:
- the value of the
afterrecord component
-
dist
Returns the value of thedistrecord component.- Returns:
- the value of the
distrecord component
-
modhash
Returns the value of themodhashrecord component.- Returns:
- the value of the
modhashrecord component
-
geoFilter
Returns the value of thegeoFilterrecord component.- Returns:
- the value of the
geoFilterrecord component
-
children
Returns the value of thechildrenrecord component.- Returns:
- the value of the
childrenrecord component
-
before
Returns the value of thebeforerecord component.- Returns:
- the value of the
beforerecord component
-