| summaryrefslogtreecommitdiff |
diff options
Diffstat (limited to 'instance-calculator/src/Instances.java')
| -rw-r--r-- | instance-calculator/src/Instances.java | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/instance-calculator/src/Instances.java b/instance-calculator/src/Instances.java new file mode 100644 index 0000000..5d6ec8b --- /dev/null +++ b/instance-calculator/src/Instances.java @@ -0,0 +1,30 @@ +import java.util.*; + +public class Instances +{ + private static final Map<Integer, String> instances; + + static + { + instances = new HashMap<Integer, String>(); + } + + public static String get_id_for (final int i) + { + final Integer j; + String result; + + j = new Integer(i); + + result = instances.get(j); + + if (result == null) + { + result = (Main.get_parameters().get_id_prefix() + i); + + instances.put(j, result); + } + + return result; + } +} |


