| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public final boolean | equals(Object o)
Implements abstract java. Indicates whether some other object is "equal to" this one. |
| public String | |
| public final int | |
| public boolean | Returns: true if the hosts are the same and not empty, false otherwisethe other UserHostInfo other)Checks if this UserHostInfo has the same host as the given UserHostInfo. |
| public String | |
| public static UserHostInfo | |
| public String | toString()
Implements abstract java. Returns a string representation of the record. |
| public String |
| host | back to summary |
|---|---|
| private final String host Record Component accessed by host(). | |
| user | back to summary |
|---|---|
| private final String user Record Component accessed by user(). | |
| UserHostInfo | back to summary |
|---|---|
| public UserHostInfo(String user, String host) | |
| equals | back to summary |
|---|---|
| public final boolean equals(Object o) Implements abstract java. Doc from java. Indicates whether some other object is "equal to" this one. In addition
to the general contract of
R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
| |
| getUserHostString | back to summary |
|---|---|
| public String getUserHostString() Returns the user-host string representation. If the host is empty, only the user is returned. Otherwise, the format is "user-host".
| |
| hashCode | back to summary |
|---|---|
| public final int hashCode() Implements abstract java. Doc from java. Returns a hash code value for the record.
Obeys the general contract of | |
| hasSameHost | back to summary |
|---|---|
| public boolean hasSameHost(UserHostInfo other) Checks if this UserHostInfo has the same host as the given UserHostInfo.
| |
| host | back to summary |
|---|---|
| public String host() Record Component getter of host. | |
| parse | back to summary |
|---|---|
| public static UserHostInfo parse(String userHostString) Creates a new UserHostInfo from a user-host string. The user-host string is expected to be in the format "user-host". If the string does not contain a hyphen, the entire string is considered as the user and the host is empty.
| |
| toString | back to summary |
|---|---|
| public String toString() Implements abstract java. Doc from java. Returns a string representation of the record.
In accordance with the general contract of In addition to this general contract, record classes must further participate in the invariant that any two records which are equal must produce equal strings. This invariant is necessarily relaxed in the rare case where corresponding equal component values might fail to produce equal strings for themselves.
| |
| user | back to summary |
|---|---|
| public String user() Record Component getter of user. | |