1
0
mirror of https://github.com/Rogiel/l2jserver2 synced 2025-12-09 08:52:51 +00:00

Removed object capabilities

Signed-off-by: Rogiel <rogiel@rogiel.com>
This commit is contained in:
2011-05-22 14:55:54 -03:00
parent 3554664367
commit 49a8513ec5
109 changed files with 158 additions and 1569 deletions

View File

@@ -16,11 +16,13 @@
*/
package com.l2jserver.model;
import com.google.common.base.Preconditions;
import com.l2jserver.model.id.ID;
/**
* @author <a href="http://www.rogiel.com">Rogiel</a>
* Simple model interface implementing {@link ID} related methods
*
* @author <a href="http://www.rogiel.com">Rogiel</a>
*/
public class AbstractModel<T extends ID<?>> implements Model<T> {
/**
@@ -35,8 +37,7 @@ public class AbstractModel<T extends ID<?>> implements Model<T> {
@Override
public void setID(T ID) {
if (this.id != null)
throw new IllegalStateException("ID is already set");
Preconditions.checkState(id == null, "ID is already set");
this.id = ID;
}