Package lcmc.common.domain

Examples of lcmc.common.domain.Unit


    /** Returns units. */
    protected Unit[] getTimeUnits() {
        return new Unit[]{
                   //new Unit("", "", "", ""),
                   new Unit("", "s", "Second", "Seconds"), /* default unit */
                   new Unit("msec", "ms", "Millisecond", "Milliseconds"),
                   new Unit("usec", "us", "Microsecond", "Microseconds"),
                   new Unit("sec""s""Second",      "Seconds"),
                   new Unit("min""m""Minute",      "Minutes"),
                   new Unit("hr",   "h""Hour",        "Hours")
       };
    }
View Full Code Here


    public static Unit getUnitMilliSec() {
        return new Unit("ms", "ms", "Millisecond", "Milliseconds");
    }

    public static Unit getUnitMicroSec() {
        return new Unit("us", "us", "Microsecond", "Microseconds");
    }
View Full Code Here

    public static Unit getUnitMicroSec() {
        return new Unit("us", "us", "Microsecond", "Microseconds");
    }

    public static Unit getUnitSecond() {
        return new Unit("", "s", "Second", "Seconds");
    }
View Full Code Here

    public static Unit getUnitSecond() {
        return new Unit("", "s", "Second", "Seconds");
    }

    public static Unit getUnitMinute() {
        return new Unit("min", "m", "Minute", "Minutes");
    }
View Full Code Here

    public static Unit getUnitMinute() {
        return new Unit("min", "m", "Minute", "Minutes");
    }

    public static Unit getUnitHour() {
        return new Unit("h", "h", "Hour", "Hours");
    }
View Full Code Here

        }
        final Matcher m = UNIT_PATTERN.matcher(v);
        if (m.matches()) {
            final String value = m.group(1);
            final String u = m.group(2);
            final Unit unit = parseUnit(param, u);
            return new StringValue(value, unit);
        }
        return null;
    }
View Full Code Here

        }
        return "unknown";
    }

    public static Unit getUnitKiBytes() {
        return new Unit("K", "K", "KiByte", "KiBytes");
    }
View Full Code Here

    public static Unit getUnitKiBytes() {
        return new Unit("K", "K", "KiByte", "KiBytes");
    }

    public static Unit getUnitMiBytes() {
        return new Unit("M", "M", "MiByte", "MiBytes");
    }
View Full Code Here

    public static Unit getUnitMiBytes() {
        return new Unit("M", "M", "MiByte", "MiBytes");
    }

    public static Unit getUnitGiBytes() {
        return new Unit("G", "G", "GiByte", "GiBytes");
    }
View Full Code Here

    public static Unit getUnitGiBytes() {
        return new Unit("G", "G", "GiByte", "GiBytes");
    }

    public static Unit getUnitTiBytes() {
        return new Unit("T", "T", "TiByte", "TiBytes");
    }
View Full Code Here

TOP

Related Classes of lcmc.common.domain.Unit

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.