Skip to main content
summaryrefslogtreecommitdiffstats
blob: f6a4fce5f093b76d8ad79638210a0c82e079c4a5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package org.eclipse.osee.ote.rest.internal;

import java.lang.ref.WeakReference;
import java.util.HashMap;
import java.util.Map;

import org.eclipse.osee.ote.core.framework.command.RunTests;

public class OteRunTestCommandsImpl implements OteRunTestCommands {

   private Map<String,  WeakReference<RunTests>> tests;
   
   public OteRunTestCommandsImpl(){
      tests = new HashMap<>();
   }
   
   @Override
   public RunTests getCommand(String id) {
      WeakReference<RunTests> ref = tests.get(id);
      return ref.get();
   }

   @Override
   public void putCommand(String id, RunTests envTestRun) {
      tests.put(id, new WeakReference<RunTests>(envTestRun));
   }

}

Back to the top