code: public final int compareTo(String fileName, final long position) {
          final int val = this.fileName.compareTo(fileName);
  
          if (val == 0) {
              return (int) (this.position - position);
          }
          return val;
      }
docs: Compares with the specified fileName and position.