org.apache.commons.collections.bidimap
Class AbstractTestBidiMap.TestInverseBidiMap

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.apache.commons.collections.BulkTest
              extended byorg.apache.commons.collections.AbstractTestObject
                  extended byorg.apache.commons.collections.map.AbstractTestMap
                      extended byorg.apache.commons.collections.bidimap.AbstractTestBidiMap
                          extended byorg.apache.commons.collections.bidimap.AbstractTestBidiMap.TestInverseBidiMap
All Implemented Interfaces:
java.lang.Cloneable, junit.framework.Test
Enclosing class:
AbstractTestBidiMap

public class AbstractTestBidiMap.TestInverseBidiMap
extends AbstractTestBidiMap


Nested Class Summary
 
Nested classes inherited from class org.apache.commons.collections.bidimap.AbstractTestBidiMap
AbstractTestBidiMap.TestBidiMapEntrySet, AbstractTestBidiMap.TestBidiMapIterator, AbstractTestBidiMap.TestInverseBidiMap
 
Nested classes inherited from class org.apache.commons.collections.map.AbstractTestMap
AbstractTestMap.TestMapEntrySet, AbstractTestMap.TestMapKeySet, AbstractTestMap.TestMapValues
 
Field Summary
 
Fields inherited from class org.apache.commons.collections.bidimap.AbstractTestBidiMap
entries
 
Fields inherited from class org.apache.commons.collections.map.AbstractTestMap
confirmed, entrySet, keySet, map, values
 
Fields inherited from class org.apache.commons.collections.AbstractTestObject
COLLECTIONS_MAJOR_VERSION
 
Constructor Summary
AbstractTestBidiMap.TestInverseBidiMap(AbstractTestBidiMap main)
           
 
Method Summary
 java.lang.String getCompatibilityVersion()
          Override as DualHashBidiMap didn't exist until version 3.
 java.lang.Object[] getSampleKeys()
          Returns the set of keys in the mappings used to test the map.
 java.lang.Object[] getSampleValues()
          Returns the set of values in the mappings used to test the map.
 boolean isAllowNullKey()
          Returns true if the maps produced by AbstractTestBidiMap.makeEmptyMap() and makeFullMap() supports null keys.
 boolean isAllowNullValue()
          Returns true if the maps produced by AbstractTestBidiMap.makeEmptyMap() and makeFullMap() supports null values.
 boolean isPutAddSupported()
          Returns true if the maps produced by AbstractTestBidiMap.makeEmptyMap() and makeFullMap() support the put and putAll operations adding new mappings.
 boolean isPutChangeSupported()
          Returns true if the maps produced by AbstractTestBidiMap.makeEmptyMap() and makeFullMap() support the put and putAll operations changing existing mappings.
 boolean isRemoveSupported()
          Returns true if the maps produced by AbstractTestBidiMap.makeEmptyMap() and makeFullMap() support the remove and clear operations.
 boolean isSetValueSupported()
          Returns true if the maps produced by AbstractTestBidiMap.makeEmptyMap() and makeFullMap() support the setValue operation on entrySet entries.
 BidiMap makeEmptyBidiMap()
          Implement to create an empty BidiMap.
 BidiMap makeFullBidiMap()
          Override to create a full BidiMap other than the default.
 java.util.Map makeFullMap()
          Return a new, populated map.
 
Methods inherited from class org.apache.commons.collections.bidimap.AbstractTestBidiMap
bulkTestBidiMapIterator, bulkTestInverseMap, bulkTestMapEntrySet, isAllowDuplicateValues, makeEmptyMap, testBidiClear, testBidiGetKey, testBidiGetKeyInverse, testBidiInverse, testBidiKeySetValuesOrder, testBidiMapIteratorSet, testBidiModifyEntrySet, testBidiPut, testBidiRemove, testBidiRemoveByEntrySet, testBidiRemoveByKeySet, verify, verifyInverse
 
Methods inherited from class org.apache.commons.collections.map.AbstractTestMap
addSampleMappings, bulkTestMapKeySet, bulkTestMapValues, cloneMapEntry, getNewSampleValues, getOtherKeys, getOtherNonNullStringElements, getOtherValues, isGetStructuralModify, isSubMapViewsSerializable, makeConfirmedMap, makeObject, resetEmpty, resetFull, tearDown, testEmptyMapCompatibility, testEntrySetClearChangesMap, testEntrySetContains1, testEntrySetContains2, testEntrySetContains3, testEntrySetRemove1, testEntrySetRemove2, testEntrySetRemove3, testFullMapCompatibility, testKeySetClearChangesMap, testKeySetRemoveChangesMap, testMakeMap, testMapClear, testMapContainsKey, testMapContainsValue, testMapEquals, testMapGet, testMapHashCode, testMapIsEmpty, testMapPut, testMapPutAll, testMapPutNullKey, testMapPutNullValue, testMapRemove, testMapSize, testMapToString, testSampleMappings, testValuesClearChangesMap, testValuesRemoveChangesMap, verifyEntrySet, verifyKeySet, verifyMap, verifyValues
 
