Jump to content

Talk:Primitive wrapper class in Java

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Koman90 (talk | contribs) at 19:29, 26 April 2010 (clean up using AWB). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
WikiProject iconJava Stub‑class Low‑importance
WikiProject iconThis article is within the scope of WikiProject Java, a collaborative effort to improve the coverage of Java on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
StubThis article has been rated as Stub-class on Wikipedia's content assessment scale.
LowThis article has been rated as Low-importance on the project's importance scale.

Other languages

Is Java the only language using wrapper classes, or some sort of? -- Face 08:30, 31 October 2006 (UTC)[reply]

No, but it is the only language I know of that has primitive wrappers as part of the standard library/language. The distinction here is that the wrapper classes are to 'wrap' the non-object primitive types in an object so that every type can be treated generically as an object. —Doug Bell talkcontrib 09:59, 31 October 2006 (UTC)[reply]
Objective-C (Cocoa framework) has a NSValue class whose purpose is to wrap any non-object datatype, like C primitive types, C pointers, C structs, etc. into an Objective-C object. --206.72.77.76 (talk) 00:23, 31 March 2009 (UTC)[reply]

Non-primitive Wrappers

It's my understanding that wrapper classes need not refer specifically to the case of primitive wrappers, and for that matter they need not be specific to Java. I believe that in general wrappers can be used to add additional layers of encapsulation, but I came here hoping for a better definition only to find that Wrapper class redirected here. Shouldn't there be a separate page for wrapper classes in general, or at least something to indicate that not all wrappers are primitive wrappers? Mickeyg13 (talk) 22:59, 24 February 2009 (UTC)[reply]

Perhaps should Wrapper class redirect to a disambig page the points here as well as to the page for the Wrapper pattern? Presently it links directly here but "wrapper class" may reference the design pattern instead of the Java feature. Thoughts? Mickeyg13 (talk) 20:49, 25 March 2009 (UTC)[reply]