本文整理汇总了Java中com.hazelcast.nio.ObjectDataOutput.writeDouble方法的典型用法代码示例。如果您正苦于以下问题:Java ObjectDataOutput.writeDouble方法的具体用法?Java ObjectDataOutput.writeDouble怎么用?Java ObjectDataOutput.writeDouble使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.hazelcast.nio.ObjectDataOutput
的用法示例。
在下文中一共展示了ObjectDataOutput.writeDouble方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createSerializer
import com.hazelcast.nio.ObjectDataOutput; //导入方法依赖的package包/类
@Override
public Serializer createSerializer() {
return new StreamSerializer<DoubleAccumulator>() {
@Override
public int getTypeId() {
return SerializerHookConstants.DOUBLE_ACC;
}
@Override
public void destroy() {
}
@Override
public void write(ObjectDataOutput out, DoubleAccumulator object) throws IOException {
out.writeDouble(object.get());
}
@Override
public DoubleAccumulator read(ObjectDataInput in) throws IOException {
return new DoubleAccumulator(in.readDouble());
}
};
}
示例2: writeData
import com.hazelcast.nio.ObjectDataOutput; //导入方法依赖的package包/类
@Override
public void writeData(ObjectDataOutput out) throws IOException {
out.writeUTF(id);
out.writeUTF(bookId);
out.writeDouble(cost);
out.writeInt(quantity);
out.writeBoolean(inStock);
}
示例3: writeData
import com.hazelcast.nio.ObjectDataOutput; //导入方法依赖的package包/类
@Override
public void writeData(ObjectDataOutput out) throws IOException {
out.writeDouble(totalPrice);
out.writeLong(date.getTime());
out.writeLong(id);
out.writeInt(items.size());
items.forEach(item -> {
try{
item.writeData(out);
} catch (IOException ex) {
ex.printStackTrace();
}
});
}
示例4: writeData
import com.hazelcast.nio.ObjectDataOutput; //导入方法依赖的package包/类
@Override
public void writeData(ObjectDataOutput out) throws IOException {
out.writeLong(this.getCount());
out.writeDouble(this.getSum());
out.writeDouble(this.getMin());
out.writeDouble(this.getMax());
}
示例5: writeData
import com.hazelcast.nio.ObjectDataOutput; //导入方法依赖的package包/类
@Override
public void writeData(final ObjectDataOutput out) throws IOException
{
out.writeInt(id);
final Point2D point2D = new Point2D();
final int pointCount = polygon.getPointCount();
out.writeInt(pointCount);
for (int p = 0; p < pointCount; p++)
{
polygon.getXY(p, point2D);
out.writeDouble(point2D.x);
out.writeDouble(point2D.y);
}
}
示例6: writeData
import com.hazelcast.nio.ObjectDataOutput; //导入方法依赖的package包/类
@Override
public void writeData(final ObjectDataOutput out) throws IOException
{
out.writeInt(id);
out.writeDouble(point.getX());
out.writeDouble(point.getY());
out.writeInt(attributes.size());
for (final Map.Entry<String, Object> e : attributes.entrySet())
{
out.writeUTF(e.getKey());
out.writeObject(e.getValue());
}
}
示例7: writeData
import com.hazelcast.nio.ObjectDataOutput; //导入方法依赖的package包/类
@Override
public void writeData(final ObjectDataOutput out) throws IOException
{
super.writeData(out);
out.writeDouble(m_point.getX());
out.writeDouble(m_point.getY());
}
示例8: writeData
import com.hazelcast.nio.ObjectDataOutput; //导入方法依赖的package包/类
@Override
public void writeData(final ObjectDataOutput out) throws IOException
{
super.writeData(out);
out.writeDouble(envelope.xmin);
out.writeDouble(envelope.ymin);
out.writeDouble(envelope.xmax);
out.writeDouble(envelope.ymax);
}
示例9: writeData
import com.hazelcast.nio.ObjectDataOutput; //导入方法依赖的package包/类
@Override
public void writeData(ObjectDataOutput objectDataOutput) throws IOException {
objectDataOutput.writeObject(feature);
objectDataOutput.writeDouble(confidenceCoefficient);
}
示例10: writeData
import com.hazelcast.nio.ObjectDataOutput; //导入方法依赖的package包/类
@Override
public void writeData(ObjectDataOutput out) throws IOException {
out.writeObject(this.comparableClassification);
out.writeDouble(this.confidenceCoefficient);
}
示例11: writeData
import com.hazelcast.nio.ObjectDataOutput; //导入方法依赖的package包/类
@Override
public void writeData(ObjectDataOutput objectDataOutput) throws IOException {
objectDataOutput.writeUTF(key);
objectDataOutput.writeDouble(value);
}
示例12: writeData
import com.hazelcast.nio.ObjectDataOutput; //导入方法依赖的package包/类
@Override
public void writeData(ObjectDataOutput out) throws IOException {
out.writeObject(this.classification);
out.writeDouble(this.confidence);
}
示例13: writeData
import com.hazelcast.nio.ObjectDataOutput; //导入方法依赖的package包/类
@Override
public void writeData(ObjectDataOutput out) throws IOException {
out.writeObject(featureMap);
out.writeDouble(confidence);
}