Mercurial Hosting > luan
annotate core/src/luan/impl/Pointer.java @ 671:82f130eba7b0
improve declarations
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Tue, 12 Apr 2016 14:44:10 -0600 |
parents | 58ebfec6178b |
children |
rev | line source |
---|---|
670 | 1 package luan.impl; |
2 | |
3 import luan.DeepCloneable; | |
4 import luan.DeepCloner; | |
5 | |
6 | |
7 public final class Pointer implements DeepCloneable { | |
8 public Object o; | |
9 | |
671 | 10 public Pointer() {} |
11 | |
12 public Pointer(Object o) { | |
13 this.o = o; | |
14 } | |
15 | |
670 | 16 @Override public Pointer shallowClone() { |
17 return new Pointer(); | |
18 } | |
19 | |
20 @Override public void deepenClone(DeepCloneable clone,DeepCloner cloner) { | |
21 ((Pointer)clone).o = cloner.get(o); | |
22 } | |
23 } |