Java Doc for ComplexFormat.java in  » Science » Apache-commons-math-1.1 » org » apache » commons » math » complex » 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 » Science » Apache commons math 1.1 » org.apache.commons.math.complex 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   java.text.Format
      org.apache.commons.math.complex.ComplexFormat

ComplexFormat
public class ComplexFormat extends Format implements Serializable(Code)
Formats a Complex number in cartesian format "Re(c) + Im(c)i". 'i' can be replaced with 'j', and the number format for both real and imaginary parts can be configured.
author:
   Apache Software Foundation
version:
   $Revision: 348519 $ $Date: 2005-11-23 12:12:18 -0700 (Wed, 23 Nov 2005) $



Constructor Summary
public  ComplexFormat()
     Create an instance with the default imaginary character, 'i', and the default number format for both real and imaginary parts.
public  ComplexFormat(NumberFormat format)
     Create an instance with a custom number format for both real and imaginary parts.
public  ComplexFormat(NumberFormat realFormat, NumberFormat imaginaryFormat)
     Create an instance with a custom number format for the real part and a custom number format for the imaginary part.
public  ComplexFormat(String imaginaryCharacter)
     Create an instance with a custom imaginary character, and the default number format for both real and imaginary parts.
public  ComplexFormat(String imaginaryCharacter, NumberFormat format)
     Create an instance with a custom imaginary character, and a custom number format for both real and imaginary parts.
public  ComplexFormat(String imaginaryCharacter, NumberFormat realFormat, NumberFormat imaginaryFormat)
     Create an instance with a custom imaginary character, a custom number format for the real part, and a custom number format for the imaginary part.

Method Summary
public  StringBufferformat(Complex complex, StringBuffer toAppendTo, FieldPosition pos)
     Formats a Complex object to produce a string.
Parameters:
  complex - the object to format.
Parameters:
  toAppendTo - where the text is to be appended
Parameters:
  pos - On input: an alignment field, if desired.
public  StringBufferformat(Object obj, StringBuffer toAppendTo, FieldPosition pos)
     Formats a object to produce a string.
public static  StringformatComplex(Complex c)
     This static method calls formatComplex() on a default instance of ComplexFormat.
public static  Locale[]getAvailableLocales()
     Get the set of locales for which complex formats are available.
public  StringgetImaginaryCharacter()
     Access the imaginaryCharacter.
public  NumberFormatgetImaginaryFormat()
     Access the imaginaryFormat.
public static  ComplexFormatgetInstance()
     Returns the default complex format for the current locale.
public static  ComplexFormatgetInstance(Locale locale)
     Returns the default complex format for the given locale.
Parameters:
  locale - the specific locale used by the format.
public  NumberFormatgetRealFormat()
     Access the realFormat.
public  Complexparse(String source)
     Parses a string to produce a Complex object.
public  Complexparse(String source, ParsePosition pos)
     Parses a string to produce a Complex object.
Parameters:
  source - the string to parse
Parameters:
  pos - input/ouput parsing parameter.
public  ObjectparseObject(String source, ParsePosition pos)
     Parses a string to produce a object.
Parameters:
  source - the string to parse
Parameters:
  pos - input/ouput parsing parameter.
public  voidsetImaginaryCharacter(String imaginaryCharacter)
     Modify the imaginaryCharacter.
public  voidsetImaginaryFormat(NumberFormat imaginaryFormat)
     Modify the imaginaryFormat.
public  voidsetRealFormat(NumberFormat realFormat)
     Modify the realFormat.


Constructor Detail
ComplexFormat
public ComplexFormat()(Code)
Create an instance with the default imaginary character, 'i', and the default number format for both real and imaginary parts.



ComplexFormat
public ComplexFormat(NumberFormat format)(Code)
Create an instance with a custom number format for both real and imaginary parts.
Parameters:
  format - the custom format for both real and imaginary parts.



ComplexFormat
public ComplexFormat(NumberFormat realFormat, NumberFormat imaginaryFormat)(Code)
Create an instance with a custom number format for the real part and a custom number format for the imaginary part.
Parameters:
  realFormat - the custom format for the real part.
Parameters:
  imaginaryFormat - the custom format for the imaginary part.



ComplexFormat
public ComplexFormat(String imaginaryCharacter)(Code)
Create an instance with a custom imaginary character, and the default number format for both real and imaginary parts.
Parameters:
  imaginaryCharacter - The custom imaginary character.



ComplexFormat
public ComplexFormat(String imaginaryCharacter, NumberFormat format)(Code)
Create an instance with a custom imaginary character, and a custom number format for both real and imaginary parts.
Parameters:
  imaginaryCharacter - The custom imaginary character.
