public static HardwareDescription extractFromSystem ( ) { int numberOfCPUCores = Runtime . getRuntime ( ) . availableProcessors ( ) ; long sizeOfPhysicalMemory = getSizeOfPhysicalMemory ( ) ; if ( sizeOfPhysicalMemory < 0 ) { sizeOfPhysicalMemory = 1 ; } long sizeOfFreeMemory = getSizeOfFreeMemory ( ) ; return new HardwareDescription ( numberOfCPUCores , sizeOfPhysicalMemory , sizeOfFreeMemory ) ; }
Extracts a hardware description object from the system .