Venice 0.751beta

nz.org.venice.ui
Class AccountNameFormat

java.lang.Object
  extended bynz.org.venice.ui.AccountNameFormat
All Implemented Interfaces:
TwoWayComparable

public class AccountNameFormat
extends java.lang.Object
implements TwoWayComparable

This class describes how to display and sort the name of portfolio accounts in the table. Account names are simply displayed as strings, in the table, and are basically sorted as Strings. The only exception is that the total entry always appears at the bottom.


Field Summary
static AccountNameFormat TOTAL
          The account name format that represents the total row
 
Constructor Summary
AccountNameFormat(java.lang.String name)
          Create a new account name format object.
 
Method Summary
 int compareTo(java.lang.Object object, boolean reverse)
          Compare two account names.
 java.lang.String getName()
          Get the account name.
 java.lang.String toString()
          Return a string representation of the account name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TOTAL

public static final AccountNameFormat TOTAL
The account name format that represents the total row

Constructor Detail

AccountNameFormat

public AccountNameFormat(java.lang.String name)
Create a new account name format object.

Parameters:
name - the name of the account
Method Detail

getName

public java.lang.String getName()
Get the account name.

Returns:
the name

compareTo

public int compareTo(java.lang.Object object,
                     boolean reverse)
Compare two account names.

Specified by:
compareTo in interface TwoWayComparable
Parameters:
object - account name object to compare to
reverse - order of sort, if set reverse the order.
Returns:
the value 0 if the objects are equal; 1 if this object is after the specified object or -1 if this object is before the specified object

toString

public java.lang.String toString()
Return a string representation of the account name.

Returns:
account name

Venice 0.751beta