Methods inherited from class org.apache.commons.collections.AbstractTestObject
getCanonicalEmptyCollectionName, getCanonicalFullCollectionName, isEqualsCheckable, isTestSerialization, readExternalFormFromBytes, readExternalFormFromDisk, skipSerializedCanonicalTests, supportsEmptyCollections, supportsFullCollections, testCanonicalEmptyCollectionExists, testCanonicalFullCollectionExists, testEqualsNull, testObjectEqualsSelf, testObjectHashCodeEqualsContract, testObjectHashCodeEqualsSelfHashCode, testSerializeDeserializeThenCompare, testSimpleSerialization, writeExternalFormToBytes, writeExternalFormToDisk
 
Methods inherited from class org.apache.commons.collections.BulkTest
clone, ignoredTests, makeSuite, toString
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractTestBidiMap.TestInverseBidiMap

public AbstractTestBidiMap.TestInverseBidiMap(AbstractTestBidiMap main)
Method Detail

makeEmptyBidiMap

public BidiMap makeEmptyBidiMap()
Description copied from class: AbstractTestBidiMap
Implement to create an empty BidiMap.

Specified by:
makeEmptyBidiMap in class AbstractTestBidiMap
Returns:
an empty BidiMap implementation.

makeFullBidiMap

public BidiMap makeFullBidiMap()
Description copied from class: AbstractTestBidiMap
Override to create a full BidiMap other than the default.

Overrides:
makeFullBidiMap in class AbstractTestBidiMap
Returns:
a full BidiMap implementation.

makeFullMap

public java.util.Map makeFullMap()
Description copied from class: AbstractTestMap
Return a new, populated map. The mappings in the map should match the keys and values returned from AbstractTestMap.getSampleKeys() and AbstractTestMap.getSampleValues(). The default implementation uses makeEmptyMap() and calls AbstractTestMap.addSampleMappings(java.util.Map) to add all the mappings to the map.

Overrides:
makeFullMap in class AbstractTestMap
Returns:
the map to be tested

getSampleKeys

public java.lang.Object[] getSampleKeys()
Description copied from class: AbstractTestMap
Returns the set of keys in the mappings used to test the map. This method must return an array with the same length as AbstractTestMap.getSampleValues() and all array elements must be different. The default implementation constructs a set of String keys, and includes a single null key if AbstractTestMap.isAllowNullKey() returns true.

Overrides:
getSampleKeys in class AbstractTestMap

getSampleValues

public java.lang.Object[] getSampleValues()
Description copied from class: AbstractTestMap
Returns the set of values in the mappings used to test the map. This method must return an array with the same length as AbstractTestMap.getSampleKeys(). The default implementation constructs a set of String values and includes a single null value if AbstractTestMap.isAllowNullValue() returns true, and includes two values that are the same if AbstractTestMap.isAllowDuplicateValues() returns true.

Overrides:
getSampleValues in class AbstractTestMap

getCompatibilityVersion

public java.lang.String getCompatibilityVersion()
Description copied from class: AbstractTestBidiMap
Override as DualHashBidiMap didn't exist until version 3.

Overrides:
getCompatibilityVersion in class AbstractTestBidiMap

isAllowNullKey

public boolean isAllowNullKey()
Description copied from class: AbstractTestMap
Returns true if the maps produced by AbstractTestMap.makeEmptyMap() and AbstractTestMap.makeFullMap() supports null keys.

Default implementation returns true. Override if your collection class does not support null keys.

Overrides:
isAllowNullKey in class AbstractTestMap

isAllowNullValue

public boolean isAllowNullValue()
Description copied from class: AbstractTestMap
Returns true if the maps produced by AbstractTestMap.makeEmptyMap() and AbstractTestMap.makeFullMap() supports null values.

Default implementation returns true. Override if your collection class does not support null values.

Overrides:
isAllowNullValue in class AbstractTestMap

isPutAddSupported

public boolean isPutAddSupported()
Description copied from class: AbstractTestMap
Returns true if the maps produced by AbstractTestMap.makeEmptyMap() and AbstractTestMap.makeFullMap() support the put and putAll operations adding new mappings.

Default implementation returns true. Override if your collection class does not support put adding.

Overrides:
isPutAddSupported in class AbstractTestMap

isPutChangeSupported

public boolean isPutChangeSupported()
Description copied from class: AbstractTestMap
Returns true if the maps produced by AbstractTestMap.makeEmptyMap() and AbstractTestMap.makeFullMap() support the put and putAll operations changing existing mappings.

Default implementation returns true. Override if your collection class does not support put changing.

Overrides:
isPutChangeSupported in class AbstractTestMap

isSetValueSupported

public boolean isSetValueSupported()
Description copied from class: AbstractTestMap
Returns true if the maps produced by AbstractTestMap.makeEmptyMap() and AbstractTestMap.makeFullMap() support the setValue operation on entrySet entries.

Default implementation returns isPutChangeSupported(). Override if your collection class does not support setValue but does support put changing.

Overrides:
isSetValueSupported in class AbstractTestMap

isRemoveSupported

public boolean isRemoveSupported()
Description copied from class: AbstractTestMap
Returns true if the maps produced by AbstractTestMap.makeEmptyMap() and AbstractTestMap.makeFullMap() support the remove and clear operations.

Default implementation returns true. Override if your collection class does not support removal operations.

Overrides:
isRemoveSupported in class AbstractTestMap


Copyright © 2001-2007 Apache Software Foundation. All Rights Reserved.