Package io.meeds.social.portlet.model
Record Class SubspaceItem
java.lang.Object
java.lang.Record
io.meeds.social.portlet.model.SubspaceItem
public record SubspaceItem(String id, String displayName, String prettyName, String avatarUrl, String visibility, boolean isMember, boolean isInvited)
extends Record
One listed sub-space.
isMember and isInvited carry the
viewer's relationship to it for the hidden-space rendering only; they are
not access decisions, which the Service already made by returning the
space at all. Both are needed because the space REST endpoints serve a
member and an invited user alike, so a row is only rendered
anonymously when the viewer is neither.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theavatarUrlrecord component.Returns the value of thedisplayNamerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.booleanReturns the value of theisInvitedrecord component.booleanisMember()Returns the value of theisMemberrecord component.Returns the value of theprettyNamerecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thevisibilityrecord component.
-
Constructor Details
-
SubspaceItem
public SubspaceItem(String id, String displayName, String prettyName, String avatarUrl, String visibility, boolean isMember, boolean isInvited) Creates an instance of aSubspaceItemrecord class.- Parameters:
id- the value for theidrecord componentdisplayName- the value for thedisplayNamerecord componentprettyName- the value for theprettyNamerecord componentavatarUrl- the value for theavatarUrlrecord componentvisibility- the value for thevisibilityrecord componentisMember- the value for theisMemberrecord componentisInvited- the value for theisInvitedrecord 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 '=='. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
displayName
Returns the value of thedisplayNamerecord component.- Returns:
- the value of the
displayNamerecord component
-
prettyName
Returns the value of theprettyNamerecord component.- Returns:
- the value of the
prettyNamerecord component
-
avatarUrl
Returns the value of theavatarUrlrecord component.- Returns:
- the value of the
avatarUrlrecord component
-
visibility
Returns the value of thevisibilityrecord component.- Returns:
- the value of the
visibilityrecord component
-
isMember
public boolean isMember()Returns the value of theisMemberrecord component.- Returns:
- the value of the
isMemberrecord component
-
isInvited
public boolean isInvited()Returns the value of theisInvitedrecord component.- Returns:
- the value of the
isInvitedrecord component
-