Java Doc for Short.java in  » Apache-Harmony-Java-SE » java-package » java » lang » 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 » Apache Harmony Java SE » java package » java.lang 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   java.lang.Number
      java.lang.Short

Short
final public class Short extends Number implements Comparable<Short>(Code)

Short is the wrapper for the primitive type short.


See Also:   java.lang.Number
since:
   1.1

Inner Class :static class valueOfCache

Field Summary
final public static  shortMAX_VALUE
    

Constant for the maximum short value, 215-1.

final public static  shortMIN_VALUE
    

Constant for the minimum short value, -215.

final public static  intSIZE
    

Constant for the number of bits to represent a short in two's compliment form.

final public static  Class<Short>TYPE
     The java.lang.Class that represents this class.

Constructor Summary
public  Short(String string)
     Constructs a new instance of this class given a string.
public  Short(short value)
     Constructs a new instance of the receiver which represents the short valued argument.

Method Summary
public  bytebyteValue()
    
public  intcompareTo(Short object)
    

Compares this Short to the Short passed.

public static  Shortdecode(String string)
     Parses the string argument as if it was a short value and returns the result.
public  doubledoubleValue()
    
public  booleanequals(Object object)
     Compares the argument to the receiver, and answers true if they represent the same object using a class specific comparison.
public  floatfloatValue()
    
public  inthashCode()
     Answers an integer hash code for the receiver.
public  intintValue()
    
public  longlongValue()
    
public static  shortparseShort(String string)
     Parses the string argument as if it was a short value and returns the result.
public static  shortparseShort(String string, int radix)
     Parses the string argument as if it was a short value and returns the result.
public static  shortreverseBytes(short s)
    

Reverses the bytes of a short.


Parameters:
  s - The short to reverse.
public  shortshortValue()
    
public  StringtoString()
     Answers a string containing a concise, human-readable description of the receiver.
public static  StringtoString(short value)
     Answers a string containing a concise, human-readable description of the argument.
Parameters:
  value - short the short to convert.
public static  ShortvalueOf(String string)
     Parses the string argument as if it was a short value and returns a Short representing the result.
public static  ShortvalueOf(String string, int radix)
     Parses the string argument as if it was a short value and returns a Short representing the result.
public static  ShortvalueOf(short s)
    

Returns a Short instance for the short value passed.


Field Detail
MAX_VALUE
final public static short MAX_VALUE(Code)

Constant for the maximum short value, 215-1.




MIN_VALUE
final public static short MIN_VALUE(Code)

Constant for the minimum short value, -215.




SIZE
final public static int SIZE(Code)

Constant for the number of bits to represent a short in two's compliment form.


since:
   1.5



TYPE
final public static Class<Short> TYPE(Code)
The java.lang.Class that represents this class.




Constructor Detail
Short
public Short(String string) throws NumberFormatException(Code)
Constructs a new instance of this class given a string.
Parameters:
  string - a string representation of a short quantity.
exception:
  NumberFormatException - if the argument could not be parsed as a short quantity.



Short
public Short(short value)(Code)
Constructs a new instance of the receiver which represents the short valued argument.
Parameters:
  value - the short to store in the new instance.




Method Detail
byteValue
public byte byteValue()(Code)
Answers the byte value which the receiver represents byte the value of the receiver.



compareTo
public int compareTo(Short object)(Code)

Compares this Short to the Short passed. If this instance's value is equal to the value of the instance passed, then 0 is returned. If this instance's value is less than the value of the instance passed, then a negative value is returned. If this instance's value is greater than the value of the instance passed, then a positive value is returned.


Parameters:
  object - The instance to compare to.
throws:
  NullPointerException - if object isnull.
since:
   1.2



decode
public static Short decode(String string) throws NumberFormatException(Code)
Parses the string argument as if it was a short value and returns the result. Throws NumberFormatException if the string does not represent an int quantity. The string may be a hexadecimal ("0x..."), octal ("0..."), or decimal ("...") representation of a byte.
Parameters:
  string - a string representation of a short quantity. Short the value represented by the argument
exception:
  NumberFormatException - if the argument could not be parsed as a short quantity.



doubleValue
public double doubleValue()(Code)
Answers the double value which the receiver represents double the value of the receiver.



equals
public boolean equals(Object object)(Code)
Compares the argument to the receiver, and answers true if they represent the same object using a class specific comparison.

In this case, the argument must also be a Short, and the receiver and argument must represent the same short value.
Parameters:
  object - the object to compare with this object true if the object is the same as this objectfalse if it is different from this object
See Also:   Short.hashCode




floatValue
public float floatValue()(Code)
Answers the float value which the receiver represents float the value of the receiver.



hashCode
public int hashCode()(Code)
Answers an integer hash code for the receiver. Any two objects which answer true when passed to equals must answer the same value for this method. the receiver's hash
See Also:   Short.equals



intValue
public int intValue()(Code)
Answers the int value which the receiver represents int the value of the receiver.



longValue
public long longValue()(Code)
Answers the long value which the receiver represents long the value of the receiver.



parseShort
public static short parseShort(String string) throws NumberFormatException(Code)
Parses the string argument as if it was a short value and returns the result. Throws NumberFormatException if the string does not represent an short quantity.
Parameters:
  string - a string representation of a short quantity. short the value represented by the argument
exception:
  NumberFormatException - if the argument could not be parsed as a short quantity.



parseShort
public static short parseShort(String string, int radix) throws NumberFormatException(Code)
Parses the string argument as if it was a short value and returns the result. Throws NumberFormatException if the string does not represent a single short quantity. The second argument specifies the radix to use when parsing the value.
Parameters:
  string - a string representation of a short quantity.
Parameters:
  radix - the radix to use when parsing. short the value represented by the argument
exception:
  NumberFormatException - if the argument could not be parsed as a short quantity.



reverseBytes
public static short reverseBytes(short s)(Code)

Reverses the bytes of a short.


Parameters:
  s - The short to reverse. The reversed value.
since:
   1.5



shortValue
public short shortValue()(Code)
Answers the short value which the receiver represents short the value of the receiver.



toString
public String toString()(Code)
Answers a string containing a concise, human-readable description of the receiver. a printable representation for the receiver.



toString
public static String toString(short value)(Code)
Answers a string containing a concise, human-readable description of the argument.
Parameters:
  value - short the short to convert. String a printable representation for the short.



valueOf
public static Short valueOf(String string) throws NumberFormatException(Code)
Parses the string argument as if it was a short value and returns a Short representing the result. Throws NumberFormatException if the string does not represent a single short quantity.
Parameters:
  string - a string representation of a short quantity. Short the value represented by the argument
exception:
  NumberFormatException - if the argument could not be parsed as a short quantity.



valueOf
public static Short valueOf(String string, int radix) throws NumberFormatException(Code)
Parses the string argument as if it was a short value and returns a Short representing the result. Throws NumberFormatException if the string does not represent a short quantity. The second argument specifies the radix to use when parsing the value.
Parameters:
  string - a string representation of a short quantity.
Parameters:
  radix - the radix to use when parsing. Short the value represented by the argument
exception:
  NumberFormatException - if the argument could not be parsed as a short quantity.



valueOf
public static Short valueOf(short s)(Code)

Returns a Short instance for the short value passed. This method is preferred over the constructor, as this method may maintain a cache of instances.


Parameters:
  s - The short value. A Short instance.
since:
   1.5



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
protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object object)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final public Class<? extends Object> getClass()(Code)(Java Doc)
public int hashCode()(Code)(Java Doc)
final public void notify()(Code)(Java Doc)
final public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final public void wait(long millis, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait(long millis) 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.