• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSP 2.3.5.6 spec

 
Weerawit Maneepongsawat
Ranch Hand
Posts: 203
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

JSP.2.3.5.6 A {<,>,<=,>=,lt,gt,le,ge} B
� If A==B, if operator is <=, le, >=, or ge return true. Otherwise return false
� If A is null or B is null, return false
� If A or B is BigDecimal, coerce both A and B to BigDecimal and use the return
value of A.compareTo( B ).
� If A or B is Float or Double coerce both A and B to Double apply operator
� If A or B is BigInteger, coerce both A and B to BigInteger and use the return
value of A.compareTo( B ).
� If A or B is Byte, Short, Character, Integer, or Long coerce both A and B to
Long and apply operator
� If A or B is String coerce both A and B to String, compare lexically
� If A is Comparable, then:
If A.compareTo (B) throws exception, error.
Otherwise use result of A.compareTo(B)
� If B is Comparable, then:
If B.compareTo (A) throws exception, error.
Otherwise use result of B.compareTo(A)
� Otherwise, error

If A==B, if operator is <=, le, >=, or ge return true. Otherwise return false this return boolean value but this If A or B is BigDecimal, coerce both A and B to BigDecimal and use the return return int value
pls help me to clear this.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic