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


Java DynamicRealmObject.getFloat方法代码示例

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


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

示例1: buildEntryFromResultObject

import io.realm.DynamicRealmObject; //导入方法依赖的package包/类
@Override
public BarEntry buildEntryFromResultObject(T realmObject, int xIndex) {
    DynamicRealmObject dynamicObject = new DynamicRealmObject(realmObject);

    if (dynamicObject.getFieldType(mValuesField) == RealmFieldType.LIST) {

        RealmList<DynamicRealmObject> list = dynamicObject.getList(mValuesField);
        float[] values = new float[list.size()];

        int i = 0;
        for (DynamicRealmObject o : list) {
            values[i] = o.getFloat(mStackValueFieldName);
            i++;
        }

        return new BarEntry(values,
                mIndexField == null ? xIndex : dynamicObject.getInt(mIndexField));
    } else {
        float value = dynamicObject.getFloat(mValuesField);
        return new BarEntry(value,
                mIndexField == null ? xIndex : dynamicObject.getInt(mIndexField));
    }
}
 
开发者ID:pencil-box,项目名称:NetKnight,代码行数:24,代码来源:RealmBarDataSet.java

示例2: buildEntryFromResultObject

import io.realm.DynamicRealmObject; //导入方法依赖的package包/类
@Override
public BarEntry buildEntryFromResultObject(T realmObject, float x) {
    DynamicRealmObject dynamicObject = new DynamicRealmObject(realmObject);

    if (dynamicObject.getFieldType(mYValuesField) == RealmFieldType.LIST) {

        RealmList<DynamicRealmObject> list = dynamicObject.getList(mYValuesField);
        float[] values = new float[list.size()];

        int i = 0;
        for (DynamicRealmObject o : list) {
            values[i] = o.getFloat(mStackValueFieldName);
            i++;
        }

        return new BarEntry(
                mXValuesField == null ? x : dynamicObject.getFloat(mXValuesField), values);
    } else {
        float value = dynamicObject.getFloat(mYValuesField);
        return new BarEntry(mXValuesField == null ? x : dynamicObject.getFloat(mXValuesField), value);
    }
}
 
开发者ID:PhilJay,项目名称:MPAndroidChart-Realm,代码行数:23,代码来源:RealmBarDataSet.java

示例3: build

import io.realm.DynamicRealmObject; //导入方法依赖的package包/类
@Override
public void build(RealmResults<T> results) {

    for (T realmObject : results) {

        DynamicRealmObject dynamicObject = new DynamicRealmObject(realmObject);

        try { // normal entry

            float value = dynamicObject.getFloat(mValuesField);
            mValues.add(new BarEntry(value, dynamicObject.getInt(mIndexField)));

        } catch (IllegalArgumentException e) { // stacked entry

            RealmList<DynamicRealmObject> list = dynamicObject.getList(mValuesField);
            float[] values = new float[list.size()];

            int i = 0;
            for (DynamicRealmObject o : list) {
                values[i] = o.getFloat(mStackValueFieldName);
                i++;
            }

            mValues.add(new BarEntry(values, dynamicObject.getInt(mIndexField)));
        }
    }

    calcStackSize();
}
 
开发者ID:rahulmaddineni,项目名称:Stayfit,代码行数:30,代码来源:RealmBarDataSet.java

示例4: buildEntryFromResultObject

import io.realm.DynamicRealmObject; //导入方法依赖的package包/类
@Override
public BubbleEntry buildEntryFromResultObject(T realmObject, int xIndex) {
    DynamicRealmObject dynamicObject = new DynamicRealmObject(realmObject);

    return new BubbleEntry(
            mIndexField == null ? xIndex : dynamicObject.getInt(mIndexField),
            dynamicObject.getFloat(mValuesField),
            dynamicObject.getFloat(mSizeField));
}
 
开发者ID:pencil-box,项目名称:NetKnight,代码行数:10,代码来源:RealmBubbleDataSet.java

示例5: buildEntryFromResultObject

