split client and server 2
This commit is contained in:
parent
2fa521c3d1
commit
b17efb5b07
158 changed files with 1080 additions and 515 deletions
20
java/src/game/util/LazyLoadBase.java
Executable file
20
java/src/game/util/LazyLoadBase.java
Executable file
|
@ -0,0 +1,20 @@
|
|||
package game.util;
|
||||
|
||||
public abstract class LazyLoadBase<T>
|
||||
{
|
||||
private T value;
|
||||
private boolean isLoaded = false;
|
||||
|
||||
public T getValue()
|
||||
{
|
||||
if (!this.isLoaded)
|
||||
{
|
||||
this.isLoaded = true;
|
||||
this.value = this.load();
|
||||
}
|
||||
|
||||
return this.value;
|
||||
}
|
||||
|
||||
protected abstract T load();
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue