~boginw/tapaal/multiplayer

« back to all changes in this revision

Viewing changes to src/net/tapaal/helpers/Reference/MutableReference.java

  • Committer: Bogi Napoleon Wennerstrøm
  • Date: 2020-04-08 13:12:38 UTC
  • mfrom: (998.2.361 testbranch)
  • Revision ID: bogi.wennerstrom@gmail.com-20200408131238-6daa9ocph3zgx1ag
merged ~yrke changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
package net.tapaal.helpers.Reference;
 
2
 
 
3
import dk.aau.cs.util.Require;
 
4
 
 
5
/**
 
6
 * Represents an reference to an object, what can be updated
 
7
 * Never pass the mutablereference to an other object, pass read only Reference
 
8
 */
 
9
public class MutableReference<T> extends Reference<T> {
 
10
 
 
11
    public MutableReference(T ref) {
 
12
        super(ref);
 
13
    }
 
14
 
 
15
    public MutableReference() {
 
16
        super(null);
 
17
    }
 
18
 
 
19
    public void setReference(T ref) {
 
20
        super.setReference(ref);
 
21
    }
 
22
}