SpeculativeGammaConfiguration { public SpeculativeGammaConfiguration newWithMinimalLength(int newMinimalLength) { if (newMinimalLength < 0) { throw new IllegalArgumentException(); } if (minimalLength >= newMinimalLength) { return this; } return new SpeculativeGammaConfiguration( fat, listenersDetected, commuteDetected, nonRefTypeDetected, orelseDetected, locksDetected, constructedObjectsDetected, richMansConflictScanRequired, abortOnlyDetected, ensureDetected, newMinimalLength); } SpeculativeGammaConfiguration();  SpeculativeGammaConfiguration(
            final boolean isFat,
            final boolean listenersDetected,
            final boolean isCommuteDetected,
            final boolean isNonRefTypeDetected,
            final boolean isOrelseDetected,
            final boolean locksDetected,
            final boolean constructedObjectsDetected,
            final boolean isRichMansConflictScanRequired,
            final boolean isAbortOnlyDetected,
            final boolean ensureDetected,
            final int minimalLength); SpeculativeGammaConfiguration newWithMinimalLength(int newMinimalLength); SpeculativeGammaConfiguration newWithLocks(); SpeculativeGammaConfiguration newWithAbortOnly(); SpeculativeGammaConfiguration newWithConstructedObjects(); SpeculativeGammaConfiguration newWithListeners(); SpeculativeGammaConfiguration newWithOrElse(); SpeculativeGammaConfiguration newWithNonRefType(); SpeculativeGammaConfiguration newWithCommute(); SpeculativeGammaConfiguration newWithRichMansConflictScan(); SpeculativeGammaConfiguration newWithEnsure(); @Override String toString(); final boolean listenersDetected; final boolean commuteDetected; final boolean orelseDetected; final boolean nonRefTypeDetected; final boolean fat; final boolean locksDetected; final boolean constructedObjectsDetected; final boolean richMansConflictScanRequired; final boolean abortOnlyDetected; final boolean ensureDetected; final int minimalLength; }
@Test public void newWithMinimalLength() { SpeculativeGammaConfiguration config = new SpeculativeGammaConfiguration() .newWithMinimalLength(10); assertFalse(config.fat); assertFalse(config.nonRefTypeDetected); assertFalse(config.commuteDetected); assertFalse(config.orelseDetected); assertFalse(config.listenersDetected); assertFalse(config.locksDetected); assertFalse(config.abortOnlyDetected); assertFalse(config.ensureDetected); assertFalse(config.constructedObjectsDetected); assertEquals(10, config.minimalLength); }