Package org.jnode.util

Examples of org.jnode.util.ScaleFactor


    }

    @Override
    protected Long doAccept(Token token, int flags) throws CommandSyntaxException {
        String str = token.text;
        ScaleFactor factor = scaleFactor(str);
        if (factor != null) {
            str = str.substring(0, str.length() - factor.getUnit().length());
        }
        try {
            long tmp = Long.parseLong(str);
            if (factor != null) {
                tmp *= factor.getMultiplier();
            }
            return new Long(tmp);
        } catch (NumberFormatException ex) {
            throw new CommandSyntaxException("invalid size");
        }
View Full Code Here

TOP

Related Classes of org.jnode.util.ScaleFactor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.