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–849 unchanged (849 lines)
850 *
851 * @return A clone of the time series.
852 *
853 * @throws CloneNotSupportedException not thrown by this class, but
854 * subclasses may differ.
855 */
856 public Object clone() throws CloneNotSupportedException {
857 Object clone = createCopy(0, getItemCount() - 1);
858 return clone;
859 }
860
861 /**
862 * Creates a new timeseries by copying a subset of the data in this time
863 * series.
…lines 864–1037 unchanged (174 lines)

After

…lines 1–849 unchanged (849 lines)
850 *
851 * @return A clone of the time series.
852 *
853 * @throws CloneNotSupportedException not thrown by this class, but
854 * subclasses may differ.
855 */
856 public Object clone() throws CloneNotSupportedException {
857 TimeSeries clone = (TimeSeries) super.clone();
858 clone.data = (List) ObjectUtilities.deepClone(this.data);
859 return clone;
860 }
861
862 /**
863 * Creates a new timeseries by copying a subset of the data in this time
864 * series.
…lines 865–1038 unchanged (174 lines)

Before

program
block_comment "/* ========================================================="...
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jfree"
. "."
identifier "data"
. "."
identifier "time"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "Serializable"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "lang"
. "."
identifier "reflect"
. "."
identifier "InvocationTargetException"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "lang"
. "."
identifier "reflect"
. "."
identifier "Method"
; ";"
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 "Collections"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Date"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "List"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "TimeZone"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jfree"
. "."
identifier "chart"
. "."
identifier "util"
. "."
identifier "ObjectUtilities"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jfree"
. "."
identifier "data"
. "."
identifier "general"
. "."
identifier "Series"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jfree"
. "."
identifier "data"
. "."
identifier "general"
. "."
identifier "SeriesChangeEvent"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jfree"
. "."
identifier "data"
. "."
identifier "general"
. "."
identifier "SeriesException"
; ";"
block_comment "/**\r\n * Represents a sequence of zero or more data items in "...
class_declaration
modifiers
public "public"
class "class"
identifier "TimeSeries"
superclass
extends "extends"
type_identifier "Series"
super_interfaces
implements "implements"
type_list
type_identifier "Cloneable"
, ","
type_identifier "Serializable"
class_body
{ "{"
block_comment "/** For serialization. */"
field_declaration
modifiers
private "private"
static "static"
final "final"
integral_type
long "long"
variable_declarator
identifier "serialVersionUID"
= "="
unary_expression
- "-"
decimal_integer_literal "5032960206869675528L"
; ";"
block_comment "/** Default value for the domain description. */"
field_declaration
modifiers
protected "protected"
static "static"
final "final"
type_identifier "String"
variable_declarator
identifier "DEFAULT_DOMAIN_DESCRIPTION"
= "="
string_literal
" "\""
string_fragment "Time"
" "\""
; ";"
block_comment "/** Default value for the range description. */"
field_declaration
modifiers
protected "protected"
static "static"
final "final"
type_identifier "String"
variable_declarator
identifier "DEFAULT_RANGE_DESCRIPTION"
= "="
string_literal
" "\""
string_fragment "Value"
" "\""
; ";"
block_comment "/** A description of the domain. */"
field_declaration
modifiers
private "private"
type_identifier "String"
variable_declarator
identifier "domain"
; ";"
block_comment "/** A description of the range. */"
field_declaration
modifiers
private "private"
type_identifier "String"
variable_declarator
identifier "range"
; ";"
block_comment "/** The type of period for the data. */"
field_declaration
modifiers
protected "protected"
type_identifier "Class"
variable_declarator
identifier "timePeriodClass"
; ";"
block_comment "/** The list of data items in the series. */"
field_declaration
modifiers
protected "protected"
type_identifier "List"
variable_declarator
identifier "data"
; ";"
block_comment "/** The maximum number of items for the series. */"
field_declaration
modifiers
private "private"
integral_type
int "int"
variable_declarator
identifier "maximumItemCount"
; ";"
block_comment "/** \r\n * The maximum age of items for the series, specif"...
field_declaration
modifiers
private "private"
integral_type
long "long"
variable_declarator
identifier "maximumItemAge"
; ";"
block_comment "/**\r\n * Creates a new (empty) time series. By default, "...
constructor_declaration (+29 nodes collapsed)
block_comment "/**\r\n * Creates a new (empty) time series with the speci"...
constructor_declaration (+30 nodes collapsed)
block_comment "/**\r\n * Creates a new time series that contains no data."...
constructor_declaration (+103 nodes collapsed)
block_comment "/**\r\n * Returns the domain description.\r\n *\r\n * "...
method_declaration
modifiers
public "public"
type_identifier "String"
identifier "getDomainDescription"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
field_access
this "this"
. "."
identifier "domain"
; ";"
} "}"
block_comment "/**\r\n * Sets the domain description and sends a <code>Pr"...
method_declaration (+48 nodes collapsed)
block_comment "/**\r\n * Returns the range description.\r\n *\r\n * @"...
method_declaration
modifiers
public "public"
type_identifier "String"
identifier "getRangeDescription"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
field_access
this "this"
. "."
identifier "range"
; ";"
} "}"
block_comment "/**\r\n * Sets the range description and sends a <code>Pro"...
method_declaration (+48 nodes collapsed)
block_comment "/**\r\n * Returns the number of items in the series.\r\n "...
method_declaration (+25 nodes collapsed)
block_comment "/**\r\n * Returns the list of data items for the series (t"...
method_declaration (+25 nodes collapsed)
block_comment "/**\r\n * Returns the maximum number of items that will be"...
method_declaration
modifiers
public "public"
integral_type
int "int"
identifier "getMaximumItemCount"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
field_access
this "this"
. "."
identifier "maximumItemCount"
; ";"
} "}"
block_comment "/**\r\n * Sets the maximum number of items that will be re"...
method_declaration (+94 nodes collapsed)
block_comment "/**\r\n * Returns the maximum item age (in time periods) f"...
method_declaration
modifiers
public "public"
integral_type
long "long"
identifier "getMaximumItemAge"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
field_access
this "this"
. "."
identifier "maximumItemAge"
; ";"
} "}"
block_comment "/**\r\n * Sets the number of time units in the 'history' f"...
method_declaration (+58 nodes collapsed)
block_comment "/**\r\n * Returns the time period class for this series.\r\n"...
method_declaration
modifiers
public "public"
type_identifier "Class"
identifier "getTimePeriodClass"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
field_access
this "this"
. "."
identifier "timePeriodClass"
; ";"
} "}"
block_comment "/**\r\n * Returns a data item for the series.\r\n *\r\n "...
method_declaration (+33 nodes collapsed)
block_comment "/**\r\n * Returns the data item for a specific period.\r\n "...
method_declaration (+65 nodes collapsed)
block_comment "/**\r\n * Returns the time period at the specified index.\r"...
method_declaration (+30 nodes collapsed)
block_comment "/**\r\n * Returns a time period that would be the next in "...
method_declaration (+40 nodes collapsed)
block_comment "/**\r\n * Returns a collection of all the time periods in "...
method_declaration (+75 nodes collapsed)
block_comment "/**\r\n * Returns a collection of time periods in the spec"...
method_declaration (+114 nodes collapsed)
block_comment "/**\r\n * Returns the index for the item (if any) that cor"...
method_declaration (+74 nodes collapsed)
block_comment "/**\r\n * Returns the value at the specified index.\r\n "...
method_declaration (+30 nodes collapsed)
block_comment "/**\r\n * Returns the value for a time period. If there i"...
method_declaration (+56 nodes collapsed)
block_comment "/**\r\n * Adds a data item to the series and sends a \r\n "...
method_declaration (+24 nodes collapsed)
block_comment "/**\r\n * Adds a data item to the series and sends a \r\n "...
method_declaration (+571 nodes collapsed)
block_comment "/**\r\n * Adds a new data item to the series and sends a {"...
method_declaration (+32 nodes collapsed)
block_comment "/**\r\n * Adds a new data item to the series and sends a {"...
method_declaration (+49 nodes collapsed)
block_comment "/**\r\n * Adds a new data item to the series and sends \r\n "...
method_declaration (+31 nodes collapsed)
block_comment "/**\r\n * Adds a new data item to the series and sends \r\n "...
method_declaration (+48 nodes collapsed)
block_comment "/**\r\n * Updates (changes) the value for a time period. "...
method_declaration (+120 nodes collapsed)
block_comment "/**\r\n * Updates (changes) the value of a data item.\r\n "...
method_declaration (+48 nodes collapsed)
block_comment "/**\r\n * Adds or updates data from one series to another."...
method_declaration (+140 nodes collapsed)
block_comment "/**\r\n * Adds or updates an item in the times series and "...
method_declaration (+38 nodes collapsed)
block_comment "/**\r\n * Adds or updates an item in the times series and "...
method_declaration (+249 nodes collapsed)
block_comment "/**\r\n * Age items in the series. Ensure that the timesp"...
method_declaration (+135 nodes collapsed)
block_comment "/**\r\n * Age items in the series. Ensure that the timesp"...
method_declaration (+292 nodes collapsed)
block_comment "/**\r\n * Removes all data items from the series and sends"...
method_declaration (+51 nodes collapsed)
block_comment "/**\r\n * Deletes the data item for the given time period "...
method_declaration (+59 nodes collapsed)
block_comment "/**\r\n * Deletes data from start until end index (end inc"...
method_declaration (+94 nodes collapsed)
block_comment "/**\r\n * Returns a clone of the time series.\r\n * <P>\r"...
method_declaration
modifiers
public "public"
type_identifier "Object"
identifier "clone"
formal_parameters
( "("
) ")"
throws
throws "throws"
type_identifier "CloneNotSupportedException"
block
{ "{"
local_variable_declaration
type_identifier "Object"
variable_declarator
identifier "clone"
= "="
method_invocation
identifier "createCopy"
argument_list
( "("
decimal_integer_literal "0"
, ","
binary_expression
method_invocation
identifier "getItemCount"
argument_list
( "("
) ")"
- "-"
decimal_integer_literal "1"
) ")"
; ";"
return_statement
return "return"
identifier "clone"
; ";"
} "}"
block_comment "/**\r\n * Creates a new timeseries by copying a subset of "...
method_declaration (+231 nodes collapsed)
block_comment "/**\r\n * Creates a new timeseries by copying a subset of "...
method_declaration (+311 nodes collapsed)
block_comment "/**\r\n * Tests the series for equality with an arbitrary "...
method_declaration (+321 nodes collapsed)
block_comment "/**\r\n * Returns a hash code value for the object.\r\n "...
method_declaration (+316 nodes collapsed)
} "}"

