-- added fancybox 1.3.1 to project, initially for showing screenshots. See documentat...
[Bookkeeping.git] / src / com / interrupt / bookkeeping / currency / Currencies.java
blobb3a80bebb7598547565d39d821a41aae63c87a0c
1 package com.interrupt.bookkeeping.currency;
3 import com.interrupt.bookkeeping.exception.CurrencyException;
5 public class Currencies extends GCurrencies {
8 private static Currencies instance = null;
9 public Currencies() {}
11 public static Currencies instance() {
13 if(instance == null) {
14 instance = new Currencies();
16 return instance;
20 /**
21 * currency ids must be unique
23 public void addCurrency(ICurrency currency) {
25 ICurrency existingc = this.findCurrencyById(currency.getId());
26 if(existingc != null) {
27 throw new CurrencyException("There is already a currency with the id["+currency.getId()+"]");
30 super.addCurrency(currency);