SalesPoint Framework v3.0

data.ooimpl
Class CurrencyImpl

java.lang.Object
  |
  +--data.AbstractNameable
        |
        +--data.ooimpl.CatalogItemImpl
              |
              +--data.ooimpl.CatalogImpl
                    |
                    +--data.ooimpl.CurrencyImpl

public class CurrencyImpl
extends CatalogImpl
implements Currency

Pure Java implementation of the Currency interface.

Since:
v2.0
Version:
2.0 19/08/1999
Author:
Steffen Zschaler
See Also:
Serialized Form

Field Summary
static String DM_SCHEIN_10
          Field string represents the mainkey for an added CurrencyItemImpl.
static String DM_SCHEIN_100
          Field string represents the mainkey for an added CurrencyItemImpl.
static String DM_SCHEIN_1000
          Field string represents the mainkey for an added CurrencyItemImpl.
static String DM_SCHEIN_20
          Field string represents the mainkey for an added CurrencyItemImpl.
static String DM_SCHEIN_200
          Field string represents the mainkey for an added CurrencyItemImpl.
static String DM_SCHEIN_5
          Field string represents the mainkey for an added CurrencyItemImpl.
static String DM_SCHEIN_50
          Field string represents the mainkey for an added CurrencyItemImpl.
static String DM_SCHEIN_500
          Field string represents the mainkey for an added CurrencyItemImpl.
static String DM_STCK_1
          Field string represents the mainkey for an added CurrencyItemImpl.
static String DM_STCK_10
          Field string represents the mainkey for an added CurrencyItemImpl.
static String DM_STCK_2
          Field string represents the mainkey for an added CurrencyItemImpl.
static String DM_STCK_5
          Field string represents the mainkey for an added CurrencyItemImpl.
static String PFENNIG_STCK_1
          Field string represents the mainkey for an added CurrencyItemImpl.
static String PFENNIG_STCK_10
          Field string represents the mainkey for an added CurrencyItemImpl.
static String PFENNIG_STCK_2
          Field string represents the mainkey for an added CurrencyItemImpl.
static String PFENNIG_STCK_5
          Field string represents the mainkey for an added CurrencyItemImpl.
static String PFENNIG_STCK_50
          Field string represents the mainkey for an added CurrencyItemImpl.
 
Fields inherited from class data.ooimpl.CatalogImpl
m_lhListeners, m_nModCount
 
Fields inherited from class data.AbstractNameable
m_ncContext, m_pcsPropertyListeners
 
Constructor Summary
CurrencyImpl(String sName)
          Create a new CurrencyImpl with a default locale of Locale.GERMANY and fill it.
CurrencyImpl(String sName, Locale l)
          Create a new, initially empty CurrencyImpl for the given locale.
 
Method Summary
 NumberValue parse(String s)
          Try to parse the given String as a currency value in the currency's associated format.
 String toString(NumberValue nv)
          Return a String representation of the given NumberValue assuming it is a value given in the smallest unit of this currency.
 
Methods inherited from class data.ooimpl.CatalogImpl
add, addCatalogChangeListener, checkNameChange, commitAdd, commitRemove, contains, createPeer, fireCanEditCatalogItem, fireCanRemoveCatalogItem, fireCatalogItemAddCommit, fireCatalogItemAdded, fireCatalogItemAddRollback, fireCatalogItemRemoveCommit, fireCatalogItemRemoved, fireCatalogItemRemoveRollback, fireCommitEditCatalogItem, fireEditingCatalogItem, fireRollbackEditCatalogItem, get, getEditingItemsContainer, getItemsContainer, getItemsLock, getNCMonitor, getShallowClone, getTemporaryAddedItemsContainer, getTemporaryRemovedItemsContainer, iterator, keySet, nameHasChanged, remove, remove, removeCatalogChangeListener, rollbackAdd, rollbackRemove, size, toString
 
Methods inherited from class data.ooimpl.CatalogItemImpl
addValueListener, compareTo, equals, getCatalog, getValue, isEditable, removeValueListener, setValue
 
