Record Class UserInteraction
java.lang.Object
java.lang.Record
ch.tocco.nice2.rest.client.api.userinteraction.UserInteraction
public record UserInteraction(UserInteraction.Type type, UserInteraction.Context context)
extends Record
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic enum -
Constructor Summary
ConstructorsConstructorDescriptionUserInteraction(UserInteraction.Type type, UserInteraction.Context context) Creates an instance of aUserInteractionrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncontext()Returns the value of thecontextrecord component.static UserInteractioncreateAction(String actionId, List<String> labels, org.joda.time.DateTime timestamp) static UserInteractioncreateDetail(String modelName, String entityId, List<String> labels, org.joda.time.DateTime timestamp) static UserInteractioncreateList(String modelName, List<String> labels, org.joda.time.DateTime timestamp) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.static UserInteraction.TypetypeFromId(String id)
-
Constructor Details
-
UserInteraction
Creates an instance of aUserInteractionrecord class.- Parameters:
type- the value for thetyperecord componentcontext- the value for thecontextrecord component
-
-
Method Details
-
typeFromId
-
createList
public static UserInteraction createList(String modelName, List<String> labels, org.joda.time.DateTime timestamp) -
createDetail
public static UserInteraction createDetail(String modelName, String entityId, List<String> labels, org.joda.time.DateTime timestamp) -
createAction
public static UserInteraction createAction(String actionId, List<String> labels, org.joda.time.DateTime timestamp) -
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). -
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
context
Returns the value of thecontextrecord component.- Returns:
- the value of the
contextrecord component
-