Record Class LibraryEntry

java.lang.Object
java.lang.Record
io.github.jbastgen.stemma.app.model.LibraryEntry
Record Components:
real - true for a repository opened from disk through the Git backend, false for 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

    Constructors
    Constructor
    Description
    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(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 a LibraryEntry record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the value of the ahead record component.
    int
    Returns the value of the behind record component.
    Returns the value of the branch record component.
    int
    Returns the value of the changes record component.
    created(String id, String name, String path, String branch, boolean fresh)
    The entry of a demo repository that was just created.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    id()
    Returns the value of the id record component.
    Returns the value of the lang record component.
    Returns the value of the name record component.
    Returns the value of the path record component.
    boolean
    Returns the value of the real record component.
    Returns the value of the remotes record component.
    Returns the value of the time record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • 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 a LibraryEntry record class.
      Parameters:
      id - the value for the id record component
      name - the value for the name record component
      path - the value for the path record component
      branch - the value for the branch record component
      ahead - the value for the ahead record component
      behind - the value for the behind record component
      changes - the value for the changes record component
      time - the value for the time record component
      lang - the value for the lang record component
      remotes - the value for the remotes record component
      real - the value for the real record 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

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • id

      public String id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • path

      public String path()
      Returns the value of the path record component.
      Returns:
      the value of the path record component
    • branch

      public String branch()
      Returns the value of the branch record component.
      Returns:
      the value of the branch record component
    • ahead

      public int ahead()
      Returns the value of the ahead record component.
      Returns:
      the value of the ahead record component
    • behind

      public int behind()
      Returns the value of the behind record component.
      Returns:
      the value of the behind record component
    • changes

      public int changes()
      Returns the value of the changes record component.
      Returns:
      the value of the changes record component
    • time

      public String time()
      Returns the value of the time record component.
      Returns:
      the value of the time record component
    • lang

      public String lang()
      Returns the value of the lang record component.
      Returns:
      the value of the lang record component
    • remotes

      public String remotes()
      Returns the value of the remotes record component.
      Returns:
      the value of the remotes record component
    • real

      public boolean real()
      Returns the value of the real record component.
      Returns:
      the value of the real record component