Code view:

A painting is a person's account of this edit as text, recorded independently of the node mapping - a rendering often has several equally defensible answers where the mapping has one. Deletions and insertions carry no position on the opposite side in a painting, so that panel draws no caret for them.

Before

…lines 1–12 unchanged (12 lines)
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17package org.apache.commons.jxpath.ri.compiler;
18
19import org.apache.commons.jxpath.ri.EvalContext;
20import org.apache.commons.jxpath.ri.InfoSetUtil;
21/**
22 * Implementation of Expression for the operation "<".
23 *
24 * @author Dmitri Plotnikov
25 * @version $Revision$ $Date$
26 */
27public class CoreOperationLessThan extends CoreOperationRelationalExpression {
28
29 public CoreOperationLessThan(Expression arg1, Expression arg2) {
30 super(new Expression[] { arg1, arg2 });
31 }
32
33 public Object computeValue(EvalContext context) {
34 double l = InfoSetUtil.doubleValue(args[0].computeValue(context));
35 double r = InfoSetUtil.doubleValue(args[1].computeValue(context));
36 return l < r ? Boolean.TRUE : Boolean.FALSE;
37 }
38
39 public String getSymbol() {
40 return "<";
41 }
42}
43

After

…lines 1–11 unchanged (11 lines)
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17package org.apache.commons.jxpath.ri.compiler;
18
19/**
20 * Implementation of Expression for the operation "&lt;".
21 *
22 * @author Dmitri Plotnikov
23 * @version $Revision$ $Date$
24 */
25public class CoreOperationLessThan extends CoreOperationRelationalExpression {
26
27 public CoreOperationLessThan(Expression arg1, Expression arg2) {
28 super(new Expression[] { arg1, arg2 });
29 }
30
31 protected boolean evaluateCompare(int compare) {
32 return compare < 0;
33 }
34
35 public String getSymbol() {
36 return "<";
37 }
38}
39

Before

program
block_comment "/*\n * Licensed to the Apache Software Foundation (ASF) under"...
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "jxpath"
. "."
identifier "ri"
. "."
identifier "compiler"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "jxpath"
. "."
identifier "ri"
. "."
identifier "EvalContext"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "jxpath"
. "."
identifier "ri"
. "."
identifier "InfoSetUtil"
; ";"
block_comment "/**\n * Implementation of Expression for the operation \"&lt;\""...
class_declaration
modifiers
public "public"
class "class"
identifier "CoreOperationLessThan"
superclass
extends "extends"
type_identifier "CoreOperationRelationalExpression"
class_body
{ "{"
constructor_declaration (+35 nodes collapsed)
method_declaration
modifiers
public "public"
type_identifier "Object"
identifier "computeValue"
formal_parameters
( "("
formal_parameter
type_identifier "EvalContext"
identifier "context"
) ")"
block
{ "{"
local_variable_declaration
floating_point_type
double "double"
variable_declarator
identifier "l"
= "="
method_invocation
identifier "InfoSetUtil"
. "."
identifier "doubleValue"
argument_list
( "("
method_invocation
array_access
identifier "args"
[ "["
decimal_integer_literal "0"
] "]"
. "."
identifier "computeValue"
argument_list
( "("
identifier "context"
) ")"
) ")"
; ";"
local_variable_declaration
floating_point_type
double "double"
variable_declarator
identifier "r"
= "="
method_invocation
identifier "InfoSetUtil"
. "."
identifier "doubleValue"
argument_list
( "("
method_invocation
array_access
identifier "args"
[ "["
decimal_integer_literal "1"
] "]"
. "."
identifier "computeValue"
argument_list
( "("
identifier "context"
) ")"
) ")"
; ";"
return_statement
return "return"
ternary_expression
binary_expression
identifier "l"
< "<"
identifier "r"
? "?"
field_access
identifier "Boolean"
. "."
identifier "TRUE"
: ":"
field_access
identifier "Boolean"
. "."
identifier "FALSE"
; ";"
} "}"
method_declaration
modifiers
public "public"
type_identifier "String"
identifier "getSymbol"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
string_literal
" "\""
string_fragment "<"
" "\""
; ";"
} "}"
} "}"

After

program
block_comment "/*\n * Licensed to the Apache Software Foundation (ASF) under"...
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "jxpath"
. "."
identifier "ri"
. "."
identifier "compiler"
; ";"
block_comment "/**\n * Implementation of Expression for the operation \"&lt;\""...
class_declaration
modifiers
public "public"
class "class"
identifier "CoreOperationLessThan"
superclass
extends "extends"
type_identifier "CoreOperationRelationalExpression"
class_body
{ "{"
constructor_declaration (+35 nodes collapsed)
method_declaration
modifiers
protected "protected"
boolean_type "boolean"
identifier "evaluateCompare"
formal_parameters
( "("
formal_parameter
integral_type
int "int"
identifier "compare"
) ")"
block
{ "{"
return_statement
return "return"
binary_expression
identifier "compare"
< "<"
decimal_integer_literal "0"
; ";"
} "}"
method_declaration
modifiers
public "public"
type_identifier "String"
identifier "getSymbol"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
string_literal
" "\""
string_fragment "<"
" "\""
; ";"
} "}"
} "}"