Package tech.catheu.jnotebook.parse
Record Class StaticSnippet
java.lang.Object
java.lang.Record
tech.catheu.jnotebook.parse.StaticSnippet
public record StaticSnippet(StaticSnippet.Type type, int start, int end, SourceCodeAnalysis.CompletionInfo completionInfo)
extends Record
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionStaticSnippet(StaticSnippet.Type type, int start, int end, SourceCodeAnalysis.CompletionInfo completionInfo) Creates an instance of aStaticSnippetrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecompletionInforecord component.intend()Returns the value of theendrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intstart()Returns the value of thestartrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
StaticSnippet
public StaticSnippet(StaticSnippet.Type type, int start, int end, SourceCodeAnalysis.CompletionInfo completionInfo) Creates an instance of aStaticSnippetrecord class.- Parameters:
type- the value for thetyperecord componentstart- the value for thestartrecord componentend- the value for theendrecord componentcompletionInfo- the value for thecompletionInforecord 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 '=='. -
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
start
public int start()Returns the value of thestartrecord component.- Returns:
- the value of the
startrecord component
-
end
public int end()Returns the value of theendrecord component.- Returns:
- the value of the
endrecord component
-
completionInfo
Returns the value of thecompletionInforecord component.- Returns:
- the value of the
completionInforecord component
-