Record Class HubOrigins.Origin
java.lang.Object
java.lang.Record
com.iizix.server.hub.HubOrigins.Origin
- Record Components:
scheme-httporhttps.host- The host, lower case.port- The port.
- Enclosing class:
HubOrigins
Constructor Summary
ConstructorsMethod Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.host()Returns the value of thehostrecord component.booleanTells whether this origin matches a normalised pattern ofHubDefinitionFile.normalizeOrigin(String), with a*.wildcard on the host and the scheme's default port when it names none.intport()Returns the value of theportrecord component.scheme()Returns the value of theschemerecord component.final StringtoString()Returns a string representation of this record class.
Constructor Details
Origin
Method Details
matches
Tells whether this origin matches a normalised pattern ofHubDefinitionFile.normalizeOrigin(String), with a*.wildcard on the host and the scheme's default port when it names none.- Parameters:
pattern- The normalised pattern, e.g.https://*.iizi.coorhttp://localhost:8080.- Returns:
- true when matched.
toString
hashCode
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 thecomparemethod from their corresponding wrapper classes.scheme
host
port