Java Doc for KualiDecimal.java in  » ERP-CRM-Financial » Kuali-Financial-System » org » kuali » core » util » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » ERP CRM Financial » Kuali Financial System » org.kuali.core.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   java.lang.Number
      org.kuali.core.util.KualiDecimal

All known Subclasses:   org.kuali.core.util.KualiPercent,
KualiDecimal
public class KualiDecimal extends Number implements Comparable(Code)
This class is a wrapper around java.math.BigDecimal. It exposes the only the needed functionality of BigDecimal and uses a standard SCALE of 2 and ROUND_BEHAVIOR of BigDecimal.ROUND_HALF_UP Members of this class are, like BigDecimal, immutable; even methods which might be expected to change the value (like setScale, for example) actually just return a new instance with the new value.


Field Summary
final public static  intROUND_BEHAVIOR
    
final public static  intSCALE
    
final public static  KualiDecimalZERO
    

Constructor Summary
public  KualiDecimal(String value)
    
public  KualiDecimal(int value)
    
public  KualiDecimal(double value)
    
public  KualiDecimal(BigDecimal value)
    

Method Summary
public  KualiDecimalabs()
    
public  KualiDecimaladd(KualiDecimal addend)
     Wraps BigDecimal's add method to accept and return KualiDecimal instances instead of BigDecimals, so that users of the class don't have to typecast the return value.
public  BigDecimalbigDecimalValue()
    
public  intcompareTo(Object o)
     Compares this KualiDecimal with the specified Object.
public  intcompareTo(KualiDecimal k)
     Returns the result of comparing the values of this KualiDecimal and the given KualiDecimal.
public  KualiDecimaldivide(KualiDecimal divisor)
    
public  doubledoubleValue()
    
public  booleanequals(Object obj)
    
public  floatfloatValue()
    
public  inthashCode()
    
public  intintValue()
    
public  booleanisGreaterEqual(KualiDecimal operand)
    
public  booleanisGreaterThan(KualiDecimal operand)
    
public  booleanisLessEqual(KualiDecimal operand)
    
public  booleanisLessThan(KualiDecimal operand)
    
public  booleanisNegative()
    
public  booleanisNonZero()
    
public static  booleanisNumeric(String s)
    
public  booleanisPositive()
    
public  booleanisZero()
    
public  longlongValue()
    
public  KualiDecimalmod(KualiDecimal modulus)
     This method calculates the mod between to KualiDecimal values by first casting to doubles and then by performing the % operation on the two primitives.
Parameters:
  modulus - The other value to apply the mod to.
public  KualiDecimalmultiply(KualiDecimal multiplier)
     Wraps BigDecimal's multiply method to accept and return KualiDecimal instances instead of BigDecimals, so that users of the class don't have to typecast the return value.
public  KualiDecimalnegated()
    
public  KualiDecimalsetScale(int scale)
     Wraps BigDecimal's setScale method to enforce the default Kuali rounding behavior.
public  KualiDecimalsetScale()
     Simplified wrapper over the setScale() method, this one has no arguments.
public  KualiDecimalsubtract(KualiDecimal subtrahend)
     Wraps BigDecimal's subtract method to accept and return KualiDecimal instances instead of BigDecimals, so that users of the class don't have to typecast the return value.
public  StringtoString()
    

Field Detail
ROUND_BEHAVIOR
final public static int ROUND_BEHAVIOR(Code)



SCALE
final public static int SCALE(Code)



ZERO
final public static KualiDecimal ZERO(Code)




Constructor Detail
KualiDecimal
public KualiDecimal(String value)(Code)
This is the base constructor, used by constructors that take other types
Parameters:
  value - String containing numeric value
throws:
  IllegalArgumentException - if the given String is null



KualiDecimal
public KualiDecimal(int value)(Code)



KualiDecimal
public KualiDecimal(double value)(Code)



KualiDecimal
public KualiDecimal(BigDecimal value)(Code)




Method Detail
abs
public KualiDecimal abs()(Code)
a KualiDecimal with the same scale and the absolute value



add
public KualiDecimal add(KualiDecimal addend)(Code)
Wraps BigDecimal's add method to accept and return KualiDecimal instances instead of BigDecimals, so that users of the class don't have to typecast the return value.
Parameters:
  addend - result of adding the given addend to this value
throws:
  IllegalArgumentException - if the given addend is null



bigDecimalValue
public BigDecimal bigDecimalValue()(Code)
the value of this instance as a BigDecimal.



