class_body
{ "{"
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"
type_identifier "Map"
variable_declarator
identifier "optionMap"
= "="
object_creation_expression
new "new"
type_identifier "HashMap"
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 (+22 nodes collapsed)
block_comment "/**\n * @return the options in this group as a <code>Coll"...
method_declaration (+22 nodes collapsed)
block_comment "/**\n * Set the selected option of this group to <code>na"...
method_declaration
modifiers
public "public"
void_type "void"
identifier "setSelected"
formal_parameters
( "("
formal_parameter
type_identifier "Option"
identifier "option"
) ")"
throws
throws "throws"
type_identifier "AlreadySelectedException"
block
{ "{"
if_statement (+22 nodes collapsed)
line_comment "// if no option has already been selected or the "
line_comment "// same option is being reselected then set the"
line_comment "// selected member variable"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
binary_expression
identifier "selected"
== "=="
null_literal "null"
|| "||"
method_invocation
identifier "selected"
. "."
identifier "equals"
argument_list
( "("
method_invocation
identifier "option"
. "."
identifier "getOpt"
argument_list
( "("
) ")"
) ")"
) ")"
block
{ "{"
expression_statement
assignment_expression
identifier "selected"
= "="
method_invocation
identifier "option"
. "."
identifier "getOpt"
argument_list
( "("
) ")"
; ";"
} "}"
else "else"
block
{ "{"
throw_statement
throw "throw"
object_creation_expression
new "new"
type_identifier "AlreadySelectedException"
argument_list
( "("
this "this"
, ","
identifier "option"
) ")"
; ";"
} "}"
} "}"
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 (+245 nodes collapsed)
} "}"