Record Class UrlHost.Parts
java.lang.Object
java.lang.Record
io.github.jbastgen.stemma.app.git.UrlHost.Parts
- Enclosing class:
UrlHost
https, ssh, … ; scp-like addresses are ssh; empty for a local path.-
Constructor Summary
Constructors -
Method 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.booleanisHttp()Whether the address is for HTTP or HTTPS.booleanisSsh()Whether the address is for SSH.scheme()Returns the value of theschemerecord component.final StringtoString()Returns a string representation of this record class.user()Returns the value of theuserrecord component.
-
Constructor Details
-
Parts
Creates an instance of aPartsrecord class.- Parameters:
scheme- the value for theschemerecord componentuser- the value for theuserrecord componenthost- the value for thehostrecord component
-
-
Method Details
-
isSsh
public boolean isSsh()Whether the address is for SSH. -
isHttp
public boolean isHttp()Whether the address is for HTTP or HTTPS. -
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). -
scheme
Returns the value of theschemerecord component.- Returns:
- the value of the
schemerecord component
-
user
Returns the value of theuserrecord component.- Returns:
- the value of the
userrecord component
-
host
Returns the value of thehostrecord component.- Returns:
- the value of the
hostrecord component
-