Created
January 2, 2013 21:43
-
-
Save dfilimon/4438413 to your computer and use it in GitHub Desktop.
DelegatingVector's clone()
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public Vector clone() { | |
DelegatingVector r; | |
try { | |
r = (DelegatingVector) super.clone(); | |
} catch (CloneNotSupportedException e) { | |
throw new RuntimeException("Clone not supported for DelegatingVector, shouldn't be possible"); | |
} | |
// delegate points to original without this | |
r.delegate = delegate.clone(); | |
return r; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment