Package org.bardframework.commons.utils
Class OsUtils
java.lang.Object
org.bardframework.commons.utils.OsUtils
Created by Vahid Zafari on 8/12/2016.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> List<T[]>arraySplit(T[] original, int splitSize) collectionSplit(List original, int splitSize) static intgetLongList(String... nums) getLongList(Collection<String> nums) static String[]getNumberArray(int start, int end, int increment)
-
Constructor Details
-
OsUtils
public OsUtils()
-
-
Method Details
-
getCpuUsagePercent
public static int getCpuUsagePercent() -
getNumberArray
- Parameters:
start- , int end, int increment- Returns:
- Array of numbers from start to end with specific increment step if increment less than 0 then returns String object with zero length
-
arraySplit
- Parameters:
original- (Array), int splitSize- Returns:
- split given array to small array with split size length
-
collectionSplit
- Parameters:
original- , int splitSize- Returns:
- split given collection to small collection with split size length
-
getLongList
- Returns:
- List of numbers in Long format
-
getLongList
- Returns:
- List of numbers in Long format
-