How can I do this using Wildcards?

Hi everyone,
I have a classed called LabeledDecimal which is a subclass of BigDecimal. Now, I have a class called Pair which is written using Wildcards.
This class has a copyFrom() method which looks like :
public void copyFrom(T p2)
     this.first = p2.first;
     this.second = p2.second;
}If I try to use this method like below:
Pair<BigDecimal> p1 = new Pair<BigDecimal>();
Pair<LabeledDecimal> p2 = new Pair<LabeledDecimal>(ld1, ld2);
p1.copyFrom(p2);Then I get the error:
The method copyFrom(Pair<BigDecimal>) in the type Pair<BigDecimal> is not applicable for the arguments (Pair<LabeledDecimal>)
How do I fix the copyFrom() method to get rid of this problem using wildcards?
Edited by: fantastic_ray on Mar 20, 2008 12:07 AM

Figured it out!
public void copyFrom(Pair<? extends T> p2) That will fix it.

Similar Messages

  • I have about 10000 images of different persons with dimension of 640*480. I wan to crop face from these images to dimension of 200*280. The location of face varies in differnt pics. So, please let me know step by step how can I perform this using the Ligh

    I have about 10000 images of different persons with dimension of 640*480. I wan to crop face from these images to dimension of 200*280. The location of face varies in differnt pics. So, please let me know step by step how can I perform this using the Lightroom software. Also I wan to know what should be the aspect ratio to do so.Thank you in advance

    The aspect ratio should be set to 200x280, or equivalently 5x7.
    I don't think it is possible to do the cropping automatically in Lightroom, you'd have to do this image by image to crop the faces correctly.

  • Hi, I've been stolen and I need to find my iPhone, how can I do this using the IMEI?

    Hi, I've been stolen and I need to find my iPhone, how can I do this using the IMEI?

    You cannot do this using IMEI.
    If your iPhone, iPad, or iPod touch is lost or stolen - Apple Support
    Report a lost or stolen Apple product - Apple Support

  • How can I make this using coldfusion?

    Hi, I'd like to make a photo changing gallery as you see on
    the news sites when you click next it loads a new photo and text
    without reloading the page (
    http://news.aol.com/story/ar/_a/miners-families-outraged-in-utah/20070806121809990001)
    is this done in ajax? do you know where I can find the code
    or application to do this in coldfusion?
    Thanks

    this can be done with a simple image swaping javascript like
    the attached code, and then you call it with and onclick event
    like:
    "imageSwap('BigImage', 'myPicture.jpg');" to cycle through
    several images you can use a javascript array to hold all your
    image names and have the next button just increment through the
    list everytime you click it.

  • Need to create a searchable employee directory in Muse.  How can I do this using Business Catalyst?

    I have been tasked with updating our firm website, and have no prior web design experience.  Muse seems like a great option, but I understand that Muse has no database capabilities.  I was advised that I could find a way to incorporate a searchable employee directory (database) via Business Catalyst. Are there any links that show how to do this?

    Thanks, Adam.  I think this looks like a good option for us.  Here is our current, existing website, which I am tasked with updating:
    www.bstz.com
    Would you mind taking a look at the attorney directory, and confirming that the BC Meet the Team will allow me to create essentially the same sort of directory, with search fields, photos and cv?  I'm sure it will, but I just need confirmation before I go too much further down the design path.
    Right now I am just on trial Adobe Creative Cloud membership, so I was able to download and experiment with Muse.  I believe the cost to continue this would be about $15/month.  If I join Business Catalyst with eCommerce membership, would that be in addition to the Adobe Creative Cloud membership?  I'm going to need to give a proposal to my partners, and I want to make sure I am accurately stating the monthly costs.  We currently have our own in-house server, and I want to be able to rationalize moving away from that.
    Thank you for your continuing expertise.
    Ingrid
    BSTZ
    310.500.4750

  • Some telephone numbers only stay visible for a second or two, refreshing the screen brings them back but again for a second ie too short to note down. How can I stop this (use Vista Basic on laptop)?

    When searching for numbers on a business website quite often, though not always, the telephone number only appears very briefly. Copying the web address on to Internet Explorer the number stays visible. Only happens on telephone numbers not for any other info eg email address.
    Have no idea why this happens as it appears to be random though it must relate to how a website is viewed. Wouldn't where to start to fix this!

    Your above posted system details show outdated plugin(s) with known security and stability risks that you should update.
    *Java Plug-in 1.6.0_13 for Netscape Navigator (DLL Helper)
    Update the [[Java]] plugin to the latest version (6 U22).
    *http://java.sun.com/javase/downloads/index.jsp (Java Platform: Download JRE)
    Update the [[Managing the Flash plugin|Flash]] plugin to the latest version (10.1 r85).
    *http://www.adobe.com/software/flash/about/

  • How can we do this ? (Can it be done using ASSIGN Componenet stuff)

    Hi,
    I am trying to validate the data entered by user. This is related to tax validation.
    Before the tax validation is carried out the data entered by user is valid or not is checked.
    After the user enters the values for field LAND1, BUKRS, KOART, STCD1, STCD2 ; the configuration table zconfig having structure LAND1, BUKRS, KOART and FNAME is checked.
    Now the business people will populate zconfig along with data for LAND1, BUKRS, KOART and FNAME. FNAME will have value of STCD1 and/ or STCD2.
    Now user enters CANADA, 567, D, 3456 for the fields <b>LAND1, BUKRS, KOART  and STCD1</b> (<b>This leaves STCD2 value blank.)</b>
    Now in config table for combination of CANADA, 567, D; the <b>value under FNAME is STCD1.</b>
    Hence
    data enterd by user is valid.
    EXIT.
    But if user enters CANADA, 567, D, 3456 for the fields <b>LAND1, BUKRS, KOART  and STCD2</b> respectively.
    <b>(Here STCD1 is blank.)</b>
    So when this data is being checked against config table the user data should be invalidated as config table has <b>STCD1 as value of FNAME for combination of CANADA, 567, D.</b>
    data entered by user is invalid.
    raise error.
    Can someone tell me how to do this ?
    How can we do this using field symbols ?
    Thanks..

    Hi,
    just a try:
    assumption : stcd1 or stcd2 is <b>obligatory</b> !
    assign (zconfig-fname) to <f>. "so <f> = stcd1 or stcd2
    if <f> is initial."the correct tax no is space !
    message e001(00) with 'false tax no.'.
    else.
    exit.
    endif.
    hope it helps
    Andreas

  • HT204053 I use my iMac to help a friend with an IPAD and a different Apple ID to transfer their existing cps to iTunes on their iPad.  How can I do this without the content being merged into my own Apple ID Account

    I have an IMac which is my main computer and two IPads and an Ipod Nano.
    Obviously we use these in sync as an when required via Itunes.
    I have recommended a friend to have an IPAD2 and she wishes to load some of her existing cds into her Itunes Account.
    If I wish to do this with my own, it is simple as we simply use the Imac which transfers content into Itunes.
    However, my friend does not have a separate computer so I wish to load her CD's into Itunes and then sync to her Ipad without interfering with my own library and using her Apple ID.
    How can I achieve this?

    " how can I sync my iphone to my mac book without losing all the music and pictures on it?"
    You cannot.  Copy everything you want form the old computer to the new one, then sync it.
    it basically says you have to erase your iphone to sync to a new itunes!
    Correct Iphone will sync, or manually manage, with one and only one computer/library at a time. Syncing, or manually managing, to another will indeed erase the current content.

  • I have a private Adobe ID and I have a Lightroom Testversion running there! Now my university gave me access to Creative Cloud for Teams and I want to use my Lightroom catalogues with this ID! How can I do this?

    I have a private Adobe ID and I have a Lightroom Testversion running there! Now my university gave me access to Creative Cloud for Teams and I want to use my Lightroom catalogues with this ID! How can I do this?

    Hi,
    thank you, it’s done! The Chat helped me! Now I cannot go into this forum anymore with my old password, but that’s not a big problem.
    Best wishes,
    Christian
    Von: JimHess <[email protected]<mailto:[email protected]>>
    Antworten an: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>>
    Datum: Montag, 20. April 2015 18:38
    An: Christian Kogler <[email protected]<mailto:[email protected]>>
    Betreff:  I have a private Adobe ID and I have a Lightroom Testversion running there! Now my university gave me access to Creative Cloud for Teams and I want to use my Lightroom catalogues with this ID! How can I do this?
    I have a private Adobe ID and I have a Lightroom Testversion running there! Now my university gave me access to Creative Cloud for Teams and I want to use my Lightroom catalogues with this ID! How can I do this?
    created by JimHess<https://forums.adobe.com/people/JimHess> in Photoshop Lightroom - View the full discussion<https://forums.adobe.com/message/7454915#7454915>

  • When I create a New Folder (on the desktop or in Finder), the system uses the Generic Document Icon instead of the Generic Folder Icon. How can I change this back?

    When I create a New Folder (on the desktop or in Finder), the system uses the Generic Document Icon instead of the Generic Folder Icon. How can I change this back?
    All of a sudden I noticed that most of the folders on my computer were no longer using the folder icon, but the generic document icon. I had to manually change back the icon being used by opening Get Info for each folder and copying and pasting the generic folder icon from some folders that remained unchanged. Now whenever I create a New Folder (right click -> "New Folder"), the icon that shows up is the generic document icon (white page with top right corner turned down). And I have to manually change it so it shows up as a folder in Finder or on my desktop. I don't know why or how this switch happened. All of the folders now on my computer look ok, but I need to change the default so when I create a New Folder it uses the correct icon.
    I have also Forced Relaunch of my Finder and rebooted the system. I downloaded Candybar but am not sure what will fix anything, so I haven't proceeded.
    Anyone know how I can do this? Thanks.

    Anyone?

  • I accidentally uploaded songs from cds to the wrong itunes library. i would like to move those songs to my regular itunes library that i use to purchase and download music, since my ipod cant sync to both libraries. how can i do this? please advise. thank

    i accidentally uploaded songs from cds to the wrong itunes library. i would like to move those songs to the regular itunes library that i use to purchase and download music, since my ipod cant sync to both libraries. how can i do this? please advise? thank you.

    See this older post from another forum member Zevoneer covering the different methods and software available to assist you with the task of copying content from your iPod back to your PC and into iTunes.
    https://discussions.apple.com/thread/2452022?start=0&tstart=0
    B-rock

  • My Ipad mini does not see my printer. my wife's ipad2 does. We both use IOS8 and upgraded at the same time. How can I remedy this?

    My Ipad mini does not see my printer. my wife's ipad2 does. We both use IOS8 and upgraded at the same time. How can I remedy this?

    OK great info!
    I found 2 possible ethernet to USB adapters:
    By "Plugable":  USB 2.0 to ethernet LAN wired network adapter - seems this will work, but I'll contact Plugable.
    2. Apple USB Ethernet Adapter
    Easily connect your MacBook Air computer to an Ethernet network with the Apple USB Ethernet Adapter. Small and light, it connects to the USB 2.0 port of your MacBook Air and provides an RJ-45 connector that supports 10/100BASE-T performance.  BUT NOT SURE IF THIS WILL WORK ON ANYTHING BUT a MacBook Air…
    One person commented: 
    This little gem used to be the device of choice for adding a second Ethernet interface to a Mac Mini Server and I'd been using one that way for about a year. After doing a software update to 10.6.6 it stopped working. Forewarned is forearmed – it appears that Apple is finally enforcing the MacBook Air system requirement.
    Thanks for any additional comments.
    Best regards,
    Steve Schulte
    Sunday 6 January 2013

  • I've reinstalled my MacBook Pro (OSX Lion) using a different apple ID, and now I can't install any iLife apps. In the app store it comes up with "Accept" and then tells me It can't accept from my user ID. How can I fix this or get iLife back?

    Mostly explained in the title. My dad gave me his MacBook, and I went ahead and wiped all of his stuff by using the recovery partition to wipe/reinstall OSX Lion. In the setup I used a new apple ID and now I can't get iLife apps. I'm relatively new to how apple works its purchases, so I'm not sure what's up. Is it that my computer has a unique ID set to the first apple ID used on it, and if so, how can I get this reset to my ID? I'm planning to get an iPhone 5 soon so I'd like to be able to use photo stream with iPhoto and try out Guitar Band.
    Any help is much appreciated.
    -Tom
    PS: I couldn't find a correct catagory, so I hope this is close enough. If not please tell me where I should be posting this.

    Contact the App store for Apple ID help. Their support link is on the right of the App store window
    LN

  • I have iPhone 4s, and using latest iOS. When I try to open any link from Twitter or Facebook, it goes to open some wrong webpage. My iphone seems to be infected or suffering from some spyware or malware. How can I remove this wrong link opening

    I have iPhone 4s, and using latest iOS. When I try to open any link from Twitter or Facebook, it goes to open some wrong webpage. My iphone seems to be infected or suffering from some spyware or malware. How can I remove this wrong link opening ? Please help me to resolve...

    I think the McAfee suite will do the trick when I pay them a one-time fee of $69 or $179 for a year for unlimited support.
    Your call of course but IMO a waste of money. Please read this first:
    There are many forms of ‘Malware’ that can affect a computer system, of which ‘a virus’ is but one type, ‘trojans’ another. Using the strict definition of a computer virus, no viruses that can attack OS X have so far been detected 'in the wild', i.e. in anything other than laboratory conditions. The same is not true of other forms of malware, such as Trojans. Whilst it is a fairly safe bet that your Mac has NOT been infected by a virus, it may have another security-related problem, but more likely a technical problem unrelated to any malware threat.
    You may find this User Tip on Viruses, Trojan Detection and Removal, as well as general Internet Security and Privacy, useful:
    https://discussions.apple.com/docs/DOC-2435
    The User Tip (which you are welcome to print out and retain for future reference) seeks to offer guidance on the main security threats and how to avoid them.
    More useful information can also be found here:
    http://www.reedcorner.net/mmg/

  • I have sent a file to the trash bin. When I come to empty the trash bin everything goes out except this one particular file and I get a note saying the file is 'in use' but it is not. How can I delete this file from trash?

    I have a Macbook Pro with OS X Lion 10.7.2. I have sent a work file to the trash bin along with many other files. When I empty the trash this one particular file remains and I get a message that this file is still in use. I have tried returning the file to my documents, opening it, closing it and then sending it to trash and again I try to empty trash but the same message comes up - Q - How can I trash this file permanently?

    First just try logging out and back in.  Whatever is holding on to it may not be running after the logout thus freeing it so you can trash it after logging back in.
    You might also try Trash It!
    Lastly, look at the following for suggestions:
    The X Lab: Solving Trash Problems

Maybe you are looking for

  • HP laserjet 1606dn

    Our office has three of the hp laserjet 1606dn printers.  I took my laptop and plugged in a different 1606dn than what I normally use.  It won't print anything.  Doesn't recognize the printer.  Do I have to load each 1606dn in my laptop?

  • BW reporting from APO live cache

    It has been 4 years since I have worked on a BW/APO project.  Back then, I know that in APO you could backup live cache and then use the backup as the datasource for reporting in BW.  Is this still the same or can you go directly against live cache n

  • Timemachine for backing up external harddisk

    i have 2 hardisks on 1tb each where i store all my files. i use 1 and then back up the other. is it possible to use timemachine for this? the thing is if i change something on several files and want to back up again, i have to copy all my files all o

  • MacBook Pro not charging and says replace battery? or is this a different issue?

    Ive been reading different responses and im not sure if this is a problem with my actual battery or if theres something else wrong and i need to reset my system somehow? i have a 2010 macbook pro- snow leopard... and here is the battery info from my

  • "Error - 2002 Damaged public movie atom" bla, bla, bla"

    Hi, I hope that there's someone out there that could help me with this issue that I have with iTunes. When I try to add the taggs of each of my movies in my library, such as name, genre and poster, my iTunes 9 out of 10 times crashes. But that is not