Methods inherited from class data.AbstractNameable
addNameListener, addPropertyChangeListener, attach, detachNC, getName, removeNameListener, removePropertyChangeListener, setName
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PFENNIG_STCK_1

public static String PFENNIG_STCK_1
Field string represents the mainkey for an added CurrencyItemImpl.

1-Pfennig-Stueck


PFENNIG_STCK_2

public static String PFENNIG_STCK_2
Field string represents the mainkey for an added CurrencyItemImpl.

2-Pfennig-Stueck


PFENNIG_STCK_5

public static String PFENNIG_STCK_5
Field string represents the mainkey for an added CurrencyItemImpl.

5-Pfennig-Stueck


PFENNIG_STCK_10

public static String PFENNIG_STCK_10
Field string represents the mainkey for an added CurrencyItemImpl.

10-Pfennig-Stueck


PFENNIG_STCK_50

public static String PFENNIG_STCK_50
Field string represents the mainkey for an added CurrencyItemImpl.

50-Pfennig-Stueck


DM_STCK_1

public static String DM_STCK_1
Field string represents the mainkey for an added CurrencyItemImpl.

1-Mark-Stueck


DM_STCK_2

public static String DM_STCK_2
Field string represents the mainkey for an added CurrencyItemImpl.

2-Mark-Stueck


DM_STCK_5

public static String DM_STCK_5
Field string represents the mainkey for an added CurrencyItemImpl.

5-Mark-Stueck


DM_SCHEIN_5

public static String DM_SCHEIN_5
Field string represents the mainkey for an added CurrencyItemImpl.

5-Mark-Schein


DM_STCK_10

public static String DM_STCK_10
Field string represents the mainkey for an added CurrencyItemImpl.

10-Mark-Stueck


DM_SCHEIN_10

public static String DM_SCHEIN_10
Field string represents the mainkey for an added CurrencyItemImpl.

10-Mark-Schein


DM_SCHEIN_20

public static String DM_SCHEIN_20
Field string represents the mainkey for an added CurrencyItemImpl.

20-Mark-Schein


DM_SCHEIN_50

public static String DM_SCHEIN_50
Field string represents the mainkey for an added CurrencyItemImpl.

50-Mark-Schein


DM_SCHEIN_100

public static String DM_SCHEIN_100
Field string represents the mainkey for an added CurrencyItemImpl.

100-Mark-Schein


DM_SCHEIN_200

public static String DM_SCHEIN_200
Field string represents the mainkey for an added CurrencyItemImpl.

200-Mark-Schein


DM_SCHEIN_500

public static String DM_SCHEIN_500
Field string represents the mainkey for an added CurrencyItemImpl.

500-Mark-Schein


DM_SCHEIN_1000

public static String DM_SCHEIN_1000
Field string represents the mainkey for an added CurrencyItemImpl.

1000-Mark-Schein

Constructor Detail

CurrencyImpl

public CurrencyImpl(String sName,
                    Locale l)
Create a new, initially empty CurrencyImpl for the given locale.
Parameters:
sName - the name of the currency to create.
l - the locale that determines how currency values will be formatted.

CurrencyImpl

public CurrencyImpl(String sName)
Create a new CurrencyImpl with a default locale of Locale.GERMANY and fill it.

The currency will already contain all denominations that are available in the DEM currency. The list of denominations to be added is taken from #s_asDenominations and #s_anDenominations.

Parameters:
sName - the name of the new currency.
Method Detail

toString

public String toString(NumberValue nv)
Return a String representation of the given NumberValue assuming it is a value given in the smallest unit of this currency.
Override:
Never.
Specified by:
toString in interface Currency
Parameters:
nv - the value to be rendered.
Returns:
the formatted String representation

parse

public NumberValue parse(String s)
                  throws ParseException
Try to parse the given String as a currency value in the currency's associated format.
Override:
Never.
Specified by:
parse in interface Currency
Parameters:
s - the text to be parsed.
Returns:
the value that was identified in the text, given in the smallest unit of this currency.
Throws:
ParseException - if the given String could not be interpreted as a currency value.

SalesPoint Framework v3.0