Klasse FileLocations

java.lang.Object
io.jenkins.plugins.forensics.blame.FileLocations
Alle implementierten Schnittstellen:
Serializable

public class FileLocations extends Object implements Serializable
Defines a set of file locations. A file location is identified by an absolute file name and line number. File locations are grouped by file name, i.e. you can obtain a mapping of a file to all affected lines in that file.
Autor:
Ullrich Hafner
Siehe auch:
  • Konstruktordetails

    • FileLocations

      public FileLocations()
  • Methodendetails

    • addLine

      public void addLine(String fileName, int lineStart)
      Adds the specified affected file and line number.
      Parameter:
      fileName - the absolute file name that will be used as a key
      lineStart - the line number to find the blame for
    • isEmpty

      public boolean isEmpty()
      Returns whether some files have been added.
      Gibt zurück:
      true if there a no blames available, false otherwise
    • size

      public int size()
      Returns the number of files that have been added.
      Gibt zurück:
      number of affected files with blames
    • contains

      public boolean contains(String fileName)
      Returns whether the specified file has been added.
      Parameter:
      fileName - the relative or absolute path of the file
      Gibt zurück:
      true if the file already has been added, false otherwise
    • getFiles

      public Set<String> getFiles()
      Returns the absolute file names of all files.
      Gibt zurück:
      the absolute file names
    • getLines

      public Set<Integer> getLines(String fileName)
      Returns the added lines for the specified file.
      Parameter:
      fileName - the relative or absolute path of the file
      Gibt zurück:
      the lines for that file
      Löst aus:
      NoSuchElementException - if the file name is not registered
    • equals

      public boolean equals(Object o)
      Setzt außer Kraft:
      equals in Klasse Object
    • hashCode

      public int hashCode()
      Setzt außer Kraft:
      hashCode in Klasse Object