compareTo
public int compareTo(Object o)(Code)
Compares this KualiDecimal with the specified Object. If the Object is a KualiDecimal, this method behaves like java.lang.Comparable#compareTo(java.lang.Object). Otherwise, it throws a ClassCastException (as KualiDecimals are comparable only to other KualiDecimals).
See Also:   java.lang.Comparable.compareTo(java.lang.Object)



compareTo
public int compareTo(KualiDecimal k)(Code)
Returns the result of comparing the values of this KualiDecimal and the given KualiDecimal.
See Also:   java.lang.Comparable.compareTo(java.lang.Object)



divide
public KualiDecimal divide(KualiDecimal divisor)(Code)
Wraps BigDecimal's divide method to enforce the default Kuali rounding behavior
Parameters:
  divisor - result of dividing this value by the given divisor
throws:
  an - IllegalArgumentException if the given divisor is null



doubleValue
public double doubleValue()(Code)

See Also:   java.lang.Number.doubleValue



equals
public boolean equals(Object obj)(Code)

See Also:   java.lang.Object.equals(java.lang.Object)



floatValue
public float floatValue()(Code)

See Also:   java.lang.Number.floatValue



hashCode
public int hashCode()(Code)

See Also:   java.lang.Object.hashCode



intValue
public int intValue()(Code)

See Also:   java.lang.Number.intValue



isGreaterEqual
public boolean isGreaterEqual(KualiDecimal operand)(Code)

Parameters:
  operand - true if this KualiDecimal is greater than or equal to the givenKualiDecimal



isGreaterThan
public boolean isGreaterThan(KualiDecimal operand)(Code)

Parameters:
  operand - true if this KualiDecimal is greater than the given KualiDecimal



isLessEqual
public boolean isLessEqual(KualiDecimal operand)(Code)

Parameters:
  operand - true if this KualiDecimal is less than or equal to the givenKualiDecimal



isLessThan
public boolean isLessThan(KualiDecimal operand)(Code)

Parameters:
  operand - true if this KualiDecimal is less than the given KualiDecimal



isNegative
public boolean isNegative()(Code)
true if this KualiDecimal is less than zero



isNonZero
public boolean isNonZero()(Code)
true if this KualiDecimal is not equal to zero



isNumeric
public static boolean isNumeric(String s)(Code)
true if the given String can be used to construct a validKualiDecimal



isPositive
public boolean isPositive()(Code)
true if this KualiDecimal is greater than zero



isZero
public boolean isZero()(Code)
true if this KualiDecimal is equal to zero



longValue
public long longValue()(Code)

See Also:   java.lang.Number.longValue



mod
public KualiDecimal mod(KualiDecimal modulus)(Code)
This method calculates the mod between to KualiDecimal values by first casting to doubles and then by performing the % operation on the two primitives.
Parameters:
  modulus - The other value to apply the mod to. result of performing the mod calculation
throws:
  IllegalArgumentException - if the given modulus is null



multiply
public KualiDecimal multiply(KualiDecimal multiplier)(Code)
Wraps BigDecimal's multiply method to accept and return KualiDecimal instances instead of BigDecimals, so that users of the class don't have to typecast the return value.
Parameters:
  multiplicand - result of multiplying this value by the given multiplier
throws:
  IllegalArgumentException - if the given multiplier is null



negated
public KualiDecimal negated()(Code)
a KualiDecimal with the same scale and a negated value (iff thevalue is non-zero)



setScale
public KualiDecimal setScale(int scale)(Code)
Wraps BigDecimal's setScale method to enforce the default Kuali rounding behavior. KualiDecimal instance set to the given scale, rounded with thedefault rounding behavior (if necessary)



setScale
public KualiDecimal setScale()(Code)
Simplified wrapper over the setScale() method, this one has no arguments. When used with no arguments, it defaults to the Kuali default Scale and Rounding. a rounded, scaled, KualiDecimal



subtract
public KualiDecimal subtract(KualiDecimal subtrahend)(Code)
Wraps BigDecimal's subtract method to accept and return KualiDecimal instances instead of BigDecimals, so that users of the class don't have to typecast the return value.
Parameters:
  subtrahend - result of the subtracting the given subtrahend from this value
throws:
  IllegalArgumentException - if the given subtrahend is null



toString
public String toString()(Code)

See Also:   java.lang.Object.toString



Methods inherited from java.lang.Number
public byte byteValue()(Code)(Java Doc)
abstract public double doubleValue()(Code)(Java Doc)
abstract public float floatValue()(Code)(Java Doc)
abstract public int intValue()(Code)(Java Doc)
abstract public long longValue()(Code)(Java Doc)
public short shortValue()(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.