2 * Copyright © 2015 ZTE and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package com.highstreet.technologies.odl.app.impl.tools;
11 * Created by odl on 17-6-8.
15 k_bits_s, m_bits_s(1024, k_bits_s), m_byte_s(8 * 1024, k_bits_s);
17 Unit(int ratio, Unit last)
29 private final int ratio;
30 private final Unit last;
32 public Double convert(double result, Unit from)
34 return result * ((double) from.ratio / (double) this.ratio);