Class Sorters.FileAndIndex

  • Enclosing class:
    Sorters

    public static class Sorters.FileAndIndex
    extends Object
    Class to precompute and efficiently sort data on a torrent file entry.
    • Field Detail

      • file

        public final File file
      • isDirectory

        public final boolean isDirectory
      • length

        public final long length
      • remaining

        public final long remaining
      • preview

        public final long preview
      • priority

        public final int priority
      • index

        public final int index
    • Constructor Detail

      • FileAndIndex

        public FileAndIndex​(File file,
                            Storage storage,
                            long[] remainingArray)
        Parameters:
        storage - may be null
        remainingArray - precomputed, non-null iff storage is non-null
      • FileAndIndex

        public FileAndIndex​(File file,
                            Storage storage,
                            long[] remainingArray,
                            long[] previewArray)
        Parameters:
        storage - may be null
        remainingArray - precomputed, non-null iff storage is non-null