Package io.github.jbastgen.stemma.app.ai
Record Class CoworkPrompts.Prompt
java.lang.Object
java.lang.Record
io.github.jbastgen.stemma.app.ai.CoworkPrompts.Prompt
- Record Components:
user- a prompt of the user's own file (the others are built in)index- the position among the user's own prompts (whatCoworkPrompts.update(java.nio.file.Path, int, java.lang.String, java.lang.String, java.lang.String)andCoworkPrompts.delete(java.nio.file.Path, int)take), -1 for a built-in onefavorite- shown in the panel above the input field of the Cowork view (the favourites)
- Enclosing class:
CoworkPrompts
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncategory()Returns the value of thecategoryrecord component.final booleanIndicates whether some other object is "equal to" this one.booleanfavorite()Returns the value of thefavoriterecord component.final inthashCode()Returns a hash code value for this object.intindex()Returns the value of theindexrecord component.text()Returns the value of thetextrecord component.title()Returns the value of thetitlerecord component.final StringtoString()Returns a string representation of this record class.booleanuser()Returns the value of theuserrecord component.
-
Constructor Details
-
Prompt
public Prompt(String category, String title, String text, boolean user, int index, boolean favorite) Creates an instance of aPromptrecord class.- Parameters:
category- the value for thecategoryrecord componenttitle- the value for thetitlerecord componenttext- the value for thetextrecord componentuser- the value for theuserrecord componentindex- the value for theindexrecord componentfavorite- the value for thefavoriterecord 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 '=='. -
category
Returns the value of thecategoryrecord component.- Returns:
- the value of the
categoryrecord component
-
title
Returns the value of thetitlerecord component.- Returns:
- the value of the
titlerecord component
-
text
Returns the value of thetextrecord component.- Returns:
- the value of the
textrecord component
-
user
public boolean user()Returns the value of theuserrecord component.- Returns:
- the value of the
userrecord component
-
index
public int index()Returns the value of theindexrecord component.- Returns:
- the value of the
indexrecord component
-
favorite
public boolean favorite()Returns the value of thefavoriterecord component.- Returns:
- the value of the
favoriterecord component
-