Record Class LibraryEntry
java.lang.Object
java.lang.Record
io.github.jbastgen.stemma.app.model.LibraryEntry
- Record Components:
real-truefor a repository opened from disk through the Git backend,falsefor sample data
public record LibraryEntry(String id, String name, String path, String branch, int ahead, int behind, int changes, String time, String lang, String remotes, boolean real)
extends Record
A repository known to the library.
-
Constructor Summary
ConstructorsConstructorDescriptionLibraryEntry(String id, String name, String path, String branch, int ahead, int behind, int changes, String time, String lang, String remotes) A sample (demo) entry.LibraryEntry(String id, String name, String path, String branch, int ahead, int behind, int changes, String time, String lang, String remotes, boolean real) Creates an instance of aLibraryEntryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintahead()Returns the value of theaheadrecord component.intbehind()Returns the value of thebehindrecord component.branch()Returns the value of thebranchrecord component.intchanges()Returns the value of thechangesrecord component.static LibraryEntryThe entry of a demo repository that was just created.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.lang()Returns the value of thelangrecord component.name()Returns the value of thenamerecord component.path()Returns the value of thepathrecord component.booleanreal()Returns the value of therealrecord component.remotes()Returns the value of theremotesrecord component.time()Returns the value of thetimerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
LibraryEntry
public LibraryEntry(String id, String name, String path, String branch, int ahead, int behind, int changes, String time, String lang, String remotes) A sample (demo) entry. -
LibraryEntry
public LibraryEntry(String id, String name, String path, String branch, int ahead, int behind, int changes, String time, String lang, String remotes, boolean real) Creates an instance of aLibraryEntryrecord class.- Parameters:
id- the value for theidrecord componentname- the value for thenamerecord componentpath- the value for thepathrecord componentbranch- the value for thebranchrecord componentahead- the value for theaheadrecord componentbehind- the value for thebehindrecord componentchanges- the value for thechangesrecord componenttime- the value for thetimerecord componentlang- the value for thelangrecord componentremotes- the value for theremotesrecord componentreal- the value for therealrecord component
-
-
Method Details
-
created
public static LibraryEntry created(String id, String name, String path, String branch, boolean fresh) The entry of a demo repository that was just created. -
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
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
path
Returns the value of thepathrecord component.- Returns:
- the value of the
pathrecord component
-
branch
Returns the value of thebranchrecord component.- Returns:
- the value of the
branchrecord component
-
ahead
public int ahead()Returns the value of theaheadrecord component.- Returns:
- the value of the
aheadrecord component
-
behind
public int behind()Returns the value of thebehindrecord component.- Returns:
- the value of the
behindrecord component
-
changes
public int changes()Returns the value of thechangesrecord component.- Returns:
- the value of the
changesrecord component
-
time
Returns the value of thetimerecord component.- Returns:
- the value of the
timerecord component
-
lang
Returns the value of thelangrecord component.- Returns:
- the value of the
langrecord component
-
remotes
Returns the value of theremotesrecord component.- Returns:
- the value of the
remotesrecord component
-
real
public boolean real()Returns the value of therealrecord component.- Returns:
- the value of the
realrecord component
-