org.klomp.snark.web

## Class Sorters.FileAndIndex

- java.lang.Object
- - org.klomp.snark.web.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 Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `File` | `file`
    `int` | `index`
    `boolean` | `isDirectory`
    `long` | `length`
    `long` | `preview`
    `int` | `priority`
    `long` | `remaining`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FileAndIndex(File file, Storage storage, long[] remainingArray)`
    `FileAndIndex(File file, Storage storage, long[] remainingArray, long[] previewArray)`

  - ### Method Summary

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### file

          public final File file

    - #### index

          public final int index

    - #### isDirectory

          public final boolean isDirectory

    - #### length

          public final long length

    - #### preview

          public final long preview

    - #### priority

          public final int priority

    - #### remaining

          public final long remaining

  - ### 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