After

program
block_comment "/* ========================================================="...
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jfree"
. "."
identifier "data"
. "."
identifier "time"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "Serializable"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "lang"
. "."
identifier "reflect"
. "."
identifier "InvocationTargetException"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "lang"
. "."
identifier "reflect"
. "."
identifier "Method"
; ";"
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 "Collections"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Date"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "List"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "TimeZone"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jfree"
. "."
identifier "chart"
. "."
identifier "util"
. "."
identifier "ObjectUtilities"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jfree"
. "."
identifier "data"
. "."
identifier "general"
. "."
identifier "Series"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jfree"
. "."
identifier "data"
. "."
identifier "general"
. "."
identifier "SeriesChangeEvent"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jfree"
. "."
identifier "data"
. "."
identifier "general"
. "."
identifier "SeriesException"
; ";"
block_comment "/**\r\n * Represents a sequence of zero or more data items in "...
class_declaration
modifiers
public "public"
class "class"
identifier "TimeSeries"
superclass
extends "extends"
type_identifier "Series"
super_interfaces
implements "implements"
type_list
type_identifier "Cloneable"
, ","
type_identifier "Serializable"
class_body
{ "{"
block_comment "/** For serialization. */"
field_declaration
modifiers
private "private"
static "static"
final "final"
integral_type
long "long"
variable_declarator
identifier "serialVersionUID"
= "="
unary_expression
- "-"
decimal_integer_literal "5032960206869675528L"
; ";"
block_comment "/** Default value for the domain description. */"
field_declaration
modifiers
protected "protected"
static "static"
final "final"
type_identifier "String"
variable_declarator
identifier "DEFAULT_DOMAIN_DESCRIPTION"
= "="
string_literal
" "\""
string_fragment "Time"
" "\""
; ";"
block_comment "/** Default value for the range description. */"
field_declaration
modifiers
protected "protected"
static "static"
final "final"
type_identifier "String"
variable_declarator
identifier "DEFAULT_RANGE_DESCRIPTION"
= "="
string_literal
" "\""
string_fragment "Value"
" "\""
; ";"
block_comment "/** A description of the domain. */"
field_declaration
modifiers
private "private"
type_identifier "String"
variable_declarator
identifier "domain"
; ";"
block_comment "/** A description of the range. */"
field_declaration
modifiers
private "private"
type_identifier "String"
variable_declarator
identifier "range"
; ";"
block_comment "/** The type of period for the data. */"
field_declaration
modifiers
protected "protected"
type_identifier "Class"
variable_declarator
identifier "timePeriodClass"
; ";"
block_comment "/** The list of data items in the series. */"
field_declaration
modifiers
protected "protected"
type_identifier "List"
variable_declarator
identifier "data"
; ";"
block_comment "/** The maximum number of items for the series. */"
field_declaration
modifiers
private "private"
integral_type
int "int"
variable_declarator
identifier "maximumItemCount"
; ";"
block_comment "/** \r\n * The maximum age of items for the series, specif"...
field_declaration
modifiers
private "private"
integral_type
long "long"
variable_declarator
identifier "maximumItemAge"
; ";"
block_comment "/**\r\n * Creates a new (empty) time series. By default, "...
constructor_declaration (+29 nodes collapsed)
block_comment "/**\r\n * Creates a new (empty) time series with the speci"...
constructor_declaration (+30 nodes collapsed)
block_comment "/**\r\n * Creates a new time series that contains no data."...
constructor_declaration (+103 nodes collapsed)
block_comment "/**\r\n * Returns the domain description.\r\n *\r\n * "...
method_declaration
modifiers
public "public"
type_identifier "String"
identifier "getDomainDescription"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
field_access
this "this"
. "."
identifier "domain"
; ";"
} "}"
block_comment "/**\r\n * Sets the domain description and sends a <code>Pr"...
method_declaration (+48 nodes collapsed)
block_comment "/**\r\n * Returns the range description.\r\n *\r\n * @"...
method_declaration
modifiers
public "public"
type_identifier "String"
identifier "getRangeDescription"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
field_access
this "this"
. "."
identifier "range"
; ";"
} "}"
block_comment "/**\r\n * Sets the range description and sends a <code>Pro"...
method_declaration (+48 nodes collapsed)
block_comment "/**\r\n * Returns the number of items in the series.\r\n "...
method_declaration (+25 nodes collapsed)
block_comment "/**\r\n * Returns the list of data items for the series (t"...
method_declaration (+25 nodes collapsed)
block_comment "/**\r\n * Returns the maximum number of items that will be"...
method_declaration
modifiers
public "public"
integral_type
int "int"
identifier "getMaximumItemCount"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
field_access
this "this"
. "."
identifier "maximumItemCount"
; ";"
} "}"
block_comment "/**\r\n * Sets the maximum number of items that will be re"...
method_declaration (+94 nodes collapsed)
block_comment "/**\r\n * Returns the maximum item age (in time periods) f"...
method_declaration
modifiers
public "public"
integral_type
long "long"
identifier "getMaximumItemAge"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
field_access
this "this"
. "."
identifier "maximumItemAge"
; ";"
} "}"
block_comment "/**\r\n * Sets the number of time units in the 'history' f"...
method_declaration (+58 nodes collapsed)
block_comment "/**\r\n * Returns the time period class for this series.\r\n"...
method_declaration
modifiers
public "public"
type_identifier "Class"
identifier "getTimePeriodClass"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
field_access
this "this"
. "."
identifier "timePeriodClass"
; ";"
} "}"
block_comment "/**\r\n * Returns a data item for the series.\r\n *\r\n "...
method_declaration (+33 nodes collapsed)
block_comment "/**\r\n * Returns the data item for a specific period.\r\n "...
method_declaration (+65 nodes collapsed)
block_comment "/**\r\n * Returns the time period at the specified index.\r"...
method_declaration (+30 nodes collapsed)
block_comment "/**\r\n * Returns a time period that would be the next in "...
method_declaration (+40 nodes collapsed)
block_comment "/**\r\n * Returns a collection of all the time periods in "...
method_declaration (+75 nodes collapsed)
block_comment "/**\r\n * Returns a collection of time periods in the spec"...
method_declaration (+114 nodes collapsed)
block_comment "/**\r\n * Returns the index for the item (if any) that cor"...
method_declaration (+74 nodes collapsed)
block_comment "/**\r\n * Returns the value at the specified index.\r\n "...
method_declaration (+30 nodes collapsed)
block_comment "/**\r\n * Returns the value for a time period. If there i"...
method_declaration (+56 nodes collapsed)
block_comment "/**\r\n * Adds a data item to the series and sends a \r\n "...
method_declaration (+24 nodes collapsed)
block_comment "/**\r\n * Adds a data item to the series and sends a \r\n "...
method_declaration (+571 nodes collapsed)
block_comment "/**\r\n * Adds a new data item to the series and sends a {"...
method_declaration (+32 nodes collapsed)
block_comment "/**\r\n * Adds a new data item to the series and sends a {"...
method_declaration (+49 nodes collapsed)
block_comment "/**\r\n * Adds a new data item to the series and sends \r\n "...
method_declaration (+31 nodes collapsed)
block_comment "/**\r\n * Adds a new data item to the series and sends \r\n "...
method_declaration (+48 nodes collapsed)
block_comment "/**\r\n * Updates (changes) the value for a time period. "...
method_declaration (+120 nodes collapsed)
block_comment "/**\r\n * Updates (changes) the value of a data item.\r\n "...
method_declaration (+48 nodes collapsed)
block_comment "/**\r\n * Adds or updates data from one series to another."...
method_declaration (+140 nodes collapsed)
block_comment "/**\r\n * Adds or updates an item in the times series and "...
method_declaration (+38 nodes collapsed)
block_comment "/**\r\n * Adds or updates an item in the times series and "...
method_declaration (+249 nodes collapsed)
block_comment "/**\r\n * Age items in the series. Ensure that the timesp"...
method_declaration (+135 nodes collapsed)
block_comment "/**\r\n * Age items in the series. Ensure that the timesp"...
method_declaration (+292 nodes collapsed)
block_comment "/**\r\n * Removes all data items from the series and sends"...
method_declaration (+51 nodes collapsed)
block_comment "/**\r\n * Deletes the data item for the given time period "...
method_declaration (+59 nodes collapsed)
block_comment "/**\r\n * Deletes data from start until end index (end inc"...
method_declaration (+94 nodes collapsed)
block_comment "/**\r\n * Returns a clone of the time series.\r\n * <P>\r"...
method_declaration
modifiers
public "public"
type_identifier "Object"
identifier "clone"
formal_parameters
( "("
) ")"
throws
throws "throws"
type_identifier "CloneNotSupportedException"
block
{ "{"
local_variable_declaration
type_identifier "TimeSeries"
variable_declarator
identifier "clone"
= "="
cast_expression
( "("
type_identifier "TimeSeries"
) ")"
method_invocation
super "super"
. "."
identifier "clone"
argument_list
( "("
) ")"
; ";"
expression_statement
assignment_expression
field_access
identifier "clone"
. "."
identifier "data"
= "="
cast_expression
( "("
type_identifier "List"
) ")"
method_invocation
identifier "ObjectUtilities"
. "."
identifier "deepClone"
argument_list
( "("
field_access
this "this"
. "."
identifier "data"
) ")"
; ";"
return_statement
return "return"
identifier "clone"
; ";"
} "}"
block_comment "/**\r\n * Creates a new timeseries by copying a subset of "...
method_declaration (+231 nodes collapsed)
block_comment "/**\r\n * Creates a new timeseries by copying a subset of "...
method_declaration (+311 nodes collapsed)
block_comment "/**\r\n * Tests the series for equality with an arbitrary "...
method_declaration (+321 nodes collapsed)
block_comment "/**\r\n * Returns a hash code value for the object.\r\n "...
method_declaration (+316 nodes collapsed)
} "}"