Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
V
vadere
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
110
Issues
110
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
3
Merge Requests
3
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vadere
vadere
Commits
a688eae9
Commit
a688eae9
authored
Dec 20, 2016
by
Jakob Schöttl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add comment on cloning attributes
parent
15bcf188
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
VadereState/src/org/vadere/state/attributes/Attributes.java
VadereState/src/org/vadere/state/attributes/Attributes.java
+7
-2
No files found.
VadereState/src/org/vadere/state/attributes/Attributes.java
View file @
a688eae9
...
...
@@ -15,6 +15,11 @@ package org.vadere.state.attributes;
* these objects. All other fields must be immutable (e.g. String, Double,
* VPoint,...).
*
* The standard clone method makes a flat copy. This is enough if the subclass
* only contains immutable fields. If the subclass contains other Attributes
* objects, it must implement a copy constructor and override {@link #clone()}
* to make a deep copy.
*
*/
public
abstract
class
Attributes
extends
DefaultSealable
implements
Cloneable
{
/** Used for default ID values of some scenario elements. */
...
...
@@ -23,8 +28,8 @@ public abstract class Attributes extends DefaultSealable implements Cloneable {
public
Attributes
()
{}
/**
* Standard
shallow clone of attributes. The shallow clone is sufficient
*
because (as noted above) all fields must be immutable anyway
.
* Standard
flat copy of attributes. The flat copy is only sufficient (as
*
noted above) if all fields are immutable
.
*/
@Override
public
Attributes
clone
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment