summaryrefslogtreecommitdiff
path: root/src/de/lmu/ifi/dbs/elki/data/type/TypeInformationSerializer.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/de/lmu/ifi/dbs/elki/data/type/TypeInformationSerializer.java')
-rw-r--r--src/de/lmu/ifi/dbs/elki/data/type/TypeInformationSerializer.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/de/lmu/ifi/dbs/elki/data/type/TypeInformationSerializer.java b/src/de/lmu/ifi/dbs/elki/data/type/TypeInformationSerializer.java
index 27eb5c2f..ac3fd164 100644
--- a/src/de/lmu/ifi/dbs/elki/data/type/TypeInformationSerializer.java
+++ b/src/de/lmu/ifi/dbs/elki/data/type/TypeInformationSerializer.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) 2012
+ Copyright (C) 2013
Ludwig-Maximilians-Universität München
Lehr- und Forschungseinheit für Datenbanksysteme
ELKI Development Team
@@ -159,7 +159,7 @@ public class TypeInformationSerializer implements ByteBufferSerializer<TypeInfor
label = ("".equals(label)) ? null : label;
String sername = ByteArrayUtil.STRING_SERIALIZER.fromByteBuffer(buffer);
ByteBufferSerializer<Object> serializer = (ByteBufferSerializer<Object>) Class.forName(sername).newInstance();
- return new SimpleTypeInformation<Object>(clz, label, serializer);
+ return new SimpleTypeInformation<>(clz, label, serializer);
} catch (ClassNotFoundException e) {
throw new UnsupportedOperationException("Cannot deserialize - class not found: " + e, e);
} catch (InstantiationException e) {
@@ -240,7 +240,7 @@ public class TypeInformationSerializer implements ByteBufferSerializer<TypeInfor
ByteBufferSerializer<DoubleVector> serializer = (ByteBufferSerializer<DoubleVector>) Class.forName(sername).newInstance();
int mindim = ByteArrayUtil.readSignedVarint(buffer);
int maxdim = ByteArrayUtil.readSignedVarint(buffer);
- return new VectorTypeInformation<DoubleVector>(clz, serializer, mindim, maxdim);
+ return new VectorTypeInformation<>(clz, serializer, mindim, maxdim);
} catch (ClassNotFoundException e) {
throw new UnsupportedOperationException("Cannot deserialize - class not found: "+e, e);
} catch (InstantiationException e) {
@@ -338,9 +338,9 @@ public class TypeInformationSerializer implements ByteBufferSerializer<TypeInfor
for (int i = 0; i < cols; i++) {
labels[i] = ByteArrayUtil.readString(buffer);
}
- return new VectorFieldTypeInformation<DoubleVector>(factory, mindim, labels, serializer);
+ return new VectorFieldTypeInformation<>(factory, mindim, labels, serializer);
} else {
- return new VectorFieldTypeInformation<DoubleVector>(factory, mindim, maxdim, serializer);
+ return new VectorFieldTypeInformation<>(factory, mindim, maxdim, serializer);
}
} catch (UnableToComplyException e) {
throw new UnsupportedOperationException("Cannot deserialize - cannot instantiate factory: "+e, e);