JavaCAD
CSGCache.java
Go to the documentation of this file.
1 package eu.mihosoft.vrl.v3d.parametrics;
2 
3 import java.util.HashMap;
4 
5 import eu.mihosoft.vrl.v3d.CSG;
6 import eu.mihosoft.vrl.v3d.ItoCSG;
7 
8 public class CSGCache {
9  private HashMap<String , CSG> chache = new HashMap<>();
10 
11  CSG get(String key, ItoCSG builder){
12  if(chache.get(key) == null){
13  chache.put(key, builder.toCSG());
14  }
15  return chache.get(key);
16  }
17 
18 
19 }