Top.Mail.Ru
July 16th, 2008 - Java developers — LiveJournal
? ?

Java developers

July 16th, 2008
 

12:15 pm - Imageex_juan_gan - implementing class Maybe...

I wonder what makes more sense, this:



  public String toString() {
    return hasValue() ? ("Maybe(" + value + ")") : "Maybe.NONE";
  }


or this?


  public String toString() {
    return hasValue() ? value.toString() : "NONE"
  }
Powered by LiveJournal.com
Image