Java Code Examples for io.realm.DynamicRealmObject#getFloat()
The following examples show how to use
io.realm.DynamicRealmObject#getFloat() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RealmBarDataSet.java From NetKnight with Apache License 2.0 | 6 votes |
@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)); } }
Example 2
Source File: RealmBarDataSet.java From JNChartDemo with Apache License 2.0 | 6 votes |
@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)); } }
Example 3
Source File: RealmBarDataSet.java From MPAndroidChart-Realm with Apache License 2.0 | 6 votes |
@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); } }
Example 4
Source File: RealmBarDataSet.java From Stayfit with Apache License 2.0 | 5 votes |
@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(); }
Example 5
Source File: RealmBubbleDataSet.java From NetKnight with Apache License 2.0 | 5 votes |
@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)); }
Example 6
Source File: RealmCandleDataSet.java From NetKnight with Apache License 2.0 | 5 votes |
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)); }
Example 7
Source File: RealmBubbleDataSet.java From JNChartDemo with Apache License 2.0 | 5 votes |
@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)); }
Example 8
Source File: RealmCandleDataSet.java From JNChartDemo with Apache License 2.0 | 5 votes |
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)); }
Example 9
Source File: RealmBubbleDataSet.java From MPAndroidChart-Realm with Apache License 2.0 | 5 votes |
@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)); }
Example 10
Source File: RealmCandleDataSet.java From MPAndroidChart-Realm with Apache License 2.0 | 5 votes |
@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)); }
Example 11
Source File: RealmPieDataSet.java From MPAndroidChart-Realm with Apache License 2.0 | 5 votes |
@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)); } }
Example 12
Source File: RealmBaseDataSet.java From NetKnight with Apache License 2.0 | 4 votes |
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)); }
Example 13
Source File: RealmBaseDataSet.java From JNChartDemo with Apache License 2.0 | 4 votes |
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)); }
Example 14
Source File: RealmBaseDataSet.java From MPAndroidChart-Realm with Apache License 2.0 | 4 votes |
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)); }
Example 15
Source File: RealmRadarDataSet.java From MPAndroidChart-Realm with Apache License 2.0 | 4 votes |
@Override public RadarEntry buildEntryFromResultObject(T realmObject, float x) { DynamicRealmObject dynamicObject = new DynamicRealmObject(realmObject); return new RadarEntry(dynamicObject.getFloat(mYValuesField)); }