当前位置: 首页>>代码示例>>Java>>正文


Java ObjectDataOutput.writeDouble方法代码示例

本文整理汇总了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());
        }
    };
}
 
开发者ID:hazelcast,项目名称:hazelcast-jet,代码行数:25,代码来源:AccumulatorSerializerHooks.java

示例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);
}
 
开发者ID:ivogm,项目名称:bookstore,代码行数:9,代码来源:BookCartItem.java

示例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();
        }
    });
}
 
开发者ID:ivogm,项目名称:bookstore,代码行数:15,代码来源:ShoppingCart.java

示例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());
}
 
开发者ID:hazelcast,项目名称:hazelcast-jet,代码行数:8,代码来源:DistributedDoubleSummaryStatistics.java

示例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);
    }
}
 
开发者ID:mraad,项目名称:HZSpatial,代码行数:15,代码来源:SpatialPolygon.java

示例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());
    }
}
 
开发者ID:mraad,项目名称:HZSpatial,代码行数:14,代码来源:SpatialPoint.java

示例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());
}
 
开发者ID:mraad,项目名称:HZSpatial,代码行数:8,代码来源:InsidePolygon.java

示例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);
}
 
开发者ID:mraad,项目名称:HZSpatial,代码行数:10,代码来源:EnvelopeContains.java

示例9: writeData

import com.hazelcast.nio.ObjectDataOutput; //导入方法依赖的package包/类
@Override
public void writeData(ObjectDataOutput objectDataOutput) throws IOException {
    objectDataOutput.writeObject(feature);
    objectDataOutput.writeDouble(confidenceCoefficient);
}
 
开发者ID:bgokden,项目名称:predictblty,代码行数:6,代码来源:FeatureConfidenceTuple.java

示例10: writeData

import com.hazelcast.nio.ObjectDataOutput; //导入方法依赖的package包/类
@Override
public void writeData(ObjectDataOutput out) throws IOException {
    out.writeObject(this.comparableClassification);
    out.writeDouble(this.confidenceCoefficient);
}
 
开发者ID:bgokden,项目名称:predictblty,代码行数:6,代码来源:Classification.java

示例11: writeData

import com.hazelcast.nio.ObjectDataOutput; //导入方法依赖的package包/类
@Override
public void writeData(ObjectDataOutput objectDataOutput) throws IOException {
    objectDataOutput.writeUTF(key);
    objectDataOutput.writeDouble(value);

}
 
开发者ID:bgokden,项目名称:predictblty,代码行数:7,代码来源:KeyValueTuple.java

示例12: writeData

import com.hazelcast.nio.ObjectDataOutput; //导入方法依赖的package包/类
@Override
public void writeData(ObjectDataOutput out) throws IOException {
    out.writeObject(this.classification);
    out.writeDouble(this.confidence);
}
 
开发者ID:bgokden,项目名称:predictblty,代码行数:6,代码来源:Classification.java

示例13: writeData

import com.hazelcast.nio.ObjectDataOutput; //导入方法依赖的package包/类
@Override
public void writeData(ObjectDataOutput out) throws IOException {
    out.writeObject(featureMap);
    out.writeDouble(confidence);
}
 
开发者ID:bgokden,项目名称:predictblty,代码行数:6,代码来源:UnclassifiedFeature.java


注:本文中的com.hazelcast.nio.ObjectDataOutput.writeDouble方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。