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;
11 public static Currencies
instance() {
13 if(instance
== null) {
14 instance
= new Currencies();
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
);