Generics Do's and Dont's
I have posted our slides from our JavaOne Session
BOF-9225 "Generic Do's and Don'ts" on my blog:
http://blogs.sun.com/roller/page/ahe?entry=impressions_from_javaone
I got a lot of inspiration from this forum, so thank you all!
I hope to elaborate more on this in the future, perhaps
with blog entries or an article on java.net. If you have more
ideas which fit in the category of "generic do's and don'ts",
please let me know.
Nice summary Peter. Couple of things you could fix if you get a chance to do another version:
On slide 18, you don't use the second argument to the constructor 't':
final class CheckedBox<T> {
final Class<T> type;
T t;
CheckedBox(Class<T> type, T t) {
this.type = type;
...On slide 20, I think you've forgotten to actually pass the Type Token to the constructor of the CheckedBox!
CheckedBox<String> bs = new CheckedBox<String>(); //??
CheckedBox rawBox = bs;
rawBox.setValue(3); // ClassCastException
String s = bs.getValue(); // never gets hereOr did I missunderstand something?
Similar Messages
-
can anyone help me with Magicjack? after I purchased US number I am unable to log in on my Iphone, I keep getting an error "YOUR DEVICE IS NOT ON THIS ACCOUNT" I contacted MJ support but they are very much useless and dont know how to fix it!
There's a whole lot to read in your post, and frankly I have not read it all.
Having said that, this troubleshooting guide should help:
http://support.apple.com/kb/TS1538
In particular, pay attention to the mobile device support sections near the bottom, assuming you have already done the items above it. -
Under Windows 7 Ultimate x64 and Boot Camp, my 27 inch Apple LED Cinema Display checks out as a Generic PnP Monitor and is shown as NOT HDCP compliant. I haven't been able to find any kind of an .inf file to use. Does anyone have a solution? Or is Apple's implementation of HDCP (if it's there) incomplete?
I am having this same issue. Im not sure if this is the cause but I think this is keeping PowerDVD Ultra 11 from playing back Bluray under Windows 7 / Bootcamp
-
I need to export a photo at around 1meg file size,and dont seem to be able to do it in the presets can anyone help please ,I shoot on a canon 5d
I believe Frank is referring to the end use (e.g., for print or on-screen use).
Until he returns, I can tell you that I ran a quick test using an image from the Aperture 3 training book library which was as follows:
Camera = Canon EOS 5D Mark II
Master resolution = 5616 x 3744 (21 MP)
I was able to export to a JPEG with end file size of 1 MB as follows:
Export Presets drop-down > select 'Edit' option
Selected preset name 'JPEG - 50% of Original Size' > change percentage value to 40% > change DPI value to '300' > click OK to set as current default > Export version to desktop.
The exported JPEG has a resolution of 2246 x 1498 and appears on screen to have the same image quality of the original in Aperture.
Note - I did not change the default Image Quality slider in the Export Preset dialog (which left it at 10).
Basically, you will need to play around with the settings until you find the appropriate values to arrive at an image version you want. -
I recently aquired a new iphone 4s because my old one broke. I backed it up on my itunes but now it wont give me the option of using the phone, it just says connect to itunes. I have synced it several times now and dont know what to do, please help me!!
I recently created a new apple ID
Bad idea.
Content bought with an Apple ID is forever associated with that Apple ID. Apple will not transfer content from one Apple ID to another and Apple will not merge Apple IDs. Unless you are prepared to forfeit all the previously purchased content and buy it all again with the new Apple ID, you will need to maintain the old ID to update and redownload your content. -
How can I sync my old Ipod without loosing everything? I dont remember my old password and dont have the same email. I have many pics stored on there of many trips we took over the years and songs as well please help...
What are you wanting to do exactly? Are you trying to sync this older iPod with a new/different iTunes library from the one you originally set it up with?
B-rock -
What can I do? I've forgotten my password and dont remember the answers to my sercurity questions, and no longer have access to the email account i used for backup. How do I get my icloud password reset? Please help. Thanks in advance.
Please see Kappy's User Tip here:
https://discussions.apple.com/docs/DOC-4551 -
My ipod Touch does not want to turn on. I've tried all the different methods and I'm stuck and dont know what to do now. What else can I try?
JesusDGZ wrote:
My ipod Touch does not want to turn on. I've tried all the different methods and I'm stuck and dont know what to do now. What else can I try?
I have no clue what you mean by "all the different methods." Here are my suggestions.
First, try a system reset. It cures many ills and it's quick, easy and harmless...
Hold down the on/off switch and the Home button simultaneously until you see the Apple logo. Ignore the "Slide to power off" text if it appears. You will not lose any apps, data, music, movies, settings, etc.
If the Reset doesn't work, try a Restore. Note that it's nowhere near as quick as a Reset. It could take well over an hour! Connect via cable to the computer that you use for sync. From iTunes, select the iPad/iPod and then select the Summary tab. Follow directions for Restore and be sure to say "yes" to the backup. You will be warned that all data (apps, music, movies, etc.) will be erased but, as the Restore finishes, you will be asked if you wish the contents of the backup to be copied to the iPad/iPod. Again, say "yes."
At the end of the basic Restore, you will be asked if you wish to sync the iPad/iPod. As before, say "yes." Note that that sync selection will disappear and the Restore will end if you do not respond within a reasonable time. If that happens, only the apps that are part of the IOS will appear on your device. Corrective action is simple - choose manual "Sync" from the bottom right of iTunes.
If you're unable to do the Restore, go into Recovery Mode per the instructions here. -
Hi
I am using OS 10.6.8 and just installing logic pro 9. I am downloading the extra 20gig of material - the additional content packages. I am installing Logic on my laptop as well and dont want to download the extra 20 gig again. How do i go about transferring it from the computer to the laptop?
ThanksAnd now a second newbie question. I have downloaded the additional content and booted up logic for the first time, but the apple loops have not installed and logic is asking me to reinstall the apple loops. But how do I do that? I can see they are in the libray so have downloaded.
Thanks -
my itunes keeps crashing every time i open it with my windows 7. im active military and dont have time to be messing with this. please help
Hello there, Staver13.
The following Knowledge Base article provides some assistance in troubleshooting your issue:
Can't connect to the iTunes Store
http://support.apple.com/kb/TS1368
Particularly:
Troubleshoot issues on an iPhone, iPad, or iPod touch
If you haven't been able to connect to the iTunes Store:
Make sure your date, time, and time zone are correct in Settings > General > Date & Time.
Note: Time Zone may list another city in your time zone.
Make sure that your iOS software is up to date by tapping Settings > General > Software Update (iOS 5 or later) or connecting your iOS device to iTunes and clicking Check for Update on your device's Summary page.
Check and verify that you're in range of a Wi-Fi router or base station. If you're on a device with cellular service, make sure that cellular data is turned on from Settings > General > Cellular.
Note: If connected to cellular data, larger items may not download. You may need to connect to Wi-Fi to download apps, videos, and podcasts.
Make sure that you have an active Internet connection. You can check the user guide for your device for help with connecting to the Internet.
Make sure that other devices (portable computers, for example) are able to connect to the Wi-Fi network and access the Internet.
Try resetting (turning off and then on again) your Wi-Fi router.
If the issue persists, try troubleshooting your Wi-Fi networks and connections.
Thanks for reaching out to Apple Support Communities.
Cheers,
Pedro. -
i got a new ipad and went buy music on iTunes and in is telling me that this is a new device on this account and wants me to answer some security questions I dont remember setting thes up and dont know the answers how do i reset the security questions
Click here and search the article for '2 out of 3' without the quotes; this generally involves either a message being sent to your rescue email address or contacting the iTunes Store staff directly.
(74313) -
Im on the 10.6.8 software and i recently deleted my mac app store and emptied trash and dont know how to get it back now.
Download and run the 10.6.8 combo update http://support.apple.com/kb/DL1399
-
Hey guys, I've lost my Mac Book and dont know what to do... :S
Hey guys, I've lost my Mac Book and dont know what to do... :S
Computers do not get "lost." They are stolen. Call the police and your homeowners or rental insurance company.
Reporting a lost or stolen Mac Product -
i have forgot my restrictions passcode and dont know what to do to restore my factory settings?
To remove a restrictions password you'll have to restore your phone as a new device without using your backup and start over. Save as much of your data as you can first (import your photos & videos to your computer, email your notes to yourself of sync them to a supported program, back up your contacts such as by syncing them with iCloud, etc.), then follow this guide to restore your phone: http://support.apple.com/kb/HT1414.
-
so my computer crashed and i had lost all my itunes purchases and dont know how to get them back, so my computer crashed and i had lost all my itunes purchases and dont know how to get them back
You have a backup of your computer, or at the very least of your iTunes media, correct?
Simply copy your backup of your iTunes media into the iTunes library on your new computer.
Connecting and syncing your device to the new computer without first recovering your iTunes media is a really, really, really bad idea. iDevices are designed to ONLY sync with one computer. When you plug your device into a new computer, it will wipe all media on the device when it syncs. The only media you may be able to salvage and transfer to the new computer would be anything bought directly on the device.
If you do not have a backup of your iTunes media, then you will want to either look at a way (using software from a third party company) to either extract the media from you iDevice or your old computer (assuming the hard drive is not toast).
Maybe you are looking for
-
Switch makes AirPort invisible to AirPort Utility?
Hi all. Wired connections: iMac27" Yosemite connected to a D-Link dumb switch connected to a AirPort Extreme v7.7.3. When wiring run through switch, iMac intermittently can't see the APE. Removing switch from setup and going direct iMac->APE resolves
-
I just upgraded my ipad 2 on apple's advice now can't do the back-up on my now-empty ipad! itunes won't recognise my password! help help
-
COPA how to analyse sales by actual cost (MTS) ?
Hi All, We use Make-To-Stock production type. I want to make a drilldown report for sales analysis use actual cost (COGS + production variance), how to link production variance to sales data. Any suggestion will be appreciated. Thanks & Regards Sam
-
Where do I download the firefox insight tool for SEO use
I attended an eCommerce course yesterday and the presenter showed us an application/tool which he called firefox insight which is used in website SEO and PPC. I have found google insights but cannot find the Firefox one he demod to us. Can any one he
-
New Mac Pro - A graphics problem has been detected
System: New Mac Pro (late 2013) AMD Firepro D300, 2GB 3.7G Quad Core Xeon E5 12GB Ram 250G SSD Internal dual display, 24" samsung BX2440 and older 19" dell logitech mx518 mouse Apple wired keyboard with numeric pad external USB 2T drive used for time