Optimization
This commit is contained in:
parent
ff703453f8
commit
703e92cc8f
@ -8,7 +8,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public interface DataSerializer<T> {
|
||||
|
||||
void serialize(DataOutput dataOutput, @Nullable T data) throws IOException;
|
||||
void serialize(DataOutput dataOutput, @NotNull T data) throws IOException;
|
||||
|
||||
@NotNull T deserialize(DataInput dataInput) throws IOException;
|
||||
}
|
||||
|
@ -12,8 +12,8 @@ public class ArrayInt52Serializer implements DataSerializer< List<Int52>> {
|
||||
@Override
|
||||
public void serialize(DataOutput dataOutput, List<Int52> data) throws IOException {
|
||||
dataOutput.writeInt(data.size());
|
||||
for (int i = 0; i < data.size(); i++) {
|
||||
Int52Serializer.INSTANCE.serialize(dataOutput, data.get(i));
|
||||
for (Int52 datum : data) {
|
||||
Int52Serializer.INSTANCE.serialize(dataOutput, datum);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user