Feedback needed on suggestion for enhancing Collections.unmodifiableList()

What is the difference the following two method signatures?
public static <T> List<T> unmodifiableList ( List<? extends T> list )
public static <T, S extends T> List<T> unmodifiableList(final List<S> source)Isn't the latter a superset of the former? That is, it allows you to do the following:
List<Animal> animals = Collections.unmodifiableList(dogs);If the signature of Collections.unmodifiableList() were modified to this signature would it be backwards compatible?
Thanks,
Gili

Here is my test program:
import java.util.*;
public class TestSignature
  public class A {  }
  public class B extends A { }
  public static <T> List<T> unmodifiableList ( List<? extends T> list )
  {  return null;  }
  public static <T, S extends T> List<T> unmodifiableList2(List<S> source)
  {  return null;  }
  public static void main(String[] argv)
    List<? extends A> dogs = null;
    List<A> animals = unmodifiableList(dogs);
    List<A> animals2 = unmodifiableList2(dogs);
    List<B> cats = null;
    List<A> animals3 = unmodifiableList(cats);
    List<A> animals4 = unmodifiableList2(cats);
}Errors:
TestSignature.java:19: incompatible types
found   : java.util.List<capture#159 of ? extends TestSignature.A>
required: java.util.List<TestSignature.A>
    List<A> animals2 = unmodifiableList2(dogs);
                                        ^
TestSignature.java:22: incompatible types
found   : java.util.List<TestSignature.B>
required: java.util.List<TestSignature.A>
    List<A> animals3 = unmodifiableList(cats);
                                       ^
TestSignature.java:23: incompatible types
found   : java.util.List<TestSignature.B>
required: java.util.List<TestSignature.A>
    List<A> animals4 = unmodifiableList2(cats);
                                        ^
3 errors

