本文整理了Java中slash.common.io.Transfer.toDouble()
方法的一些代码示例,展示了Transfer.toDouble()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Transfer.toDouble()
方法的具体详情如下:
包路径:slash.common.io.Transfer
类名称:Transfer
方法名:toDouble
暂无
代码示例来源:origin: cpesch/RouteConverter
private boolean isDuplicate(NavigationPosition position, NavigationPosition insert) {
if (position == null)
return false;
Double distance = position.calculateDistance(insert);
return toDouble(distance) < 10.0;
}
代码示例来源:origin: cpesch/RouteConverter
private void setCellAsDouble(ColumnType type, Double value) {
Cell cell = getOrCreateCell(type);
if (cell != null)
cell.setCellValue(toDouble(value));
}
代码示例来源:origin: cpesch/RouteConverter
public int[] getPositionsWithinDistanceToPredecessor(double distance) {
List<P> positions = getPositions();
if (positions.size() <= 2)
return new int[0];
P previous = positions.get(0);
List<Integer> result = new ArrayList<>();
for (int i = 1; i < positions.size() - 1; i++) {
P next = positions.get(i);
if (!next.hasCoordinates() || toDouble(next.calculateDistance(previous)) <= distance)
result.add(i);
else
previous = next;
}
return toArray(result);
}
代码示例来源:origin: cpesch/RouteConverter
/**
* Removes duplicate adjacent {@link #getPositions() positions} from this route, leaving
* only distinct neighbours
*/
public void removeDuplicates() {
List<P> positions = getPositions();
P previous = null;
int index = 0;
while (index < positions.size()) {
P next = positions.get(index);
if (previous != null && (!next.hasCoordinates() || toDouble(next.calculateDistance(previous)) <= 0.0)) {
positions.remove(index);
} else
index++;
previous = next;
}
}
代码示例来源:origin: cpesch/RouteConverter
} while (toDouble(intermediate.calculateDistance(currentPosition)) > METERS_BETWEEN_MARKS);
内容来源于网络,如有侵权,请联系作者删除!