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


Java ObjectDataInput.readDouble方法代码示例

本文整理汇总了Java中com.hazelcast.nio.ObjectDataInput.readDouble方法的典型用法代码示例。如果您正苦于以下问题:Java ObjectDataInput.readDouble方法的具体用法?Java ObjectDataInput.readDouble怎么用?Java ObjectDataInput.readDouble使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.hazelcast.nio.ObjectDataInput的用法示例。


在下文中一共展示了ObjectDataInput.readDouble方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createSerializer

import com.hazelcast.nio.ObjectDataInput; //导入方法依赖的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: readData

import com.hazelcast.nio.ObjectDataInput; //导入方法依赖的package包/类
@Override
public void readData(final ObjectDataInput in) throws IOException
{
    id = in.readInt();
    final int count = in.readInt();
    for (int c = 0; c < count; c++)
    {
        final double x = in.readDouble();
        final double y = in.readDouble();
        if (c > 0)
        {
            polygon.lineTo(x, y);
        }
        else
        {
            polygon.startPath(x, y);
        }
    }
    polygon.closeAllPaths();
    polygon.queryEnvelope2D(envelope2D);
}
 
开发者ID:mraad,项目名称:HZSpatial,代码行数:22,代码来源:SpatialPolygon.java

示例3: readData

import com.hazelcast.nio.ObjectDataInput; //导入方法依赖的package包/类
@Override
public void readData(final ObjectDataInput in) throws IOException
{
    id = in.readInt();
    final double x = in.readDouble();
    final double y = in.readDouble();
    point.setXY(x, y);
    envelope2D.setCoords(x, y, x, y);
    final int size = in.readInt();
    for (int s = 0; s < size; s++)
    {
        final String key = in.readUTF();
        final Object val = in.readObject();
        attributes.put(key, val);
    }
}
 
开发者ID:mraad,项目名称:HZSpatial,代码行数:17,代码来源:SpatialPoint.java

示例4: readData

import com.hazelcast.nio.ObjectDataInput; //导入方法依赖的package包/类
@Override
public void readData(ObjectDataInput in) throws IOException {
    id = in.readUTF();
    bookId = in.readUTF();
    cost = in.readDouble();
    quantity = in.readInt();
    inStock = in.readBoolean();
}
 
开发者ID:ivogm,项目名称:bookstore,代码行数:9,代码来源:BookCartItem.java

示例5: readData

import com.hazelcast.nio.ObjectDataInput; //导入方法依赖的package包/类
@Override
public void readData(ObjectDataInput in) throws IOException {
    totalPrice = in.readDouble();
    date = new Date(in.readLong());
    id = in.readLong();
    int count = in.readInt();
    items = new ArrayList<>(count);
    for(int i=0; i<count; i++) {
        BookCartItem cartItem = new BookCartItem();
        cartItem.readData(in);
        items.add(cartItem);
    }
}
 
开发者ID:ivogm,项目名称:bookstore,代码行数:14,代码来源:ShoppingCart.java

示例6: readData

import com.hazelcast.nio.ObjectDataInput; //导入方法依赖的package包/类
@Override
public void readData(final ObjectDataInput in) throws IOException
{
    super.readData(in);
    final double x = in.readDouble();
    final double y = in.readDouble();
    m_point.setXY(x, y);
    m_envelope.setCoords(x, y, x, y);
}
 
开发者ID:mraad,项目名称:HZSpatial,代码行数:10,代码来源:InsidePolygon.java

示例7: readData

import com.hazelcast.nio.ObjectDataInput; //导入方法依赖的package包/类
@Override
public void readData(final ObjectDataInput in) throws IOException
{
    super.readData(in);
    final double xmin = in.readDouble();
    final double ymin = in.readDouble();
    final double xmax = in.readDouble();
    final double ymax = in.readDouble();
    envelope.setCoords(xmin, ymin, xmax, ymax);
}
 
开发者ID:mraad,项目名称:HZSpatial,代码行数:11,代码来源:EnvelopeContains.java

示例8: readData

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

示例9: readData

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

示例10: readData

import com.hazelcast.nio.ObjectDataInput; //导入方法依赖的package包/类
@Override
public void readData(ObjectDataInput objectDataInput) throws IOException {
    key = objectDataInput.readUTF();
    value = objectDataInput.readDouble();
}
 
开发者ID:bgokden,项目名称:predictblty,代码行数:6,代码来源:KeyValueTuple.java

示例11: readData

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

示例12: readData

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


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