import io.realm.DynamicRealmObject; //导入方法依赖的package包/类
public CandleEntry buildEntryFromResultObject(T realmObject, int xIndex) {
    DynamicRealmObject dynamicObject = new DynamicRealmObject(realmObject);

    return new CandleEntry(
            mIndexField == null ? xIndex : dynamicObject.getInt(mIndexField),
            dynamicObject.getFloat(mHighField),
            dynamicObject.getFloat(mLowField),
            dynamicObject.getFloat(mOpenField),
            dynamicObject.getFloat(mCloseField));
}
 
开发者ID:pencil-box,项目名称:NetKnight,代码行数:11,代码来源:RealmCandleDataSet.java

示例6: buildEntryFromResultObject

import io.realm.DynamicRealmObject; //导入方法依赖的package包/类
@Override
public BubbleEntry buildEntryFromResultObject(T realmObject, float x) {
    DynamicRealmObject dynamicObject = new DynamicRealmObject(realmObject);

    return new BubbleEntry(
            mXValuesField == null ? x : dynamicObject.getFloat(mXValuesField),
            dynamicObject.getFloat(mYValuesField),
            dynamicObject.getFloat(mSizeField));
}
 
开发者ID:PhilJay,项目名称:MPAndroidChart-Realm,代码行数:10,代码来源:RealmBubbleDataSet.java

示例7: buildEntryFromResultObject

import io.realm.DynamicRealmObject; //导入方法依赖的package包/类
@Override
public CandleEntry buildEntryFromResultObject(T realmObject, float x) {
    DynamicRealmObject dynamicObject = new DynamicRealmObject(realmObject);

    return new CandleEntry(
            mXValuesField == null ? x : dynamicObject.getFloat(mXValuesField),
            dynamicObject.getFloat(mHighField),
            dynamicObject.getFloat(mLowField),
            dynamicObject.getFloat(mOpenField),
            dynamicObject.getFloat(mCloseField));
}
 
开发者ID:PhilJay,项目名称:MPAndroidChart-Realm,代码行数:12,代码来源:RealmCandleDataSet.java

示例8: buildEntryFromResultObject

import io.realm.DynamicRealmObject; //导入方法依赖的package包/类
@Override
public PieEntry buildEntryFromResultObject(T realmObject, float x) {
    DynamicRealmObject dynamicObject = new DynamicRealmObject(realmObject);

    if (mLabelField == null) {
        return new PieEntry(dynamicObject.getFloat(mYValuesField));
    } else {
        return new PieEntry(dynamicObject.getFloat(mYValuesField), dynamicObject.getString(mLabelField));
    }
}
 
开发者ID:PhilJay,项目名称:MPAndroidChart-Realm,代码行数:11,代码来源:RealmPieDataSet.java

示例9: buildEntryFromResultObject

import io.realm.DynamicRealmObject; //导入方法依赖的package包/类
public S buildEntryFromResultObject(T realmObject, int xIndex) {
    DynamicRealmObject dynamicObject = new DynamicRealmObject(realmObject);

    return (S)new Entry(dynamicObject.getFloat(mValuesField),
            mIndexField == null ? xIndex : dynamicObject.getInt(mIndexField));
}
 
开发者ID:pencil-box,项目名称:NetKnight,代码行数:7,代码来源:RealmBaseDataSet.java

示例10: buildEntryFromResultObject

import io.realm.DynamicRealmObject; //导入方法依赖的package包/类
public S buildEntryFromResultObject(T realmObject, float x) {
    DynamicRealmObject dynamicObject = new DynamicRealmObject(realmObject);

    return (S) new Entry(mXValuesField == null ? x : dynamicObject.getFloat(mXValuesField), dynamicObject.getFloat(mYValuesField));
}
 
开发者ID:PhilJay,项目名称:MPAndroidChart-Realm,代码行数:6,代码来源:RealmBaseDataSet.java

示例11: buildEntryFromResultObject

import io.realm.DynamicRealmObject; //导入方法依赖的package包/类
@Override
public RadarEntry buildEntryFromResultObject(T realmObject, float x) {
    DynamicRealmObject dynamicObject = new DynamicRealmObject(realmObject);
    return new RadarEntry(dynamicObject.getFloat(mYValuesField));
}
 
开发者ID:PhilJay,项目名称:MPAndroidChart-Realm,代码行数:6,代码来源:RealmRadarDataSet.java


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