Similar Messages

  • Hi need good suggestion for future

    hi experts,
    i need good suggestion for my future _
    i have 3 + exp as a ABAP consultant,
    i am looking for a change, i wish to add some thing to ABAP? but, i couldn't understand what to do? pls help me in this regard..
    my skills are : very good in ABAP
    vey weak in OOPS.
    waiting for good advice
    thanks in advance

    the future will depends on the OOPS only . for all the companies started working on OOPS only they are upgrading to the oops from the general abap...be aware of that ..
    it is better to learn XI or HRABAP  it is good for you i think.

  • Need a Suggestion For implementing the Digital Signature For the Documents

    Hi,
    Currently I am working in a Document Management System. I need a Good Suggestion for how to implement a Digital Signature For the Documents.
    Thanks in Advance
    Sabarish V

    Hmm, if you are not using Oracle Payroll, what are you using for payroll? I am wondering why you could not use your payroll system, whatever it is, to handle this reimbursement program.
    Well, you may want to talk to Oracle support about how to handle this in Oracle iExpense. You can certainly handle advances for Expense Reports. You would then apply the advance to the expense report items. The catch is I don't think you can stop expense item entry after the adavance is satisfied. You would have to set up a work flow process of some kind to have the expense reports reviewed and only approve expenses that are applied to the advance, is what I am thinking. Not your ideal solution, but something to think about. It could be the Oracle folks might know of a sneaky way to handle this. What you are trying to do is unusual. Employee advances are common, but the idea of not being able to exceed the advance amount is what unusual about this. Normally you will accept any expenses over the advance amount and reimburse the employee for those extra amounts not advanced.
    Good luck.
    John Dickey

  • Need Mic suggestions for solo guitar video...

    I have a Sony TRV-38 mini DV and need suggestions for an external mic. I want to video a solo guitar player sitting in a chair. Would I need to mic the guitar from a mic stand in front of him or would some sort of shotgun mic do the trick? Would buying a Beachtek unit be the best way to go, or is there a simpler/cheaper mic alternative that gives very good results. This is primarily just for good sounding archival footage.
    Thanks for any help.
      Mac OS X (10.4.3)  

    there are a couple of approaches... you can close mic, but if you are experimenting with your equipment and techniques, it is quite possible that you could get a very colored tone and not accurately depict the performace from a sonic standpoint.
    something that is quick, easy, and relatively high performance at a budget is to use an M-S stereo shotgun mic. the left channel will be mono hypercardoid aimed right at the performer... with the mic mid range, not close mic'd. the right channel will be the "-S" component of the stereo signal, which is optional and can be decoded with an M-S stereo process in the edit process, or if for example, there was too much ambient noise, simply discard the track and just use the left / mono signal. (personally, i would probably just mount my audio technica M-S stereo mic on my rycote hotshoe adapter, and mic camera mounted... no stands or cables to deal with)
    yes, the beachtek or similiar direct interface is the way to go, bypassing the Sony's poor gain stages (disable auto gain control, if possible).
    IF sound quality is of the utmost importance, then the real correct way to do this would be to record with 2 mics in an X-Y stero mid field setup. expense, complexity, and possibility of getting something wrong are probably too high to do for something as critical as a 1 take live event if you don't have experience under your belt.

  • Need a suggestion for  change in cv02n tcode

    Hi all,
    Need a suggestion to update the additional tab / classification in cv02n transaction.
    I want to update the charecterstics(custom) in the additional tab(and also in classification tab).
    Thanks & regards
    Pavan

    Hi all,
    Found solution

  • Need concrete sample for enhancements in ECC 6.0

    hi,
    I am not able to clearly understand this enhancement technique. For e.g. I go to ME21N and click on menu System--> status, click on the program name " SAPLMEGUI ". I see some enhancement points/spots.
    ENHANCEMENT-POINT SAPLMEGUI_01 SPOTS ES_SAPLMEGUI STATIC.
    $$-Start: SAPLMEGUI_01----
    $$
    ENHANCEMENT 42  OI0_COMMON_SAPLMEGUI.    "active version
    IS-OIL Class implementations
      INCLUDE oi_lmeguicioi.
    ENDENHANCEMENT.
    So how do I proceed further in order to enhance the code ? A clear explanation with any other example will
    also do. Step by step explanation is highly appreciated.
    what does that 42 mean there ? Also i saw somewhere the statement enhancement-secion , what does it mean ?
    thanks

    Hi,
    Check the links below for Enhancement framework documents.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/94/9cdc40132a8531e10000000a1550b0/frameset.htm
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/9cd334f3-0a01-0010-d884-f56120039915
    https://www.sdn.sap.com/irj/sdn/developerareas/abap?rid=/webcontent/uuid/2342e1f3-0b01-0010-a186-fdd404884050 [original link is broken]
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/bb54c452-0801-0010-0e84-a653307fc6fc
    best point to start are the WebLogs of our product manger Thomas Weiss:
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/the%2bnew%2benhancement%2bframework%2band%2bthe%2bnew%2bkernel-based%2bbadi
    Regards
    Kiran Sure

  • Need hardware suggestions for midi and audio

    hi everyone,
    im thinking of getting a new imac and setting up a little recording studio in my room. nothing fancy, just for my own enjoyment.
    i've been looking for the best way to plug in my midi keyboard, and microphone/instruments. is a breakout box the best way to go? i won't need to record more than one instrument at a time. is there a box that has one midi input, one instrument input, and maybe an xlr input that will work with imac/garageband? will i need a preamp for this, or will it boost the signal as well?
    any recommendations on models are greatly appreciated.

    i use the Edirol Audio Capture midi device. it has midi in out ports, audio L(mono) and R in ports, and an audio out port. I use it mainly to play guitar and record it into garage band, but my brother uses a keyboard attatched to it through the midi port and that works fine too. I definetly reccomend it.
    link: http://www.roland.com/products/en/UA-20/index.html

  • X1 Suggestion for enhancement of System

    HI all,Have had X1 for 1 week and wanted to make the following enhancement suggestions. 1) For DVR recordings change save system to allow for creation of folders for recording to be filed into  so recording are not in one big list all comingled and hard to get through.  Putting them in folders setup by enduser is a feature Dish and others have seems like a simple function to add for Comcast. 2) Develop a remote with a 30 sec forward skip button 3) 2 Key remote functions missing in todays day and age:  Button to change TV line input choice, Lighted remote buttons. 4) X1 remote badly needs a AUX button....the "All On" function works for the TV but does not allow for control to turn on our home theater receiver so the cutting edge tech now has us using 2 remotes when the old tech we used the one Comcast remote to control everything. Thanks!

    It should be noted the Harmony 900 is discontinued and new units are expensive and getting very rare. I have a Harmony One and yesterday I ordered a refurbished 900. The new Harmony remotes are equally capable. In fact they offer smartphone and tablet control. However the new Harmony remotes are not designed as well as the 900. Having the 0-9 channel buttons on a touchscreen is a really bad idea. Personally I think the Harmony One and Harmony 900 have the best button layout and design of ANY universal remote. When Comcast was designing X1, one of their biggest motivations was removing buttons from the remote. I was told the TV input button on the silver remote was the one of the biggest sources of service calls. flguy2 is right. The only way to accomplish what you want is to get a good universal remote. However the old silver/Moto remote runs my Arris made X1 DVR just fine... flguy2 wrote:
    Hi.  I have also had the X1 for about a week now.  Here are some additional comments regarding your ideas, plus a solution to your 30 skip ahead. 1) The folder idea is interesting, but I notice the X1 already "groups" saved shows.  So for example, all my American Idol recordings are rolled up into one and I just have to click it to expand.  Have you noticed this?  Maybe you are referring to folders as generic names you can make up, such as "Space" or "Documentaries" and manually move your shows in there?  Also, at the very top you can sort by date or A-Z.  The old Scientific Atlanta I had use to allow a third sort by channel, so that is the only thing missing in my opinion.  Also, you can search for content and it will pull up your saved recordings.  If you have the X1 remote control/voice app for your iPhone or tablet, you can just speak what you want and it will show up.  Very handy. 2) You can implement a 30 sec skip button using the instructions from this page: http://howto.cnet.com/8301-11310_39-57606944-285/how-to-program-a-30-second-skip-button-for-xfinity-x1/  It worked flawlessly for me.  And by the way, this trick programs the skip-ahead inside the BOX not the remote.  I actually use a Harmony 900 for everything and once I implemented the skip ahead using the Xfinity remote, I didn't have to change anything on my Harmony, it just worked. 3) Buy a universal remote like the Harmony 900 for this.  The latest Harmonys use RF just like the Xfinity remote.  So for example, on my Harmony 900 there is an LCD screen at the top where I can program various functions for any one of my media devices (speakers, TV, etc).  The Harmony remote also has backlit keys, which light up when you move the remote around. 4) See #3.  The programmable universal remotes are great because there is SO much customization you can do.  The Harmony brand by Logitech comes with a USB and you program it via their web site or separately downloaded software.  If this sounds too complicated than you may not like it, but it will ultimately give you exactly what you want.  You can even control fans and lights with it, pretty much anything that has an IR or RF receiver built into it. Additional idea/improvement:  I miss the ability to skip ahead by DAY in the channel guide.  For example, if I am the Discovery Channel, I would like to see what is on at 8pm the following 4 nights.  There is no easy way to do this.  With the old non-X1 guide you could select your channel then the whole guide would become a vertical listing of the shows on that channel for upcoming times and you could page up/down by day.  I don't see a way to do that with the X1. 

  • Need a suggestion for setting up a reimbursement program with an annual cap

    Can anyone recommend or have an idea on the best way to handle an employee program which provides for $250 in reimbursements for eligible expenses under the program? A few facts about the program:
    1- There is an annual $250 cap per employee
    2- The $250 does not need to be used all at once
    3- Employee's pay for services themselves first and then submit receipts to HR on a quarterly basis for reimbursement
    3- Because expenses do not need to be used all at once, the set up must be able to track expenses for the entire year through a cumulative balance
    4- The $250 is subject to payroll taxes (though we are not using Oracle Payroll)
    Currently, the entire program is being managed via an excel spreadsheet but we would like to automate the program in Oracle. Ideally, we would like for employees to enter their expenses via Oracle iExpense. However, the system would need to be be able to recognize when an employee is over the annual limit, throw a message to the employee letting them know they are over the annual cap, and only allow the remaining balance to be processed in the expense report.
    Any suggestions would be greatly appreciated.
    Thank you.
    Barbara

    Hmm, if you are not using Oracle Payroll, what are you using for payroll? I am wondering why you could not use your payroll system, whatever it is, to handle this reimbursement program.
    Well, you may want to talk to Oracle support about how to handle this in Oracle iExpense. You can certainly handle advances for Expense Reports. You would then apply the advance to the expense report items. The catch is I don't think you can stop expense item entry after the adavance is satisfied. You would have to set up a work flow process of some kind to have the expense reports reviewed and only approve expenses that are applied to the advance, is what I am thinking. Not your ideal solution, but something to think about. It could be the Oracle folks might know of a sneaky way to handle this. What you are trying to do is unusual. Employee advances are common, but the idea of not being able to exceed the advance amount is what unusual about this. Normally you will accept any expenses over the advance amount and reimburse the employee for those extra amounts not advanced.
    Good luck.
    John Dickey

  • Need help/suggestions for an older Macbook a1342 display

    I dropped my A1342 and the display went dead... I could still get video to an external monitor from the side port but the lcd was completely out. It also had a small crack on the top corner so I just assumed that the LCD was shot, but I just replaced it with a new one and the display is still dead. What else could I be missing or should I try?

    These are the directions of OS 10.7. Some of the details are different on other OS.
    1. On your husband's computer, go to System Preferences / Users & Groups and click the padlock to unlock.
    (U & G was called Accounts in older OS - not sure what you have on that older Macbook.)
    2. Click the + sign. That will give you a new pane.
    3. In New Account, select Administrator ( the default is "Standard").
    4. Complete all the other fields.
    After this is done, close that pane. Now back in U & G, select Login Options.
    Set Automatic login to your husband's name.
    Restart the computer, and select your husband's name. Check that all is well.
    You can now, if you wish, go back to U & G, unlock and select your own name and click the - sign. That will remove your name from the computer.
    You will also need to configure Mail for your husband's email with his password. When he first clicks on Mail he will be guided through the setup steps.

  • Need router suggestions for G4 MDD

    Wi-Fi availability is very sparse in my neighborhood, so using an iPhone at home can be challenging.  I thought that by purchasing a router I could improve my situation.  I would also like to control my iTunes library on the G4 through my iPhone.
    The G4 is running 10.4.11 and connects to the Internet via cable modem. The G4 doesn't have an Airport card.
    I would very much appreciate any router suggestions or other pertinent advice.
    Thank you.

    I've installed a number of routers on Mac system and they don;t have to be "Mac-compatible." I set up a network for my daughter with teh cheapest wireless "n" wireless router I could find at Fry's electronics, a TrendNet I think--about US$35 on sale. Her computer is a Mac Mini running 10.5.8 but mu old PowerBook running 10.4 connects without issue.
    The easiest thing may be to ask your ISP if they have a wireless router/modem combo unit. That's what our ISP gave us. Might be a monthly upcharge if you are renting the modem but it's likely not much. Ours has wired ports as well
    If you go for a separate wireless router:  Typically a wireless router will also have regular wired ports. Connect the new router between the modem and the computer with Ethernet cable. The router's instruction will have a set-up section. There they will give you an IP address for your router. Type that address into any browser and you can set the options: power level; channel on some models; set a name for the Routers, and set a password (you want to protect your network with a password so people don't snipe your service or snoop).
    Once so set, you can see the wireless network you've created from your phone or computer if the computer has a wireless card. If it doesn't have a card simply leave the Ethernet wired connection from the router to the computer--it will nicely co-exist with the phone.
    We have three Macs and two network printers wired to our network, plus two Mac Notebooks connecting via wireless. I still have a spare wired port or two left over for when I'm servicing someone else's computer lacking a wireless card.
    It probably took longer for me to type this that is would to set up a router.

  • Need laser suggestions for my Mac

    I'm looking for suggestions on network laser printers (preferably color) for our Macs. I mange a network with mostly PCs and some Macs. We have a number of Lexmark and HP printers on the network. The HP printers tend to be fussy with our Mac users, while the Lexmarks have been pretty bullet proof.
    As a result, I recently added a color Lexmark C530n to the network primarily for the Mac users (see my earlier post), but am having troubles with it. Lexmark has not responded to my requests for help and there have been no replies in this forum. My guess is that the printer model may be too new to develop a broad user experience base.
    If I cannot get a resolution, I will likely return it. Soooo does anyone have a suggestions on a color laser network printer that works well with OSX?
    Thanks,
    Martin
    G4   Mac OS X (10.3.9)  

    We've had good luck with the Phaser 8500's they work with the PC's, and the Macs using systems OSX and 9.
    The previous network printers (we still have a few in use) were HP 4500's, they did fine.
    I have a HP Color Laser printer (2600) at home that is shared out and it seems to work well also.

  • Need some suggestion for Demantra Shape modeling

    Hi All
    Can any one sugesst me how to create a Demantra Shape modeling using 7.2 version. I am working on a POC which includes shape modeling.
    Thanks
    Ram

    Kim,
    Tttt yyyy pppp iii nnn gggg slowly.
    You described your situation quite clearly.
    As you probably know the digital inputs on the USB-6008/9 are software timed, so you have some uncertainty in the time of any sample.  Depending on your OS that uncertainty will typically be on the order of a few milliseconds but occasionally may be much longer.
    To count the pulses in software requires a combination of several things.
    1. You need to have a data acquisition method which is fast enough to capture each high and low state of the pulses produced by the pump.  For software timed Digital Input a good way to do this is to have an independent, parallel loop which reads the input line rapidly and passes the data or transitions to another loop via a queue.  This is known as the Producer loop in a Producer/Consumer architecture.  Examples come with labVIEW. A 10 ms Wait in the loop is probably appropriate.
    2. You need to convert the digital inputs (levels) into pulses or transitions to be counted.  Suppose you want to increase the count by one every time the logical level changes from False to True. To do this you need to know the previous level and the current level. A shift register is one of the best ways to do this in LV.  Add a shift register to the loop.  Initialize it to False. Connect the result of the Digital Read to the right terminal of the shift regsiter inside the loop.  When that Read is True and the previous value (obtained from the left terminal of the shift register) is False, increment the count value (which is also kept in a shift register) in the case structure.
    3. You did not indicate what you are doing with the counts or what the pulses represent.  Do you need to measure the frequency (or the period which is the reciprocal of the frequency)?  Do you need to accumulate the number of pulses? Over what time period?
    Lynn

  • Need Soundbooth CS5 for Master Collection CS5.5

    When I loaded the Master Collection CS5.5 suite Soundbooth was not present. Have a CS4 version with Web Premium CS4, but only reason I have that suite loaded is for the Soundbooth.

    I get the same error. Removed CS3, and used the CS3 clean script (which didn't find anything I hadn't removed). CS5 Premium installed fine. But when I run InDesign, I get the "Error 5" message. When I run Photoshop, it tells me I'm using a 30-day trial version; it prompts for a serial, but will not accept the serial number for the suite (it wants a Photoshop-specific serial, apparently). It tells me to uninstall and reinstall, but I've already done that now, and I still get the same result.

  • Need your suggestions for developing a Forum Site using Adobe Flex

    Hi ,
    I want to develop a small Forum Site where people can post questions and reply to questions .
    I want to develop the whole thing using Adobe Flex , Is there any plugin avialable for this .
    Means i mean to ask , if i go for normal J2EE there is a JForum avialable as far as i know .
    Please share your ideas .

    I meant "Don't use flex" unless you have some superb new design for a forum. I suspect that if you already had such a design, you wouldn't need to ask the question. Flex for Flex sake isn't good.
    There are already great html forum solutions out there.
    Basically, there's no point in duplicating in Flex what is already done in HTML, unless the Flex version offers a significant improvement to the user experience in some way.
    I am not aware of any Flex forum implementations and there is probably a good reason for that.
    Maybe someone else will know of one.

