Can you do the Java equivalent of this with Generics?

hi,
http://www.informit.com/content/index.asp?product_id=%7B4BCD9193-97E4-4004-AF84-D7346E261C69%7D
thanks,
asjf

Think of specialization as "compile-time" polymorphism. It allows you to create different implementations of methods/classes for different types, selected at compile-time. For example, I use template specialization extensively in Jace to unify entire sets of type-disparate JNI functions.
Specialization is a very powerful technique and is also used extensively in template meta-programming (which brings us back to the OP). Even were the current form of Java generics to somehow magically support some form of specialization, you still wouldn't be able to perform meta-programming as Java generics don't work with constants.
Any surface similarities between Java generics and C++ templates expire at trivial inspection, which means that it's a fairly futile exercise to try to compare the two.
God bless,
-Toby Reyelts
Check out the free, open-source, JNI toolkit - Jace, http://jace.reyelts.com/jace

Similar Messages

  • Can you upgrade the Graphics Card in this Machine?

    I Just ordered the HP Pavilion Model Number is m7-1015dx i really really look forward to getting this laptop it has really really good specifications for the price. The only thing that has been bugging me really bad is that "Can you upgrade the Graphics Card in this machine?" Since i am using the for Hardcore Gaming and School.
    - Thanks in advance.
    This question was solved.
    View Solution.

    BrennonTB wrote:
    I Just ordered the HP Pavilion Model Number is m7-1015dx i really really look forward to getting this laptop it has really really good specifications for the price. The only thing that has been bugging me really bad is that "Can you upgrade the Graphics Card in this machine?" Since i am using the for Hardcore Gaming and School.
    - Thanks in advance.
    Hi,
    Upgrading graphics chips on laptops is very difficult and mostly impossible because the chips are soldered to the motherboard. You can upgrade the graphics chip by replacing the motherboard with a compatible one which has a more powerful graphics chip. In your case it is a mobo with an Nvidia GF GT650M with 2GB of DDR5 RAM. However, the motherboard costs approx $600. The part number you need is:  682040-001.
    It looks like M7series laptops are compatible with Dv7-6000 series laptops. See a service manual:
    http://h10032.www1.hp.com/ctg/Manual/c03221579.pdf
    Dv6-7000 /Full HD/Core i5-3360M/GF 650M/Corsair 8GB/Intel 7260AC/Samsung Pro 256GB
    Testing - HP 15-p000
    HP Touchpad provided by HP
    Currently on Debian Wheeze
    *Please, help other users with the same issue by marking your solved topics as "Accept as Solution"*

  • Can you use the 13-inch MacBook Pro with Retina display straight out of the box, or do you have to charge it first?

    Can you use the 13-inch MacBook Pro with Retina display straight out of the box, or do you have to charge it up fully before you can use it. I do not want to damage the laptop by misusing the battery.

    Attach the charger and start charging the battery to 100%.  The good news is that after you have connected the charger, you may start using the MBP as well.
    Ciao.

  • Can you use the I pad power adapter with the I phone 5 lightning cord?

    Can you use the I pad or I phone 4 power adapter with the I phone 5 lightning cord to charge your I phone 5 without damaging it?

    Yes, the iPad charger has more wattage so it would charge your iPhone faster then the square iPhone charger.

  • Can you swob the charger of a macbook with a macbookpro?

    We have a macbook and a macbookpro. Can you swob the chargers against each other?

    There are 45, 60 and 85 W magsafe chargers, 85 model may be used to any mac beneath it, smaller ones not with 15 and 17 inch MBPs, which require 85 W, they will turn hot very soon, and may get damaged.
    The principle is ‘use the most powerful with any beneath its maximum power, never viceversa’.

  • Can you upgrade the Java JDK that is shipped with ES3 to a more current version

    We have installed ES3 within out environment. However there appears to be some security issues with the JDK (1.6.0_26) that is shipped with ES3. We can't find any documentation on how to upgrade the JDK to a newer version that will work with ES3.

    These computers usually use Xandros, which is a version of linux that is no longer actively developed. Unfortunately I don't think there is a good way to update Firefox on these machines. I'd suggest you install a new version of linux (Ubuntu is a very popular and easy to use one). This is a bit beyond the scope of this forum however, I'd suggest looking on a few linux forums. They can help you find a version of linux that is more modern, faster and more secure, and then help you with installing it and setting it up. You'll be able to use the newest Firefox at that point, plus your operating system will be updated and faster.

  • Can you install the Java PDK in the portal that runs on Unix?

    Our Netweaver Portal (EP6 sp20) is running on a Unix box.
    Can I not install Portal Development Kit (PDK) - 60.14.0 ????
    It says in the installation guide:
    "The PDK is like the SAP NetWeaver Developer Studio released and supported for Windows platforms only."
    I thought Business Packages were Platform Independent ???

    yes you can, at your own risk

  • How can you record the screen of any device with no computer and no jailbreak?

    I would like to record the screen to record my gameplay and other stuff. Please help.

    Josh, this was my first gripe when I moved to IronPort toward the end of 2008; I forget the version of Asyncos we were on then. Remember that the design philosophy (as I'm given to understand it) is that you shouldn't have to nursemaid it as much as some other gateways, though achieving that is more a question of developing robust mail policies than simply plugging in the device and running the setup wizard.
    I found the Asyncos GUI a bit of a pain to work with for header analysis, but I've adapted over time. It's only an annoyance now when you need to see an attachment file name that scrolls across three or four screen widths, and by comparison SharePoint gives me more grief in that department (we're on a paleolithic version here).
    For some things we send a copy of quarantined items out to a dedicated mailbox only accessible by staff monitoring our gateways; for more details see my posting in your thread "Can't View Video Files Attached To Emails".

  • Can you change the time gap in songs with iPhone

    I really want to change the time gap in between each I my songs on my iPhone 4 but I don't know if I can or even how so if anyone can help :)

    What "once a day" really means is "every twenty four hours starting from the last time they were updated". Just manually update them tomorrow morning and you should find that the time has changed.

  • Java arrays - can you name the keys?

    i have 1 function that declares 2 ArrayLists of type String. They are the same size and the values are related. Let's call them A & B.
    I was hoping i could have my function return just 1 array, with the values of arraylist A being they keys of the returned array, and the values of arraylist B being the values in the returned array.
    But can you name the elements of an array in java? in php you can, but in java, the only examples i have seen only use the standard #'s: 0, 1, 2, 3, etc. if you can, please post sample syntax.
    i guess i could use a double scripted array, but... well i don't exactly know what the sytax would be for that in declaring the funciton.
    if someone has a link of these kinds of examples / topics they could send me - that would be great too - i googled it but haven't really come across any.
    thanks in advance

    It appears as though what you are trying to do is associate a specific "key" value with another value. For example, let's say you want the word "dog" to be the key for the arraylist value of "bull dog."
    The perfect data structure for this that Java provides is called a Map. Here is some sample code.
    //create something called a HashMap where the first
    //value is the key, and the second value is the value
    //that the key is associated with
    HashMap<String, String> map = new HashMap<String, String>();
    //now, consider the previous example...
    //here is the syntax for storing those values
    map.put("dog", "bull dog");
    //and this would be the syntax for getting a value
    String value = map.get('dog");
    //which would give "bull dog"
    {code}
    Hope that helps :)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How can you expect the customer to have a LOCAL/COUNTRY Based Credit Card every where we go??? Last week I was on holiday in HK,  and  from my Hotel I was able to use m VN Credit Card with my Apple ID and purchase online!  Why THIS WEEK, can't I use my HS

    Apple_ID_card_declined_for_this_country
    How can you expect the customer to have a LOCAL/COUNTRY Based Credit Card every where we go???
    Last week I was on holiday in HK,
    and
    from my Hotel I was able to use m VN Credit Card with my Apple ID and purchase online!
    Why THIS WEEK, can't I use my HSBC Platinum Credit Card from Vietnam,
    for my Singapore Apple ID account ,
    while working here in Vietnam???

    Unfortunately, this is a problem that is driven by the DRM Dictatorship.  Despite the proliferation of mobile devices and the fact that there are many of us who do a lot of international travel, content providers don't want you to have access to their products outside of your homeland.  The Balkanized mentality of the DRM Dictatorship is way out of touch with the modern world.
    At least Apple, to its credit, allows you to use your accounts outside of your homeland as long as you have the proper credentials for them.  Most other services use the more Draconian geolocation filtering which does require you to be physically present in your homeland.  For the most part, you are not allowed to leave home if you want access to your favorite entertainment!

  • TS1363 My iPod Nano 7th Generation couldn't be detected by iTunes when I plugged in. I tried resolving the issue by uninstalling the iTunes and then install it back again but yet still the same problem exist. Can you please help me to solve this issue?

    My iPod Nano 7th Generation couldn't be detected by iTunes when I plugged in. I tried resolving the issue by uninstalling the iTunes and then install it back again but yet still the same problem exist. Can you please help me to solve this issue? I have already updated to the latest version of iTunes on my Windows 8 and I cannot synchronize my iPod for the time being. Please do help me to solve this problem. Thank You.

    uninstall all iTunes,5 programes,this worked for me after reinstall them

  • I just noticed Private browing option, has this been downloaded or automatically added? I dont want my kids up to no good, as how can i check what they're looking at? Can you delete the private browser?

    Can you delete the private brower option

    That has been a feature in Firefox since Firefox 3.5 was released in June, 2009, it's not '''new'''.
    Sorry, that feature can't be "removed" without breaking a security part of Firefox, and the developers didn't provide a "switch" to allow parents to turn it off. What's even worse it that there is a Bug filed to disable Private Browsing when the Parental Control's that are built into Windows Vista and Windows 7 are turned on. Nothing has been done to fix that Bug in almost 2 years since that Bug was originally filed. <br />
    https://bugzilla.mozilla.org/show_bug.cgi?id=471658 <br />
    Hell, there hasn't even been a comment posted in that Bug in almost 7 months. I have done everything I can do as a support helper to make the developers aware of how important this Bug is for parents, based upon parental feedback here - that has been accepted as ''' "Thanks .... So it's on average 2 requests for this per week." '''
    In all honesty though, even if that Bug is fixed a child can just delete their browsing history in any browser quite easily; sure you'll see that it has been deleted, but you still won't know where they have been. You really need to install some Parental Controls on that PC that tracks the web sites that are being visited outside of a web browser, and can only be accessed with a password.
    I don't have any recommendations for that type of software, as I haven't needed it myself. Never had any children, and if I did even my grand-children would probably be old enough not to need monitoring like that.

  • HT1351 Can you take the music off the existing library on the ipod and sync it to a new itunes library?? and if so how do you do this???

    Can you take the music off the existing library on the ipod and sync it to a new itunes library?? and if so how do you do this???

    See this excellent User Tip from another forum member turingtest2 on how to recover content from your iPod back into iTunes.
    https://discussions.apple.com/docs/DOC-3991
    B-rock

  • Hello. Recently I am having a problem of loading video from youtube. The message "loading" keeps go on and on and nothing happens.Can you advise on how to fix this problem ?

    Hello.
    Recently I am having a problem of loading videos from Youtube.
    The message " loading" keeps go on and on and nothing happens. Can you advise on how to fix this problem.
    Thank you inadvance.

    This problem has been fixed. I rebooted my laptop after clearing my Firefox cache and deleting all cookies. Once my laptop was rebooted, I opened Firefox and now I can access the regular YouTube site, not the mobile site.

Maybe you are looking for

  • Error on Startup - aflamingo.dll was not found (Windows XP - CS6)

    I had this error happen with the Beta of PS CS6. I re-installed the beta and the error came back. Then yesterday I uninstalled the beta and installed the PS CS6 Trial Version and today this error is happening again. Re-installing obviously does not f

  • How to add a new created table to SVN repository

    Hello, I am using SQL Developer and Data Modeler both with SVN repository. If I am adding a new object (fe procedure) in SQL Developer, I have a right mouse menu option to add the new object to SVN. This works fine. When adding a new object (fe table

  • Document restriction

    Hi Experts, How to restrict different users for accessing same Document type based on certain additional fields? for eg:if 2 users have access to create same document type, how to restrict displaying the documents based on some additional data entere

  • Oracle equivalent of "With"

    Hello I have to convert sql procedure to Oracle procedure and it uses the common table expression "With" can some one tell me if there is an equivalent of "with" in Oracle It is being used like this. with bcount (Bookid, [count]) as select b.Bookid a

  • IDVD - problem with playability of DVDs burned

    Hello - I'm experiencing trouble when I export a Quicktime file from my Final Cut Pro 5 to burn to a DVD using iDVD5 on my home computer. All worked fine up until about a month ago. I'm unclear what I could have changed in terms of settings at that t