Codota Logo
CurrencyDirectory.getDtausCurrencies
Code IndexAdd Codota to your IDE (free)

How to use
getDtausCurrencies
method
in
org.jdtaus.banking.CurrencyDirectory

Best Java code snippets using org.jdtaus.banking.CurrencyDirectory.getDtausCurrencies (Showing top 5 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
DateTime d =
  • Codota Iconnew DateTime()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseDateTime(text)
  • Codota IconObject instant;new DateTime(instant)
  • Smart code suggestions by Codota
}
origin: org.jdtaus.banking/jdtaus-banking-it

/** Tests the {@link CurrencyDirectory#getDtausCurrencies(Date)} method to return sane values. */
public void testGetDtausCurrencies() throws Exception
{
  assert this.getCurrencyDirectory() != null;
  Assert.assertTrue( this.getCurrencyDirectory().getDtausCurrencies( new Date() ).length >= 0 );
}
origin: org.jdtaus.editor/jdtaus-editor-client-application

private void updateCurrencies()
{
  final Currency[] currencies = getCurrencyDirectory().
    getDtausCurrencies(this.date != null ? this.date : new Date());
  Arrays.sort(currencies, new Comparator()
  {
    public int compare(final Object o1, final Object o2)
    {
      assert o1 instanceof Currency;
      assert o2 instanceof Currency;
      return ((Currency) o1).getCurrencyCode().
        compareTo(((Currency) o2).getCurrencyCode());
    }
  });
  final Object prevSelection = currencyComboBox.getSelectedItem();
  currencyComboBox.removeAllItems();
  for(int i = 0; i < currencies.length; i++)
  {
    currencyComboBox.addItem(currencies[i]);
  }
  currencyComboBox.setSelectedItem(prevSelection);
}
origin: org.jdtaus.editor/jdtaus-editor-client-application

private void updateCurrencies()
{
  final Currency[] currencies = getCurrencyDirectory().
    getDtausCurrencies(this.getDate());
  Arrays.sort(currencies, new Comparator()
  {
    public int compare(final Object o1, final Object o2)
    {
      assert o1 instanceof Currency;
      assert o2 instanceof Currency;
      return ((Currency) o1).getCurrencyCode().
        compareTo(((Currency) o2).getCurrencyCode());
    }
  });
  final Object prevSelection = currencyComboBox.getSelectedItem();
  currencyComboBox.removeAllItems();
  for(int i = 0; i < currencies.length; i++)
  {
    currencyComboBox.addItem(currencies[i]);
  }
  currencyComboBox.setSelectedItem(prevSelection);
}
origin: org.jdtaus.banking/jdtaus-banking-it

/**
 * Test the {@link CurrencyDirectory#getDtausCurrencies(Date)} method to handle illegal arguments correctly by
 * throwing a {@code NullPointerException}.
 */
public void testGetDtausCurrenciesNull()
{
  assert this.getCurrencyDirectory() != null;
  try
  {
    this.getCurrencyDirectory().getDtausCurrencies( null );
    throw new AssertionError();
  }
  catch ( NullPointerException e )
  {
    Assert.assertNotNull( e.getMessage() );
    System.out.println( e.toString() );
  }
}
origin: org.jdtaus.banking/jdtaus-banking-it

/**
 * Tests the {@link CurrencyDirectory#getDtausCurrencies(Date)} method to return correct values for the EUR and DEM
 * currency for various dates.
 */
public void testCurrencyConstraints() throws Exception
{
  assert this.getCurrencyDirectory() != null;
  final Calendar cal = Calendar.getInstance();
  final Date now = cal.getTime();
  cal.set( Calendar.YEAR, 2001 );
  cal.set( Calendar.MONTH, 11 );
  cal.set( Calendar.DAY_OF_MONTH, 31 );
  final Date lastDayDEM = cal.getTime();
  cal.set( Calendar.YEAR, 2002 );
  cal.set( Calendar.MONTH, 0 );
  cal.set( Calendar.DAY_OF_MONTH, 1 );
  final Date firstDayEUR = cal.getTime();
  this.assertContainsCurrency( this.getCurrencyDirectory().getDtausCurrencies( now ), "EUR" );
  this.assertNotContainsCurrency( this.getCurrencyDirectory().getDtausCurrencies( now ), "DEM" );
  this.assertNotContainsCurrency( this.getCurrencyDirectory().getDtausCurrencies( lastDayDEM ), "EUR" );
  this.assertContainsCurrency( this.getCurrencyDirectory().getDtausCurrencies( lastDayDEM ), "DEM" );
  this.assertContainsCurrency( this.getCurrencyDirectory().getDtausCurrencies( firstDayEUR ), "EUR" );
  this.assertNotContainsCurrency( this.getCurrencyDirectory().getDtausCurrencies( firstDayEUR ), "DEM" );
}
org.jdtaus.bankingCurrencyDirectorygetDtausCurrencies

Javadoc

Gets all DTAUS currencies known to the directory for a given date.

Popular methods of CurrencyDirectory

    Popular in Java

    • Creating JSON documents from java classes using gson
    • getSystemService (Context)
    • getContentResolver (Context)
    • getApplicationContext (Context)
    • Color (java.awt)
      The Color class is used encapsulate colors in the default sRGB color space or colors in arbitrary co
    • Socket (java.net)
      Provides a client-side TCP socket.
    • SimpleDateFormat (java.text)
      Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
    • CountDownLatch (java.util.concurrent)
      A synchronization aid that allows one or more threads to wait until a set of operations being perfor
    • Stream (java.util.stream)
      A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
    • Annotation (javassist.bytecode.annotation)
      The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
    Codota Logo
    • Products

      Search for Java codeSearch for JavaScript codeEnterprise
    • IDE Plugins

      IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
    • Company

      About UsContact UsCareers
    • Resources

      FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
    Get Codota for your IDE now