All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.pitest.sequence.Context Maven / Gradle / Ivy

The newest version!
package org.pitest.sequence;

import java.util.Optional;

public interface Context {

  static Context start() {
    return start(false);
  }

  static Context start(boolean debug) {
    if (debug) {
      return EmptyContext.WITH_DEBUG;
    }
    return EmptyContext.WITHOUT_DEBUG;
  }

   Context store(SlotWrite slot, S value);

  @SuppressWarnings("unchecked")
   Optional retrieve(SlotRead slot);

  default boolean debug() {
    return false;
  }

  default  void debug(String msg, T t) {
    if (debug()) {
      System.out.println(msg + " for " + t);
    }
  }
}