Do wildcards have to be within bounds?

Is it intended that the compiler accepts the following type declaration?
class Wrapped<T extends Comparable> { ... }
Wrapped<? super Number> wrapper3;  // <<<Number is not Comparable, and for this reason no supertype of Number is Comparable. Consequently the set of types denoted by Wrapped<? super Number> is empty. Why does the compiler allow nonsensical type declarations?
The specification does not say anything about the lower bound of a wildcard, but I had expected that of course the lower bound of a wildcard is checked against the upper bound of the type parameter the wildcard stands for. No? Wrong idea?

We've flipflopped on this issue a couple of times. At first we though we should check the bounds, but that isn't right, because then you can't write (ignoring the fact that Comparable is generic)
Wrapped<? extends Number>
This is perfectly harmless, and denotes a nontrivial and useful type. So we dropped the checking altogether. That is too relaxed, as you can see. Our current plan, due to Christian Plesner Hansen is:
given this declaration "class C<T extends X>",
* C<Y> is legal if Y <: X (the current rule)
* C<? extends Y> is legal if Y is castable to X
* C<? super Y> is legal unless Y cannot possibly be a subtype of X
The prototype compiler doesn't currently have this rule nor "castable" implemented, nor are they specified in the jsr14 spec that I distributed. I'm working on this now, based on very nice code supplied by Christian, but I'm afraid I may not have it in the prototype until October.

Similar Messages

  • Possible to have if statement within filters code?

    Hi
    I have some filters set up, and have assigned some global vars to them, which I then use in my Filters code to display the filters:
    myText:Filters [globals.data.glow1, globals.data.stroke1, globals.data.shad1]
    Works perfectly.
    Now I want to assign a global var to each global filter var to determine if it should be shown or not.  So...
    globals.data.glow1On = true;
    globals.data.stroke1On = true;
    globals.data.shadOn = true;
    ... and then somehow incorporate these new vars into an if conditional to determine if the filter global vars get included in the myText:Filters code.
    However, I cannot seem to code the if conditional into the myText:Filters code correctly.
    I even tried seperating it out like so:
    if (globals.data.glow1On = true) {myText:Filters [globals.data.glow1];
    if (globals.data.stroke1On = true) {myText:Filters [globals.data.stroke1];
    if (globals.data.shad1On = true) {myText:Filters [globals.data.shad1];
    But Flash only makes the last filter true (kinda makes sense to me now why).
    Is there a way to do it without having to make an if conditional with 7 permutations?
    Cheers
    Shaun

A: Possible to have if statement within filters code?

You are not coding the conditional properly.  "=" is for assignment, "==" is for comparing equality.
if (globals.data.glow1On == true) {myText:Filters [globals.data.glow1];
if (globals.data.stroke1On == true) {myText:Filters [globals.data.stroke1];
if (globals.data.shad1On == true) {myText:Filters [globals.data.shad1];
Also, a conditional evaluates whether or not something is true, so for Boolean values you do not need to explicitly compare them...
if (globals.data.glow1On) {myText:Filters [globals.data.glow1];
if (globals.data.stroke1On) {myText:Filters [globals.data.stroke1];
if (globals.data.shad1On) {myText:Filters [globals.data.shad1];
Lastly, for what I see that you showed, the conditionals are all missing their closing brackets, and while you can use them, the brackets are not needed for single command conditionals...
if (globals.data.glow1On){ myText:Filters [globals.data.glow1]; }
if (globals.data.stroke1On){ myText:Filters [globals.data.stroke1]; }
if (globals.data.shad1On){ myText:Filters [globals.data.shad1]; }
OR
if (globals.data.glow1On) myText:Filters [globals.data.glow1];
if (globals.data.stroke1On) myText:Filters [globals.data.stroke1];
if (globals.data.shad1On) myText:Filters [globals.data.shad1];

You are not coding the conditional properly.  "=" is for assignment, "==" is for comparing equality.
if (globals.data.glow1On == true) {myText:Filters [globals.data.glow1];
if (globals.data.stroke1On == true) {myText:Filters [globals.data.stroke1];
if (globals.data.shad1On == true) {myText:Filters [globals.data.shad1];
Also, a conditional evaluates whether or not something is true, so for Boolean values you do not need to explicitly compare them...
if (globals.data.glow1On) {myText:Filters [globals.data.glow1];
if (globals.data.stroke1On) {myText:Filters [globals.data.stroke1];
if (globals.data.shad1On) {myText:Filters [globals.data.shad1];
Lastly, for what I see that you showed, the conditionals are all missing their closing brackets, and while you can use them, the brackets are not needed for single command conditionals...
if (globals.data.glow1On){ myText:Filters [globals.data.glow1]; }
if (globals.data.stroke1On){ myText:Filters [globals.data.stroke1]; }
if (globals.data.shad1On){ myText:Filters [globals.data.shad1]; }
OR
if (globals.data.glow1On) myText:Filters [globals.data.glow1];
if (globals.data.stroke1On) myText:Filters [globals.data.stroke1];
if (globals.data.shad1On) myText:Filters [globals.data.shad1];

  • I have Microsoft Office within my user name, but it is not available for the other 2 users. What do I need to do to allow them access?

    I have Microsoft Office within my user name, but it is not available for the other 2 users.  What do I need to do to allow them access to the software?

    http://answers.microsoft.com/en-us/mac/forum/macoffice2011-macstart/how-do-i-ena ble-office-for-all-users-on-one-mac/38bd94cc-d26c-41c9-8471-ee87d63ebfc9?msgId=0 fbd6314-a12a-4fed-85f9-d939208095ff

  • Is it possible to have a selectManyListBox within ui:repeat ?

    Can I have a selectManyListBox within a <ui:repeat> or that is completely wrong ? I can displayed the values properly , however I cant retrieve the selected items in my list.
    An error is displayed "myform:j_idt117:0:j_idt119:0:_t121: Validation Error: Value is not valid"
    <ui:repeat value="#{row}" var="t" >
    <h:selectManyListbox value="#{myBean.selectedItems}">
    <f:selectItem itemValue="#{t.attributeName[1]}"
    itemLabel="#{t.attributeName[1]}" />
    <f:selectItem itemValue="#{t.attributeName[2]}"
    itemLabel="#{t.attributeName[2]}" />
    </h:selectManyListbox>
    </ui:repeat>

    You can try using SSRS cascading parameter.
    http://technet.microsoft.com/en-us/library/aa337498(v=sql.105).aspx
    http://markvsql.com/2013/08/ssrs-cascading-multi-value-parameters/
    Regards, RSingh

  • I have set hyperlinks within my ibook author document, they work perfectly until i export and view on the ipad, when only one or none work, (hyperlinks to website not working at all) what am i doing wrong?

    I have set hyperlinks within my ibook author document, they work perfectly until i export and view on the ipad, when only one or none work, (hyperlinks to website not working at all) what am i doing wrong?

    An external hyperlink should handoff to Safari and leave iBooks.
    If that's not happening, perhaps there is something misconfigured on your iPad? Have you manually confirmed those links work in Safari on your iPad?

  • Where have podcasts gone within music on an ipad in ios 7

    Have downloaded ios7 and have noticed that within music podcasts have disappeared. Used to be under the more tab which is not there any more.

    I know during iOS6 podcasts moved to a separate (free) app.

  • Lightroom does not automatically find images that have been moved within same parent folder/drive

    Lightroom does not automatically find images that have been moved within same parent folder/drive...I moved my catalog and photos to shared drive so that all users can access and when I moved photos within parent folder lightroom did not automatically adjust like in video I watched.  I had to manually locate.  Is there a fix for this?

    Lightroom does not automatically find images that have been moved within same parent folder/drive...I moved my catalog and photos to shared drive so that all users can access and when I moved photos within parent folder lightroom did not automatically adjust like in video I watched.  I had to manually locate.  Is there a fix for this?
    I haven't watched that video, but if you move photos in your operating system ... Lightroom does NOT automatically find these photos. Finding photos that have been moved is NOT a feature of Lightroom. So, there is no fix for this.
    You would have to tell Lightroom where the photos are now located, as explained in the link from 99jon
    If you must move photos, move them inside of Lightroom, not in your operating system, or better yet — don't move them, and use Lightroom tools such as keywords and other metadata to achieve organization.

  • HT201250 How do I restore photos from Time Machine?  All of my photos have been imported within iPhoto and therefore are exported to Time Machine via an iPhoto file.  I can't figure out how to break individual photo files out of the iPhoto file.  Any idea

    How do I restore photos from Time Machine?  All of my photos have been imported within iPhoto and therefore are exported to Time Machine via an iPhoto file.  I can't figure out how to break individual photo files out of the iPhoto file.  Any ideas?

    You might post this query on the iPhoto forum and perhaps someone there can provide an answer.
    I tried this on my MBP and it seems that you have to restore the entire iPhoto Library.  What I did was put the current library in a separate folder on the desktop and then I restored the library from a prior date.  If you were to do that, you then could extract the desired photos and then delete the restored library.  Then place the current library back to the original location and import the desired photos.
    Not tidy but it seems it will work.
    Ciao.

  • Can/will my Apple Watch talk with my Macbook Pro?  Do I always have to be within distance of iPhone?

    Can/will my Apple Watch talk with my Macbook Pro? 
    Do I always have to be within distance of iPhone?

    No, the watch can only link to an iPhone. However, it can do several things even when out of range of the iPhone — http://help.apple.com/watch/#/apd0443fb403

  • I have a virus within my email how do I fix it

    I have a virus within my email on my iPad how can I fix this.

    There is no anti-virus for the iPad because, as of now, there is no known virus. It's not the machine itself that's infected but, in this case, the webmail/mailbox that's infected. Very possibly the mail server the ISP uses.
    iOS is its own separate operating system. Stuff that runs on PC's won't run on Macs and won't run on OS....in fact none of them will run on each other. You can't put a mac program on a PC and you can't run an App on a Mac.
    However, while they can't get viruses, malware and browser hijacks do seem to happen. get a cookie from a 'naughty' place on your device and you'll be served ads that come from that 'naughty' place. they are also just as vulnerable to sites being hacked as any browser (such as a recent example of people that'd use google but instead of getting results for....Gardening for example, all the results would be directed towards virus and malware sites. It's not the iPad that was hacked, it's the google page.)
    In the case cited above there is likely nothing wrong in the iPad itself, but a mail sitting on a mail server was able to make things happen.
    Likely as more and more users catch onto popular virus techniques (like that pesky e-mail lotto promising me millions or that poor Nigerian Prince that's STILL trying to give me his money), the miscreants keep coming up with other ways to spread their junk.  And that other way very well could be unopened mail or unopened attachments maliciously 'zombieing' a mailbox.
    For the OP, delete the mail from your device, choose to delete it from the server (depends on if you have your mail set up to delete from server when deleted from device or if it just sits out there until you delete it with your computer) and you should be okay.
    This is kinda of when using pure webmail can be a good thing. For example I use Yahoo. I dont' pay for the pop 3 version so I dont' download anything. My mail stays out on yahoo's servers and there's nothing on my computer. I do, apparently, download it onto the iPad, but most of the bad things stay in my spam folder that don't download. My PC is a bit safer because those attachments are never downloaded. If I wanted to do the same with my iPad, then I'd not use the mail app, I'd only access Yahoo via the web and I'd never download anything.
    So, you really can't (as of now and as of anyone knowing) get a virus ON your iPad. But things accessed by it are just as vulnerable as anything else.

  • Database Cloud doesn't have BI publisher within it

    Hi all,
    we have developed an application with apex and deployed it on apex.oracle.com ,
    we had some reports developped by bi publisher and was working fine on apex.oracle.com,but after we moved to oracle cloud database service these reports a aren't working as
    Database Cloud doesn't have BI publisher within it Is there any workaround for this issue ???

    Hi Brian,
    I used the bi publisher to created rtf report layouts & upload it with report queries to create some customer reports
    that can be exported to pdf,html,excel,....
    It was working fine on apex.oracle.com & on-premise but on cloud No
    i don't know about ORDS yet but from your words i think it is for pdf only ??

  • Using wildcard in return activity in bounded taskflow

    This is my situation:
    I have a page to which the user may only navigate through a router activity, and I want the user to be authenticated too. So I thought I'd set the router activity (and a filter) and the page inside a bounded taskflow.
    But now I have a problem exiting the bounded taskflow. I don't want to specify all the possible outcomes and create different return activities. I have tabs on each page and I want the user to be able to click a tab and go to that page. But when I set a wildcard the navigation doesn't work.
    What does work is this:
        <control-flow-rule id="__22">
          <from-activity-id id="__23">rr_start</from-activity-id>
          <control-flow-case id="__25">
            <from-outcome id="__28">toAvIndex</from-outcome>
            <to-activity-id id="__24">returnFromStartFlow</to-activity-id>
          </control-flow-case>
        </control-flow-rule>
        <task-flow-return id="returnFromStartFlow">
          <outcome id="__21">
            <name>toAvIndex</name>
          </outcome>
        </task-flow-return>But this allows me only to navigate to AvIndex and I have 4 more pages I want to navigate to.
    What I would like to have is this:
        <control-flow-rule id="__22">
          <from-activity-id id="__23">rr_start</from-activity-id>
          <control-flow-case id="__25">
            <from-outcome id="__28">*</from-outcome>
            <to-activity-id id="__24">returnFromStartFlow</to-activity-id>
          </control-flow-case>
        </control-flow-rule>
        <task-flow-return id="returnFromStartFlow">
          <outcome id="__21">
            <name>*</name>
          </outcome>
        </task-flow-return>and let the unbounded taskflow check the outcome and do the navigation. Could this be possible?

    Wendy,
    have you considered to use a taskflow template for the navigation and use this template for your taskflows?
    Only other thing which come to mind is to set a parameter from inside your flow and check this parameter in a method in the parent flow to decide where to go.
    Timo

  • If I have a folder within a folder how can I keep both open at the same time?

    I now have IOS 10.10.1 on my iMac and can no longer open a file within a file and have the main file remain open along with the inner file. I used to be able to do this in Lion.

    Darpa,
    I don't know if this is what your looking for but here you go.
    To make it so that when you double click a folder it opens in a new window you have to turn off or hide the toolbar. To do so:
    Open a Finder window > Select "View" from the menubar > select "Hide Toolbar"
    Keyboard shortcut to do the same as above is ( Command ) (  Option ) ( T )
    Now every folder you double click on will open in a new window.
    It should remember that you elected to not have the Toolbar show and every time you open a new window it will be the same.
    To change back Do the same except instead of "Hide Toolbar" it will say "Show Toolbar"
    Hope that helps,
    Weston

  • I have hyperlinked contents within my documents (not to any external source). I am not able to open the hyperlinks on my ipad. what do I do?

    Helloooo...
    So I've typed out a document using Microsoft Word (on my laptop- office 2007) and have hyperlinked the contents to different sections within the laptop.
    I sent it to myself and downloaded it onto my dropbox on the ipad.
    The hyperlink doesn't open though. I have downloaded word compatible/ editing softwares on my ipad, but the hyperlinks still don't open.
    How does this work? Hyperlinks don't work at all on the ipad?

    have hyperlinked the contents to different sections within the laptop.
    If you created a link directed to a file path on your laptop, and subsequently tried to follow the link on your iPad, this wouldn't open since the file doesn't exist on your iPad at the specified path. If the link was to a stable URL, the hyperlink should open.

  • "You already have wiring installed within your hom...

    Hi. My installation date is in 3 days but I received an SMS from BT today, saying I already have wiring installed and that they will not come but they will activate my phone line via order a code that starts with VOL... After carefully looking around the house I found two sockets, one says BT and has a splitter attached to it, other says NTL, with a closed one next to i (also says NTL) which is connected to the old tenants Virgin broadband router with a white cable with round end - she cancelled her contract but left the device here. I'm horrible with these stuff, I have couple of questions:
    1-I guess I should use the BT socket but what should I do with NTL one and the white cable with round end? Is it safe to pull the cable and put away the Virgin router? It looks like this: http://i.ebayimg.com/00/s/MTYwMFgxNjAw/$T2eC16ZHJF​8E9nnC8GrUBQsrNLi6G!~~60_35.JPG
    2-How do I connect my new BT device to the socket? Is there a cable in the package I will receive?
    3- Do I have to do something with the number starting with VOL or is it something BT does for me?
    Thank you.

    Hi sollinatri,
    Thanks for posting. You'll receive all the cables and connections you require to get started. Just keep note of the VOL reference in case of any problems. You might want to contact NTL if you're removing their equipment ust to be on the safe side.
    Cheers
    David
    BTCare Community Mod
    If we have asked you to email us with your details, please make sure you are logged in to the forum, otherwise you will not be able to see our ‘Contact Us’ link within our profiles.
    We are sorry but we are unable to deal with service/account queries via the private message(PM) function so please don't PM your account info, we need to deal with this via our email account :-)

  • Maybe you are looking for

    • Issue with Sales office values in BI

      Hi Team,      We have a issue with the sales office values in a BI report. The report displays 7 sales office values for the division 01. Where as in ECC, we have only 6 sales office values exists for the same division 01. These sales office 7 has be

    • Problem printing the JTable

      Hi all, I have a problem with printing JTable. My application has a submit button,JTable and Print Button. As I click on the Submit button, the data is retrieved from the Database(MS Access) and displayed on the JTable. Now when I click on the Print

    • Error is coming while activating the z table

      Hello , I have created a z table . When i activate this table , i get the following error . Das Aktivieren von Dictionaryobjekten während des Einspielens neuer Software ist gesperrt (ITSU01,21.08.2014, 17:16:26). Google translation of above error is

    • ITunes 10.6.3 and iPhone 5.1 - firmware file???

      I am trying to find my "Personal Hot Spot" on my iPhone 4 so that I can use my new iPad through my personal hot spot.  First of all my iPhone is still on version 4 so I was told to update to version 5.1.  I was also told to update my iTunes to versio

    • Usage "FREE" in Free Goods Configuration

      Hi, Please give me the name of the Program or Function Module where the Hard Code is being used for detering the itemcategory of Free goods as "FREE". We want to copy this "FREE" and use it but it is not working as it is hard coded. I know the Usage