PrioritizedService.java

1
package io.github.gipo999.smispi;
2
3
/** Interface for services that have a priority. */
4
@FunctionalInterface
5
public interface PrioritizedService extends NamedService, Comparable<PrioritizedService> {
6
7
  /** Default priority for services. */
8
  int DEFAULT_PRIORIY = 500;
9
10
  /**
11
   * Returns the priority of the service.
12
   *
13
   * @return the priority of the service
14
   */
15
  default int getPriority() {
16 1 1. getPriority : replaced int return with 0 for io/github/gipo999/smispi/PrioritizedService::getPriority → KILLED
    return DEFAULT_PRIORIY;
17
  }
18
19
  /**
20
   * Compares this object with the specified object for order. Returns a negative integer, zero, or
21
   * a positive integer as this object is less than, equal to, or greater than the specified object.
22
   *
23
   * @param o the object to be compared
24
   * @return a negative integer, zero, or a positive integer as this object is less than, equal to,
25
   *     or greater than the specified object
26
   */
27
  @Override
28
  default int compareTo(PrioritizedService o) {
29 1 1. compareTo : replaced int return with 0 for io/github/gipo999/smispi/PrioritizedService::compareTo → KILLED
    return Integer.compare(getPriority(), o.getPriority());
30
  }
31
}

Mutations

16

1.1
Location : getPriority
Killed by : io.github.gipo999.smispi.ImplementationsTest.[engine:junit-jupiter]/[class:io.github.gipo999.smispi.ImplementationsTest]/[method:testBothOnlyNoCache()]
replaced int return with 0 for io/github/gipo999/smispi/PrioritizedService::getPriority → KILLED

29

1.1
Location : compareTo
Killed by : io.github.gipo999.smispi.ImplementationsTest.[engine:junit-jupiter]/[class:io.github.gipo999.smispi.ImplementationsTest]/[method:testBothOnlyNoCache()]
replaced int return with 0 for io/github/gipo999/smispi/PrioritizedService::compareTo → KILLED

Active mutators

Tests examined


Report generated by PIT 1.15.2