summaryrefslogtreecommitdiff
path: root/src/de/lmu/ifi/dbs/elki/data/type/SimpleTypeInformation.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/de/lmu/ifi/dbs/elki/data/type/SimpleTypeInformation.java')
-rw-r--r--src/de/lmu/ifi/dbs/elki/data/type/SimpleTypeInformation.java14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/de/lmu/ifi/dbs/elki/data/type/SimpleTypeInformation.java b/src/de/lmu/ifi/dbs/elki/data/type/SimpleTypeInformation.java
index 9fdabd36..8e428e8e 100644
--- a/src/de/lmu/ifi/dbs/elki/data/type/SimpleTypeInformation.java
+++ b/src/de/lmu/ifi/dbs/elki/data/type/SimpleTypeInformation.java
@@ -4,7 +4,7 @@ package de.lmu.ifi.dbs.elki.data.type;
This file is part of ELKI:
Environment for Developing KDD-Applications Supported by Index-Structures
- Copyright (C) 2013
+ Copyright (C) 2014
Ludwig-Maximilians-Universität München
Lehr- und Forschungseinheit für Datenbanksysteme
ELKI Development Team
@@ -23,7 +23,7 @@ package de.lmu.ifi.dbs.elki.data.type;
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-import de.lmu.ifi.dbs.elki.persistent.ByteBufferSerializer;
+import de.lmu.ifi.dbs.elki.utilities.io.ByteBufferSerializer;
/**
* Class wrapping a particular data type.
@@ -43,12 +43,12 @@ public class SimpleTypeInformation<T> implements TypeInformation {
/**
* Type label.
*/
- private String label = null;
+ private String label;
/**
* Type serializer.
*/
- private ByteBufferSerializer<? super T> serializer = null;
+ private ByteBufferSerializer<? super T> serializer;
/**
* Constructor.
@@ -58,6 +58,8 @@ public class SimpleTypeInformation<T> implements TypeInformation {
public SimpleTypeInformation(Class<? super T> cls) {
super();
this.cls = cls;
+ this.label = null;
+ this.serializer = null;
}
/**
@@ -70,6 +72,7 @@ public class SimpleTypeInformation<T> implements TypeInformation {
super();
this.cls = cls;
this.label = label;
+ this.serializer = null;
}
/**
@@ -81,6 +84,7 @@ public class SimpleTypeInformation<T> implements TypeInformation {
public SimpleTypeInformation(Class<? super T> cls, ByteBufferSerializer<? super T> serializer) {
super();
this.cls = cls;
+ this.label = null;
this.serializer = serializer;
}
@@ -109,7 +113,7 @@ public class SimpleTypeInformation<T> implements TypeInformation {
@Override
public boolean isAssignableFromType(TypeInformation type) {
- if (!(type instanceof SimpleTypeInformation)) {
+ if(!(type instanceof SimpleTypeInformation)) {
return false;
}
final SimpleTypeInformation<?> simpleType = (SimpleTypeInformation<?>) type;