Date post: | 15-Jul-2015 |
Category: |
Software |
Upload: | michael-barker |
View: | 108 times |
Download: | 0 times |
Codes like a class, works like an int.
http://cr.openjdk.java.net/~jrose/values/values-0.html
“…to support small immutable, identityless value types.”
Type Signature Java Type
1) Z boolean 2) B byte 3) C char 4) S short 5) I int 6) J long 7) F float 8) D double 9) L class ; class 10) [ type type[] 11) V void
Type Signature Java Type
1) Z boolean 2) B byte 3) C char 4) S short 5) I int 6) J long 7) F float 8) D double 9) L class ; class 10) [ type type[] 11) V void
Type Signature Java Type
1) Z boolean 2) B byte 3) C char 4) S short 5) I int 6) J long 7) F float 8) D double 9) L class ; class 10) [ type type[] 11) V void
Values
References
Type Signature Java Type
1) Z boolean 2) B byte 3) C char 4) S short 5) I int 6) J long 7) F float 8) D double 9) Q class ; value 10) L class ; class 11) [ type type[] 12) V void
Values
References
Codes like a classpublic __ByValue class Decimal64 {
long value;
long significand() {
return value & 0xFFFFFFFFFFFFFF;
}
long exponent() {
return value >> 56;
}
}
Codes like a classpublic __ByValue class Price {
Decimal64 value;
}
public __ByValue class Quantity {
Decimal64 value;
}
java.util.Optional
This is a value-based class; use of identity-sensitive operations (including reference equality (==), identity hash code, or synchronization) on instances of Optional may have unpredictable results and should be avoided.
http://docs.oracle.com/javase/8/docs/api/java/lang/doc-files/ValueBased.html