Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejava
    /**
     * Stores both the partition and whether computePartition should be called when a new batch
     * is about to be created.
     */
    class ComputedPartition{
        int part;
        boolean willCallOnNewBatch;
        
        public ComputedPartition(int part) {
             this.part = part;
             this.willCallOnNewBatch = false;
        }
        
        public ComputedPartition(int part, boolean willCallOnNewBatch) {
             this.part = part;
             this.willCallOnNewBatch = willCallOnNewBatch;
        }
        
        public boolean willCallOnNewBatch() { return this.willCallOnNewBatch; }
        public int getpartition() { return this.part; }
    }
 

...