Package dev.latvian.mods.kubejs.web
Record Class LocalWebServer
java.lang.Object
java.lang.Record
dev.latvian.mods.kubejs.web.LocalWebServer
public record LocalWebServer(KJSHTTPServer server, String url, List<LocalWebServer.Endpoint> endpoints, String explorerCode)
extends Record
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionLocalWebServer(KJSHTTPServer server, String url, List<LocalWebServer.Endpoint> endpoints, String explorerCode) Creates an instance of aLocalWebServerrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theendpointsrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theexplorerCoderecord component.final inthashCode()Returns a hash code value for this object.static @Nullable LocalWebServerinstance()server()Returns the value of theserverrecord component.static voidstart(net.minecraft.util.thread.BlockableEventLoop<?> eventLoop, boolean localClient) final StringtoString()Returns a string representation of this record class.url()Returns the value of theurlrecord component.
-
Constructor Details
-
LocalWebServer
public LocalWebServer(KJSHTTPServer server, String url, List<LocalWebServer.Endpoint> endpoints, String explorerCode) Creates an instance of aLocalWebServerrecord class.- Parameters:
server- the value for theserverrecord componenturl- the value for theurlrecord componentendpoints- the value for theendpointsrecord componentexplorerCode- the value for theexplorerCoderecord component
-
-
Method Details
-
instance
-
start
@HideFromJS public static void start(net.minecraft.util.thread.BlockableEventLoop<?> eventLoop, boolean localClient) -
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). -
server
Returns the value of theserverrecord component.- Returns:
- the value of the
serverrecord component
-
url
Returns the value of theurlrecord component.- Returns:
- the value of the
urlrecord component
-
endpoints
Returns the value of theendpointsrecord component.- Returns:
- the value of the
endpointsrecord component
-
explorerCode
Returns the value of theexplorerCoderecord component.- Returns:
- the value of the
explorerCoderecord component
-