本文整理汇总了Java中com.androidplot.xy.SimpleXYSeries.size方法的典型用法代码示例。如果您正苦于以下问题:Java SimpleXYSeries.size方法的具体用法?Java SimpleXYSeries.size怎么用?Java SimpleXYSeries.size使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.androidplot.xy.SimpleXYSeries
的用法示例。
在下文中一共展示了SimpleXYSeries.size方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: prepareSeriesToShow
import com.androidplot.xy.SimpleXYSeries; //导入方法依赖的package包/类
@NonNull
private SimpleXYSeries prepareSeriesToShow(@NonNull final SimpleXYSeries series) {
final SimpleXYSeries fixedDeviceSeries;
if (mIsFahrenheit && mLastUnit == HistoryUnitType.TEMPERATURE) {
fixedDeviceSeries = convertSeriesToFahrenheit(series);
} else {
fixedDeviceSeries = series;
}
if (fixedDeviceSeries.size() == 1) {
prepare1ValueSeries(fixedDeviceSeries);
}
return fixedDeviceSeries;
}
示例2: convertSeriesToFahrenheit
import com.androidplot.xy.SimpleXYSeries; //导入方法依赖的package包/类
@NonNull
private SimpleXYSeries convertSeriesToFahrenheit(@NonNull final SimpleXYSeries seriesInCelsius) {
final SimpleXYSeries seriesInFahrenheit = new SimpleXYSeries(seriesInCelsius.getTitle());
for (int i = 0; i < seriesInCelsius.size(); i++) {
final Number x = seriesInCelsius.getX(i);
final Number y = Converter.convertToF(seriesInCelsius.getY(i).floatValue());
seriesInFahrenheit.addFirst(x, y);
}
return seriesInFahrenheit;
}
示例3: checkSeriesRange
import com.androidplot.xy.SimpleXYSeries; //导入方法依赖的package包/类
/**
* Checks if the graph range is modified in some way when.
*
* @param series that has to be checked.
*/
private void checkSeriesRange(@NonNull final SimpleXYSeries series) {
for (int i = 0; i < series.size(); i++) {
final float rangeValue = series.getY(i).floatValue();
if (mIsFahrenheit && mLastUnit == HistoryUnitType.TEMPERATURE) {
final float rangeValueFahrenheit = Converter.convertToF(rangeValue);
recalculateRangeBoundaries(rangeValueFahrenheit);
} else {
recalculateRangeBoundaries(rangeValue);
}
}
}