Package de.craftsblock.craftsnet.api
Record Class RouteRegistry.ShareMapping
java.lang.Object
java.lang.Record
de.craftsblock.craftsnet.api.RouteRegistry.ShareMapping
- All Implemented Interfaces:
RouteRegistry.Mapping
- Enclosing class:
- RouteRegistry
public static record RouteRegistry.ShareMapping(@NotNull String filepath, boolean onlyGet)
extends Record
implements RouteRegistry.Mapping
The ShareMapping class represents the mapping of a registered shared endpoint.
It stores information about the filesystem path and if only get requests should be processed.
- Since:
- 3.0.3-SNAPSHOT
-
Constructor Summary
ConstructorsConstructorDescriptionShareMapping(@NotNull String filepath, boolean onlyGet) Creates an instance of aShareMappingrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.@NotNull Stringfilepath()Returns the value of thefilepathrecord component.final inthashCode()Returns a hash code value for this object.booleanonlyGet()Returns the value of theonlyGetrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface de.craftsblock.craftsnet.api.RouteRegistry.Mapping
getRequirements, getRequirements, isPresent, isPresent
-
Constructor Details
-
ShareMapping
Creates an instance of aShareMappingrecord class.- Parameters:
filepath- the value for thefilepathrecord componentonlyGet- the value for theonlyGetrecord 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 '=='. -
filepath
Returns the value of thefilepathrecord component.- Returns:
- the value of the
filepathrecord component
-
onlyGet
public boolean onlyGet()Returns the value of theonlyGetrecord component.- Returns:
- the value of the
onlyGetrecord component
-