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

org.snapscript.agent.event.ProfileEvent Maven / Gradle / Ivy

package org.snapscript.agent.event;

import java.util.Collections;
import java.util.Set;

import org.snapscript.agent.profiler.ProfileResult;

public class ProfileEvent implements ProcessEvent {

   private final Set results;
   private final String process;
   
   private ProfileEvent(Builder builder) {
      this.results = Collections.unmodifiableSet(builder.results);
      this.process = builder.process;
   }

   @Override
   public String getProcess() {
      return process;
   }
   
   public Set getResults() {
      return results;
   }
   
   public static class Builder {
      
      private Set results;
      private String process;
      
      public Builder(String process) {
         this.process = process;
      }

      public Builder withResults(Set results) {
         this.results = results;
         return this;
      }

      public Builder withProcess(String process) {
         this.process = process;
         return this;
      }
      
      public ProfileEvent build(){
         return new ProfileEvent(this);
      }
   }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy