Why does not Boolean implement Comparable? (at least in JDK 1.4)

OK, I have read JDK 1.5.0 Beta 2 docs and learned that now java.lang.Boolean implements Comparable<Boolean>.
But why it was not noticed until 1.5?
I can guess that Boolean is not as used as another wrapper classes, and implementing the Comparable interface was not heavily demanded (for instance, requiring a JSR or 500 votes in the Bug Database).
But even Google's Joshua Bloch could have noticed it before...

Additional info from the API v1.4.2:
public interface Comparable
It is strongly recommended (though not required) that natural orderings be consistent with
equals. This is so because sorted sets (and sorted maps) without explicit comparators
behave "strangely" when they are used with elements (or keys) whose natural ordering is
inconsistent with equals. In particular, such a sorted set (or sorted map) violates the gen-
eral contract for set (or map), which is defined in terms of the equals method.
For example, if one adds two keys a and b such that
(!a.equals((Object)b) && a.compareTo((Object)b) == 0)
to a sorted set that does not use an explicit comparator, the second add operation returns
false (and the size of the sorted set does not increase) because a and b are equivalent from
the sorted set's perspective.
Boolean equals
  public boolean equals(Object obj)
Returns true if and only if the argument is not null and is a Boolean object that represents
the same boolean value as this object.
Boolean hashCode
  public int hashCode()
Returns a hash code for this Boolean object.
Overrides: hashCode in class Object
Returns: the integer 1231 if this object represents true; returns the integer 1237 if this
object represents false.Unless I'm missunderstanding something ... If you were to have it implerment Comparable, you coud have two elements in a Set, one true and one false, with true always 1st and false always 2nd. No? If so, what's the point?
~Bill

Similar Messages

  • Why does not Apple allows iPhone to be sync by two different computers ?

    I have a pc at home and one in office. But I can only sync it with my home pc. Why does not apple allow iPhones to be sync by atleats two pcs as having different pc for work and home is very general.

    It is possible to sync from multiple libraries manually on other devices (iPads & iPods) so blanket statements that 'it's DRM' don't really make sense to me.
    If it is the only reason why can't non DRM'd content be copied?
    Manage content manually on your iPhone, iPad, and iPod - Apple Support
    See step 6, iPods & iPads have fewer restrictions compared to iPhones.
    Perhaps we would have a better idea if it wasn't all wrapped up in thousands of words spread between the multiple terms & conditions agreements.
    https://www.apple.com/legal/internet-services/itunes/
    https://www.apple.com/legal/internet-services/icloud/ww/
    You will need to read those terms & get legal help if you can't work it out titan_sifu, good luck.

  • Why does not Adobe flash player for iPad ,This is a very big problem

    Why does not Adobe flash player for iPad ,This is a very big problem ,I do not know why Apple is so Popular

    but Adobe is, in fact, continuing to update Flash for Android.
    Only essential bug and security fixes. No new feature updates have been released for 2 years.
    Of course we have those who wish fervently that the lack of Flash supprt will damage Apple severely and obsess about it all the time.
    I thought they'd realised it was a lost cause ages ago... they mostly seem to have disappeared from this forum, at least...

  • HT204291 Airplay intermittent problem, why does not airplay work well anylonger?

    Airplay intermittent problem, why does not airplay work well anylonger. Suddenly it drops out. Now this function has gone from great to ****.
    Trying to view streamed content from the ipad to the Apple TV? Nah forget about it. Sooo dissapointing.

    Restart your wifi router

  • Why does not the text "Powered by Adobe Forms Central" fästän man has paid form

    Why does not the text "Powered by Adobe Forms Central" fästän man has paid form
    [email protected]

    These forms are not embedded correctly. I'm surprised they even work. You need to go to the distribute tab, click Embed button, copy the embed code provided and then paste that into your HTML. This FAQ explains in more detail and some of the issues you may encounter while embedding: http://forums.adobe.com/docs/DOC-1991
    Randy

  • Why does not the scroll on tbody in new versions of Firefox and how it can solve the problem?

    why does not the scroll on tbody in new versions of Firefox and how it can solve the problem?

    scrolling overflow on tbody is no longer supported because that is not allowed in CSS 2.1 specification.
    See [https://developer.mozilla.org/en/CSS/overflow notes for overflow]

  • Why does not Lightroom allow me to import RAW files from my Canon 5D Mark III?

    Why does not Lightroom allow me to import RAW files from my Canon 5D Mark III?
    Error message that it does not support cr. file

    Which version of Lightroom?
    As Hal points out, if it's pre v 4.1, you can't expect an old version of the software to know what to do with a camera that didn't even exist when the software was released.
    Given how many times a day this same issue comes up, maybe it's time Adobe changed the error message to something like "your camera is too old to be supported by this version of Lightroom. Please upgrade" or similar... 

  • Why does not JButton have processActionEvent method, unlike Button ?

    java.awt.Button has processActionEvent( ActionEvent e) method which ( as i think ) calls actionPerformed(e) of the registered listeners.
    Why does not javax.swing.JButton have this method ? from where and how is actionPerformed() of JButton called ?
    I want to know how exactly this event is handled ?
    Thanks in advance.

    eng.robo wrote:
    java.awt.Button has processActionEvent( ActionEvent e) method which ( as i think ) calls actionPerformed(e) of the registered listeners.
    Why does not javax.swing.JButton have this method ? from where and how is actionPerformed() of JButton called ?Swing and AWT are very different and you should not expect one to have the methods of the other.
    I want to know how exactly this event is handled ?Have you read the JButton section in the Sun Swing tutorial? This will tell you much. To see exactly how actions are handled in JButtons, I suggest that you open and look through the source code for the AbstractButton and DefaultButtonModel classes.

  • Why does Notes close every time I open it?   I can't access my notes...

    Why does Notes close every time I open it?   I can't access my notes;
    there don't appear to be any.    Help!
    When I check in Settings, Notes has disappeared from the list of Apps
    On my iPhone, yet I didn't delete it.    I had dozens of notes, lots
    of necessary information stored therein. 
    Thanks for any help....

    I was having this issue also. I found this thread and disabling Exchange Notes did the trick. Obviously, this is the solution only if you were using Exchange to begin with.
    If you want to continue to use Exchange notes or perhaps try this to see if it works in general, I found a fix on this site. All works well now.
    1. Delete your exchange account from the Mail, Contacts & Calendars pane in System Preferences.
    2. Go to Finder, click "Go" in the menu bar, click "Go to Folder" and type in "~/Library" (without the quotes) in the box. This will take you to your user Library folder.
    3. Use the search box in the finder and type in "com.apple.notes" and click "Library" in the search bar that appears. This should now find several folders and files related to the Notes app. Rename or delete everything except the help files (with the lifesaver icons on them).
    4. Restart your Mac. Put your exchange account back into System Preferences, you can go ahead and activate the Notes sync service.
    5. Open Notes and it should be working now!

  • I m coming from linux platform ... now need my g   to work with vim ... how to install g   which supports C  0x ... why does  not it has repository with apple ... its so easy rather than going to UI ...

    i m coming from linux platform ... now need my g   to work with vim ... how to install g   which supports C  0x ... why does  not it has repository with apple ... its so easy rather than going to UI ...

    tom i have been using ubuntu for c++ project
    i use lambda and atomic (c++0x) but now as I am working on MAC not able to use them
    installed xcode(4.3) and changed compiler settings to LLVM3.1 but still both features are not available
    to compile wanted to have g++ which supports c++0x features ...
    new to MAC (2-3 days) so was in rush to solution
    let me know if you have some suggestion ...
    else will try with eclipse cdt .... 

  • Why does not connect properly macpro my motorola bluetooth headphones S10? I get a connection error message and there is no sound. (I want to use headphones to listen to music via bluetooth from my macpro)

    Why does not connect properly macpro my motorola bluetooth headphones S10?     I get a connection error message and there is no sound.                         (I want to use headphones to listen to music via bluetooth from my macpro)   
    the s10 works perfectly on my ipod touch 4g. 

    this is   
    ERROR HAS OCCURRED Bluetooth audio.
    It failed to establish connection with their
    audio device. make sure it is on and
    in the range. you may need to restart the
      audio section of the program you were using
    STOP USING THE HEADSET WITH MICROPHONE.
    ALSO HAVE A MOTOROLA BLUETOOTH SPEAKERS WHICH EQ5 work seamlessly with the Mac

  • The first row behind the words,Why does not be displayed?

    The first row behind the words,Why does not be displayed?
    The first line of why will automatically fill?
    The File(IDcs6) [Link to know attack page removed by moderator]
    Message was edited by: Peter Spier

    Filedown has a nasty reputation in English-speaking countries - plenty of antivirus/antimalware apps block everything there by default, which is what Peter has done. It doesn't mean that your link is malicious, only that it's hosted somewhere that has been used to host malware in the past.
    I'm pretty sure, Peter, that there aren't any nonbreaking spaces there, because I'd wager that there aren't any spaces there at all. It's justified text, and the reasons why it will or will not break are sometimes obscure when using composers that aren't the J composer. Chinese text is usually entirely free of spaces, except in certain circumstances, usually involving European language inserted into Chinese text. Sometimes, for reasons I don't understand, InDesign will simply treat Chinese as if it were English, and only break at spots permissible in Euro languages. That's not the case here - it obviously breaks between two Chinese glyphs, so something else is up here.
    Which version of InDesign are you using? Are you keying the text directly into InDesign, or are you placing, or copying/pasting?
    If you're using an English version of InDesign, I would suggest trying to save your Chinese text as raw text or RTF and File -> Place that. If you choose RTF, try to mark it with Chinese language in your RTF editor (Word?) if possible.
    Is No Break applied anywhere in your text? You can check in the Story editor (Control/Command Y) to see what styles and formatting are applied.

  • Why does not update my applications to cc?

    Why does not update my applications to cc? I have all the programs in cs6, adobe aplication manager and tells me this all updated, , but does not update to cc

    CC applications will be available from June.
    Please refer : http://www.adobe.com/products/creativecloud/faq.html

  • I have a problem in the program .. Why does not work ? :(

    I have a problem in the program .. Why does not work ?
    It look like the pic, !!
    Thanx alot,

    You have opened the render engine, not the full program.
    Mylenium

  • Why does not ipad show on itunes? when i connected with my macbook using usb, just it is charging electricity.

    why does not ipad show on itunes? when i connected with my macbook using usb, just it is charging electricity.
    i don't know why...

    Sometimes it can be something very simple and easy to fix. Before you get into any involved troubleshooting, quit iTunes, restart your Mac, restart your iPad and then try to sync again.
    Restart the iPad by holding down on the sleep button until the red slider appears and then slide to shut off. To power up hold the sleep button until the Apple logo appears and let go of the button.
    If this doesn't work, then try the more involved stuff.

Maybe you are looking for

  • Sender Mail Adapter Attachment

    Hi All The mail I get from the 3rd party has a body and attachment. I have done the TRANSORM module as described in some of the forums, and then the Plain2XML. On sxmb_moni I see the MailMessage and MailAttachment-1, where the MailMessage is in XML f

  • Cost Based Opt Question

    I have the following Select Statement: SELECT FGBTRND_SUBMISSION_NUMBER, FGBTRND_TRANS_AMT, FGBTRND_COAS_CODE, FGBTRND_FUND_CODE, FGBTRND_ORGN_CODE, FGBTRND_ACCT_CODE, FGBTRND_PROG_CODE, FGBTRND_ACTV_CODE, FGBTRND_LOCN_CODE, FGBTRND_RUCL_CODE FROM FG

  • Why does Keynote Beta for PC suddenly stop, making all work in presentation unreadable?

    Keynote Beta seemed to be working fine on my PC and could be seen on my iPad 2 for a while, but suddenly, the screen with all the pages created went away and an error message popped up saying the presentation could not be opened (said this on the iPa

  • EXIT_SAPLIEDI_101

    Hi, we are using the exit EXIT_SAPLIEDI_101 to change Sales Tax Code for intercompany invoic. The Message type is INVOIC and the message code is FI. I put this code but it doesn't change the Sales Tax Code: IF idoc_contrl-mestyp = 'INVOIC' AND idoc_c

  • HT204266 How do i change language in app store for an iphone 5 pls

    Hi just wondering if anyone can help pls, we have clicked on something in app store and it has changed the language to indian.