Java Doc for Measure.java in  » Science » jscience-4.3.1 » javax » measure » 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 » jscience 4.3.1 » javax.measure 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   javax.measure.Measure

Measure
abstract public class Measure implements Measurable<Q>,Serializable(Code)

This class represents the result of a measurement stated in a known unit.

There is no constraint upon the measurement value itself: scalars, vectors, or even data sets are valid values as long as an aggregate magnitude can be determined (see Measurable ).


author:
   Jean-Marie Dautelle
version:
   4.2, August 26, 2007



Constructor Summary
protected  Measure()
     Default constructor.

Method Summary
public  intcompareTo(Measurable<Q> that)
     Compares this measure to the specified measurable quantity. This method compares the Measurable.doubleValue(Unit) of both this measure and the specified measurable stated in the same unit (this measure's Measure.getUnit() unit ). a negative integer, zero, or a positive integer as this measureis less than, equal to, or greater than the specified measurablequantity.
abstract public  doubledoubleValue(Unit<Q> unit)
     Returns the value of this measure stated in the specified unit as a double.
public  booleanequals(Object obj)
     Compares this measure against the specified object for strict equality (same unit and amount). To compare measures stated using different units the Measure.compareTo method should be used.
public  floatfloatValue(Unit<Q> unit)
     Returns the value of this measure stated in the specified unit as a float.
abstract public  Unit<Q>getUnit()
     Returns the measurement unit of this measure.
abstract public  VgetValue()
     Returns the measurement value of this measure.
public  inthashCode()
     Returns the hash code for this scalar.
public  intintValue(Unit<Q> unit)
     Returns the estimated integral value of this measure stated in the specified unit as a int.
public  longlongValue(Unit<Q> unit)
     Returns the estimated integral value of this measure stated in the specified unit as a long.
abstract public  Measure<V, Q>to(Unit<Q> unit)
     Returns the measure equivalent to this measure but stated in the specified unit.
public  StringtoString()
     Returns the String representation of this measure The string produced for a given measure is always the same; it is not affected by locale.
public static  Measure<java.lang.Double, Q>valueOf(double doubleValue, Unit<Q> unit)
     Returns the scalar measure for the specified double stated in the specified unit.
public static  Measure<java.lang.Long, Q>valueOf(long longValue, Unit<Q> unit)
     Returns the scalar measure for the specified double stated in the specified unit.
public static  Measure<java.lang.Float, Q>valueOf(float floatValue, Unit<Q> unit)
     Returns the scalar measure for the specified float stated in the specified unit.
public static  Measure<java.lang.Integer, Q>valueOf(int intValue, Unit<Q> unit)
     Returns the scalar measure for the specified int stated in the specified unit.
public static  Measure<BigDecimal, Q>valueOf(BigDecimal decimal, Unit<Q> unit)
    
public static  Measure<BigDecimal, Q>valueOf(BigDecimal decimal, Unit<Q> unit, MathContext mathContext)
    
public static  Measure<double[], Q>valueOf(double[] components, Unit<Q> unit)
    


Constructor Detail
Measure
protected Measure()(Code)
Default constructor.




Method Detail
compareTo
public int compareTo(Measurable<Q> that)(Code)
Compares this measure to the specified measurable quantity. This method compares the Measurable.doubleValue(Unit) of both this measure and the specified measurable stated in the same unit (this measure's Measure.getUnit() unit ). a negative integer, zero, or a positive integer as this measureis less than, equal to, or greater than the specified measurablequantity. Double.compare(this.doubleValue(getUnit()), that.doubleValue(getUnit()))



doubleValue
abstract public double doubleValue(Unit<Q> unit)(Code)
Returns the value of this measure stated in the specified unit as a double. If the measure has too great a magnitude to be represented as a double, it will be converted to Double.NEGATIVE_INFINITY or Double.POSITIVE_INFINITY as appropriate.
Parameters:
  unit - the unit in which this measure is stated. the numeric value after conversion to type double.



equals
public boolean equals(Object obj)(Code)
Compares this measure against the specified object for strict equality (same unit and amount). To compare measures stated using different units the Measure.compareTo method should be used.
Parameters:
  obj - the object to compare with. true if both objects are identical (same unit and same amount); false otherwise.



floatValue
public float floatValue(Unit<Q> unit)(Code)
Returns the value of this measure stated in the specified unit as a float. If the measure has too great a magnitude to be represented as a float, it will be converted to Float.NEGATIVE_INFINITY or Float.POSITIVE_INFINITY as appropriate.
Parameters:
  unit - the unit in which the measure is stated. the numeric value after conversion to type float.



getUnit
abstract public Unit<Q> getUnit()(Code)
Returns the measurement unit of this measure. the measurement unit.



getValue
abstract public V getValue()(Code)
Returns the measurement value of this measure. the measurement value.



hashCode
public int hashCode()(Code)
Returns the hash code for this scalar. the hash code value.



intValue
public int intValue(Unit<Q> unit)(Code)
Returns the estimated integral value of this measure stated in the specified unit as a int.

Note: This method differs from the Number.intValue() in the sense that the closest integer value is returned and an ArithmeticException is raised instead of a bit truncation in case of overflow (safety critical).


Parameters:
  unit - the unit in which the measurable value is stated. the numeric value after conversion to type int.
throws:
  ArithmeticException - if this quantity cannot be represented as a int number in the specified unit.



longValue
public long longValue(Unit<Q> unit) throws ArithmeticException(Code)
Returns the estimated integral value of this measure stated in the specified unit as a long.

Note: This method differs from the Number.longValue() in the sense that the closest integer value is returned and an ArithmeticException is raised instead of a bit truncation in case of overflow (safety critical).


Parameters:
  unit - the unit in which the measurable value is stated. the numeric value after conversion to type long.
throws:
  ArithmeticException - if this quantity cannot be represented as a long number in the specified unit.



to
abstract public Measure<V, Q> to(Unit<Q> unit)(Code)
Returns the measure equivalent to this measure but stated in the specified unit. This method may result in lost of precision (e.g. measure of integral value).
Parameters:
  unit - the new measurement unit. the measure stated in the specified unit.



toString
public String toString()(Code)
Returns the String representation of this measure The string produced for a given measure is always the same; it is not affected by locale. This means that it can be used as a canonical string representation for exchanging data, or as a key for a Hashtable, etc. Locale-sensitive measure formatting and parsing is handled by the MeasureFormat class and its subclasses. the string representation of this measure.



valueOf
public static Measure<java.lang.Double, Q> valueOf(double doubleValue, Unit<Q> unit)(Code)
Returns the scalar measure for the specified double stated in the specified unit.
Parameters:
  doubleValue - the measurement value.
Parameters:
  unit - the measurement unit.



valueOf
public static Measure<java.lang.Long, Q> valueOf(long longValue, Unit<Q> unit)(Code)
Returns the scalar measure for the specified double stated in the specified unit.
Parameters:
  longValue - the measurement value.
Parameters:
  unit - the measurement unit.



valueOf
public static Measure<java.lang.Float, Q> valueOf(float floatValue, Unit<Q> unit)(Code)
Returns the scalar measure for the specified float stated in the specified unit.
Parameters:
  floatValue - the measurement value.
Parameters:
  unit - the measurement unit.



valueOf
public static Measure<java.lang.Integer, Q> valueOf(int intValue, Unit<Q> unit)(Code)
Returns the scalar measure for the specified int stated in the specified unit.
Parameters:
  intValue - the measurement value.
Parameters:
  unit - the measurement unit.



valueOf
public static Measure<BigDecimal, Q> valueOf(BigDecimal decimal, Unit<Q> unit)(Code)
DecimalMeasure



valueOf
public static Measure<BigDecimal, Q> valueOf(BigDecimal decimal, Unit<Q> unit, MathContext mathContext)(Code)
DecimalMeasureDecimalMeasure.to(UnitMathContext) converting



valueOf
public static Measure<double[], Q> valueOf(double[] components, Unit<Q> unit)(Code)
VectorMeasure



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.