Parameters:
  format - the custom format for both real and imaginary parts.



ComplexFormat
public ComplexFormat(String imaginaryCharacter, NumberFormat realFormat, NumberFormat imaginaryFormat)(Code)
Create an instance with a custom imaginary character, a custom number format for the real part, and a custom number format for the imaginary part.
Parameters:
  imaginaryCharacter - The custom imaginary character.
Parameters:
  realFormat - the custom format for the real part.
Parameters:
  imaginaryFormat - the custom format for the imaginary part.




Method Detail
format
public StringBuffer format(Complex complex, StringBuffer toAppendTo, FieldPosition pos)(Code)
Formats a Complex object to produce a string.
Parameters:
  complex - the object to format.
Parameters:
  toAppendTo - where the text is to be appended
Parameters:
  pos - On input: an alignment field, if desired. On output: theoffsets of the alignment field the value passed in as toAppendTo.



format
public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos)(Code)
Formats a object to produce a string. obj must be either a Complex object or a Number object. Any other type of object will result in an IllegalArgumentException being thrown.
Parameters:
  obj - the object to format.
Parameters:
  toAppendTo - where the text is to be appended
Parameters:
  pos - On input: an alignment field, if desired. On output: theoffsets of the alignment field the value passed in as toAppendTo.
See Also:   java.text.Format.format(java.lang.Objectjava.lang.StringBufferjava.text.FieldPosition)
throws:
  IllegalArgumentException - is obj is not a valid type.



formatComplex
public static String formatComplex(Complex c)(Code)
This static method calls formatComplex() on a default instance of ComplexFormat.
Parameters:
  c - Complex object to format A formatted number in the form "Re(c) + Im(c)i"



getAvailableLocales
public static Locale[] getAvailableLocales()(Code)
Get the set of locales for which complex formats are available. This is the same set as the NumberFormat set. available complex format locales.



getImaginaryCharacter
public String getImaginaryCharacter()(Code)
Access the imaginaryCharacter. the imaginaryCharacter.



getImaginaryFormat
public NumberFormat getImaginaryFormat()(Code)
Access the imaginaryFormat. the imaginaryFormat.



getInstance
public static ComplexFormat getInstance()(Code)
Returns the default complex format for the current locale. the default complex format.



getInstance
public static ComplexFormat getInstance(Locale locale)(Code)
Returns the default complex format for the given locale.
Parameters:
  locale - the specific locale used by the format. the complex format specific to the given locale.



getRealFormat
public NumberFormat getRealFormat()(Code)
Access the realFormat. the realFormat.



parse
public Complex parse(String source) throws ParseException(Code)
Parses a string to produce a Complex object.
Parameters:
  source - the string to parse the parsed Complex object.
exception:
  ParseException - if the beginning of the specified stringcannot be parsed.



parse
public Complex parse(String source, ParsePosition pos)(Code)
Parses a string to produce a Complex object.
Parameters:
  source - the string to parse
Parameters:
  pos - input/ouput parsing parameter. the parsed Complex object.



parseObject
public Object parseObject(String source, ParsePosition pos)(Code)
Parses a string to produce a object.
Parameters:
  source - the string to parse
Parameters:
  pos - input/ouput parsing parameter. the parsed object.
See Also:   java.text.Format.parseObject(java.lang.Stringjava.text.ParsePosition)



setImaginaryCharacter
public void setImaginaryCharacter(String imaginaryCharacter)(Code)
Modify the imaginaryCharacter.
Parameters:
  imaginaryCharacter - The new imaginaryCharacter value.
throws:
  IllegalArgumentException - if imaginaryCharacter isnull or an empty string.



setImaginaryFormat
public void setImaginaryFormat(NumberFormat imaginaryFormat)(Code)
Modify the imaginaryFormat.
Parameters:
  imaginaryFormat - The new imaginaryFormat value.
throws:
  IllegalArgumentException - if imaginaryFormat isnull.



setRealFormat
public void setRealFormat(NumberFormat realFormat)(Code)
Modify the realFormat.
Parameters:
  realFormat - The new realFormat value.
throws:
  IllegalArgumentException - if realFormat isnull.



Methods inherited from java.text.Format
public Object clone()(Code)(Java Doc)
final public String format(Object obj)(Code)(Java Doc)
abstract public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos)(Code)(Java Doc)
public AttributedCharacterIterator formatToCharacterIterator(Object obj)(Code)(Java Doc)
abstract public Object parseObject(String source, ParsePosition pos)(Code)(Java Doc)
public Object parseObject(String source) throws ParseException(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.