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 aThing
with aLink
objectbefore
- 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 theafter
record component.before()
Returns the value of thebefore
record component.children()
Returns the value of thechildren
record component.dist()
Returns the value of thedist
record component.final boolean
Indicates whether some other object is "equal to" this one.Returns the value of thegeoFilter
record component.final int
hashCode()
Returns a hash code value for this object.modhash()
Returns the value of themodhash
record component.final String
toString()
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 aListing
record class.- Parameters:
after
- the value for theafter
record componentdist
- the value for thedist
record componentmodhash
- the value for themodhash
record componentgeoFilter
- the value for thegeoFilter
record componentchildren
- the value for thechildren
record componentbefore
- the value for thebefore
record 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 theafter
record component.- Returns:
- the value of the
after
record component
-
dist
Returns the value of thedist
record component.- Returns:
- the value of the
dist
record component
-
modhash
Returns the value of themodhash
record component.- Returns:
- the value of the
modhash
record component
-
geoFilter
Returns the value of thegeoFilter
record component.- Returns:
- the value of the
geoFilter
record component
-
children
Returns the value of thechildren
record component.- Returns:
- the value of the
children
record component
-
before
Returns the value of thebefore
record component.- Returns:
- the value of the
before
record component
-