de.pewpewproject.lasertag.lasertaggame.IStatsFilePathHolding   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 16
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getStatsFilePath() 0 2 1
A setStatsFilePath(String) 0 1 1
1
package de.pewpewproject.lasertag.lasertaggame;
2
3
import java.util.Optional;
4
5
/**
6
 * Interface for an object capable of holding a path to the statistics file
7
 *
8
 * @author Étienne Muser
9
 */
10
public interface IStatsFilePathHolding {
11
12
    /**
13
     * Sets the path to the statistics file
14
     *
15
     * @param newPath The new path as a string
16
     */
17
    default void setStatsFilePath(String newPath) {}
18
19
    /**
20
     * Gets the path to the last games stats
21
     *
22
     * @return Optional containing the path as a string. Optional.empty if there was no last game on this World.
23
     */
24
    default Optional<String> getStatsFilePath() {
25
        return Optional.empty();
26
    }
27
}
28