public long getNextLongSigned ( final int pLength ) { if ( pLength > Long . SIZE ) { throw new IllegalArgumentException ( "Long overflow with length > 64" ) ; } long decimal = getNextLong ( pLength ) ; long signMask = 1 << pLength - 1 ; if ( ( decimal & signMask ) != 0 ) { return - ( signMask - ( signMask ^ decimal ) ) ; } return decimal ; }
Method used to get get a signed long with the specified size