Maybe you are looking for

  • Approach to transport in BI 7.0

    Hi Guruz BI 7 being new, i am a bit worried about the approach to use for transportation. Can someone give some broad guidelines on the approach to take for tranport to QA, like how to group, and any particular things to be kept in mind? Also, we hav

  • 8100 turning on then off repeatedly

    I have a Blackberry Pearl 8100 that started turning off and on today and is not stopping.  When it turns on you see the hour glass for about 20 secs and then it turns off and starts again.  Everything was working fine earlier today and then suddenly

  • Unable to see text instead of account name in the hierarchy

    Dear all, I m new to SAP BI, I have a Fianancial Statement Item in which hierarchy and text is loaded. Now when the report is executed I want the to display the coresponding text, that is loaded with the  hierarchy, with the account name. How do i do

  • Size of private and usr folders

    In trying to optimize hard drive space, I was checking around my hardrive using the application Disk Inventory X, and was quite surprised to find out that under the invisible folders type, the size of my private folder was 2.11GB and size of the usr

  • Connecting ipod nano to pc causes restart

    I have a Dell 4300 running Windows XP - bought a nano and after figuring out that I needed to download itunes to be able to use it (doesn't tell you that) - I downloaded itunes from the apple site - when I ran install it told me I needed the XP Servi