de.pewpewproject.lasertag.common.util.fastiter.IFastWorldIter   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 11
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A fastSearchBlock(IIter,IProgressReport) 0 1 1
1
package de.pewpewproject.lasertag.common.util.fastiter;
2
3
4
/**
5
 * Interface providing the fast block iteration method
6
 *
7
 * @author Étienne Muser
8
 */
9
public interface IFastWorldIter {
10
    /**
11
     * Iterates over every block in a predefined square of chunks.
12
     * Begins with 0, 0 and spirals outwards.
13
     * This method is highly optimized to iterate over every block as fast as possible.
14
     * <p>
15
     * Uses a Threadpool with the fixed size of the number of available processors in the system.
16
     * @param iter The method called on every block. MUST BE THREAD-SAFE! This method can be called on multiple threads at the same time.
17
     * @param progress The method called on every chunk after iteration over every block in this chunk has finished. MUST BE THREAD-SAFE! This method can be called on multiple threads at the same time.
18
     */
19
    default void fastSearchBlock(IIter iter, IProgressReport progress) {
20
        // Default empty
21
    }
22
}
23