public void setLimits ( int softLimit , int hardLimit ) { if ( ( softLimit > 0 && hardLimit > softLimit ) || ( softLimit == 0 && hardLimit == 0 ) ) { this . softLimit = softLimit ; this . hardLimit = hardLimit ; garbageCollect ( ) ; } else { throw new IllegalArgumentException ( ) ; } }
Sets the limits .