com.google.common.collect.testing
Class TestCollidingSetGenerator

java.lang.Object
  extended by com.google.common.collect.testing.TestCollidingSetGenerator
All Implemented Interfaces:
TestCollectionGenerator<Object>, TestContainerGenerator<Collection<Object>,Object>, TestSetGenerator<Object>
Direct Known Subclasses:
SetGenerators.ImmutableSetWithBadHashesGenerator

@GwtCompatible
public abstract class TestCollidingSetGenerator
extends Object
implements TestSetGenerator<Object>

A generator using sample elements whose hash codes all collide badly.

This class is GWT compatible.

Author:
Kevin Bourrillion

Constructor Summary
TestCollidingSetGenerator()
           
 
Method Summary
 Object[] createArray(int length)
          Helper method to create an array of the appropriate type used by this generator.
 List<Object> order(List<Object> insertionOrder)
          Returns the original element list, unchanged.
 SampleElements<Object> samples()
          Returns the sample elements that this generate populates its container with.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.google.common.collect.testing.TestSetGenerator
create
 

Constructor Detail

TestCollidingSetGenerator

public TestCollidingSetGenerator()
Method Detail

samples

public SampleElements<Object> samples()
Description copied from interface: TestContainerGenerator
Returns the sample elements that this generate populates its container with.

Specified by:
samples in interface TestContainerGenerator<Collection<Object>,Object>

createArray

public Object[] createArray(int length)
Description copied from interface: TestContainerGenerator
Helper method to create an array of the appropriate type used by this generator. The returned array will contain only nulls.

Specified by:
createArray in interface TestContainerGenerator<Collection<Object>,Object>

order

public List<Object> order(List<Object> insertionOrder)
Returns the original element list, unchanged.

Specified by:
order in interface TestContainerGenerator<Collection<Object>,Object>


Copyright © 2010-2012. All Rights Reserved.