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–15 unchanged (15 lines)
16 */
17
18package org.apache.commons.cli;
19
20import java.io.Serializable;
21import java.util.Collection;
22import java.util.HashMap;
23import java.util.Iterator;
24import java.util.Map;
25
26/**
27 * A group of mutually exclusive options.
28 *
29 * @version $Id$
30 */
31public class OptionGroup implements Serializable
32{
33 /** The serial version UID. */
34 private static final long serialVersionUID = 1L;
35
36 /** hold the options */
37 private final Map<String, Option> optionMap = new HashMap<String, Option>();
38
39 /** the name of the selected option */
40 private String selected;
41
42 /** specified whether this group is required */
43 private boolean required;
…lines 44–180 unchanged (137 lines)

After

…lines 1–16 unchanged (16 lines)
17
18package org.apache.commons.cli;
19
20import java.io.Serializable;
21import java.util.Collection;
22import java.util.Iterator;
23import java.util.LinkedHashMap;
24import java.util.Map;
25
26/**
27 * A group of mutually exclusive options.
28 *
29 * @version $Id$
30 */
31public class OptionGroup implements Serializable
32{
33 /** The serial version UID. */
34 private static final long serialVersionUID = 1L;
35
36 /** hold the options */
37 private final Map<String, Option> optionMap = new LinkedHashMap<String, Option>();
38
39 /** the name of the selected option */
40 private String selected;
41
42 /** specified whether this group is required */
43 private boolean required;
…lines 44–180 unchanged (137 lines)

Before

program
block_comment "/**\n * Licensed to the Apache Software Foundation (ASF) unde"...
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "cli"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "Serializable"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Collection"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "HashMap"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Iterator"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Map"
; ";"
block_comment "/**\n * A group of mutually exclusive options.\n *\n * @version"...
class_declaration
modifiers
public "public"
class "class"
identifier "OptionGroup"
super_interfaces
implements "implements"
type_list
type_identifier "Serializable"
class_body
{ "{"
block_comment "/** The serial version UID. */"
field_declaration
modifiers
private "private"
static "static"
final "final"
integral_type
long "long"
variable_declarator
identifier "serialVersionUID"
= "="
decimal_integer_literal "1L"
; ";"
block_comment "/** hold the options */"
field_declaration
modifiers
private "private"
final "final"
generic_type
type_identifier "Map"
type_arguments
< "<"
type_identifier "String"
, ","
type_identifier "Option"
> ">"
variable_declarator
identifier "optionMap"
= "="
object_creation_expression
new "new"
generic_type
type_identifier "HashMap"
type_arguments
< "<"
type_identifier "String"
, ","
type_identifier "Option"
> ">"
argument_list
( "("
) ")"
; ";"
block_comment "/** the name of the selected option */"
field_declaration
modifiers
private "private"
type_identifier "String"
variable_declarator
identifier "selected"
; ";"
block_comment "/** specified whether this group is required */"
field_declaration
modifiers
private "private"
boolean_type "boolean"
variable_declarator
identifier "required"
; ";"
block_comment "/**\n * Add the specified <code>Option</code> to this gro"...
method_declaration (+38 nodes collapsed)
block_comment "/**\n * @return the names of the options in this group as"...
method_declaration (+27 nodes collapsed)
block_comment "/**\n * @return the options in this group as a <code>Coll"...
method_declaration (+27 nodes collapsed)
block_comment "/**\n * Set the selected option of this group to <code>na"...
method_declaration (+98 nodes collapsed)
block_comment "/**\n * @return the selected option name\n */"
method_declaration
modifiers
public "public"
type_identifier "String"
identifier "getSelected"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "selected"
; ";"
} "}"
block_comment "/**\n * @param required specifies if this group is requir"...
method_declaration (+23 nodes collapsed)
block_comment "/**\n * Returns whether this option group is required.\n "...
method_declaration
modifiers
public "public"
boolean_type "boolean"
identifier "isRequired"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "required"
; ";"
} "}"
block_comment "/**\n * Returns the stringified version of this OptionGro"...
method_declaration (+267 nodes collapsed)
} "}"

After

program
block_comment "/**\n * Licensed to the Apache Software Foundation (ASF) unde"...
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "cli"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "Serializable"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Collection"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Iterator"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "LinkedHashMap"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Map"
; ";"
block_comment "/**\n * A group of mutually exclusive options.\n *\n * @version"...
class_declaration
modifiers
public "public"
class "class"
identifier "OptionGroup"
super_interfaces
implements "implements"
type_list
type_identifier "Serializable"
class_body
{ "{"
block_comment "/** The serial version UID. */"
field_declaration
modifiers
private "private"
static "static"
final "final"
integral_type
long "long"
variable_declarator
identifier "serialVersionUID"
= "="
decimal_integer_literal "1L"
; ";"
block_comment "/** hold the options */"
field_declaration
modifiers
private "private"
final "final"
generic_type
type_identifier "Map"
type_arguments
< "<"
type_identifier "String"
, ","
type_identifier "Option"
> ">"
variable_declarator
identifier "optionMap"
= "="
object_creation_expression
new "new"
generic_type
type_identifier "LinkedHashMap"
type_arguments
< "<"
type_identifier "String"
, ","
type_identifier "Option"
> ">"
argument_list
( "("
) ")"
; ";"
block_comment "/** the name of the selected option */"
field_declaration
modifiers
private "private"
type_identifier "String"
variable_declarator
identifier "selected"
; ";"
block_comment "/** specified whether this group is required */"
field_declaration
modifiers
private "private"
boolean_type "boolean"
variable_declarator
identifier "required"
; ";"
block_comment "/**\n * Add the specified <code>Option</code> to this gro"...
method_declaration (+38 nodes collapsed)
block_comment "/**\n * @return the names of the options in this group as"...
method_declaration (+27 nodes collapsed)
block_comment "/**\n * @return the options in this group as a <code>Coll"...
method_declaration (+27 nodes collapsed)
block_comment "/**\n * Set the selected option of this group to <code>na"...
method_declaration (+98 nodes collapsed)
block_comment "/**\n * @return the selected option name\n */"
method_declaration
modifiers
public "public"
type_identifier "String"
identifier "getSelected"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "selected"
; ";"
} "}"
block_comment "/**\n * @param required specifies if this group is requir"...
method_declaration (+23 nodes collapsed)
block_comment "/**\n * Returns whether this option group is required.\n "...
method_declaration
modifiers
public "public"
boolean_type "boolean"
identifier "isRequired"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "required"
; ";"
} "}"
block_comment "/**\n * Returns the stringified version of this OptionGro"...
method_declaration (+267 nodes collapsed)
} "}"