Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Inverse Boolean Value

 
Steve Dyke
Ranch Hand
Posts: 1619
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do I re-write this to not equals?

 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24208
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Putting aside the question of whether or not this is good code, you can just add a "!" (not):

new Boolean(!($F{day6r}.toString()+"/"+$F{day6o}.toString()).equals("0.0/0.0"))
 
Steve Dyke
Ranch Hand
Posts: 1619
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This works great. This is valid code for JasperReports PrintWhen expression.
 
fred rosenberger
lowercase baba
Bartender
Pie
Posts: 12097
30
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
there is a difference between "good" code and "valid" code.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic