Package dk.mada.jaxrs.model.api
Record Class ContentSelector.ContentContext
java.lang.Object
java.lang.Record
dk.mada.jaxrs.model.api.ContentSelector.ContentContext
- Record Components:
resourcePath
- the resource path where the content needs lookup. Used for error output only.isRequired
- true if the content is requiredlocation
- the location of the content
- Enclosing class:
- ContentSelector
public static record ContentSelector.ContentContext(String resourcePath, boolean isRequired, ContentSelector.Location location)
extends Record
The context of a content lookup.
-
Constructor Summary
ConstructorDescriptionContentContext
(String resourcePath, boolean isRequired, ContentSelector.Location location) Creates an instance of aContentContext
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.boolean
Returns the value of theisRequired
record component.location()
Returns the value of thelocation
record component.Returns the value of theresourcePath
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
ContentContext
Creates an instance of aContentContext
record class.- Parameters:
resourcePath
- the value for theresourcePath
record componentisRequired
- the value for theisRequired
record componentlocation
- the value for thelocation
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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
resourcePath
Returns the value of theresourcePath
record component.- Returns:
- the value of the
resourcePath
record component
-
isRequired
public boolean isRequired()Returns the value of theisRequired
record component.- Returns:
- the value of the
isRequired
record component
-
location
Returns the value of thelocation
record component.- Returns:
- the value of the
location
record component
-