Class AbstractTestBidiMap.TestInverseBidiMap
java.lang.Object
junit.framework.Assert
junit.framework.TestCase
org.apache.commons.collections.BulkTest
org.apache.commons.collections.AbstractTestObject
org.apache.commons.collections.map.AbstractTestMap
org.apache.commons.collections.bidimap.AbstractTestBidiMap
org.apache.commons.collections.bidimap.AbstractTestBidiMap.TestInverseBidiMap
- All Implemented Interfaces:
Cloneable
,junit.framework.Test
- Enclosing class:
AbstractTestBidiMap
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.commons.collections.bidimap.AbstractTestBidiMap
AbstractTestBidiMap.TestBidiMapEntrySet, AbstractTestBidiMap.TestBidiMapIterator, AbstractTestBidiMap.TestInverseBidiMap
Nested classes/interfaces 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionOverride as DualHashBidiMap didn't exist until version 3.Object[]
Returns the set of keys in the mappings used to test the map.Object[]
Returns the set of values in the mappings used to test the map.boolean
Returns true if the maps produced byAbstractTestMap.makeEmptyMap()
andAbstractTestMap.makeFullMap()
supports null keys.boolean
Returns true if the maps produced byAbstractTestMap.makeEmptyMap()
andAbstractTestMap.makeFullMap()
supports null values.boolean
Returns true if the maps produced byAbstractTestMap.makeEmptyMap()
andAbstractTestMap.makeFullMap()
support theput
andputAll
operations adding new mappings.boolean
Returns true if the maps produced byAbstractTestMap.makeEmptyMap()
andAbstractTestMap.makeFullMap()
support theput
andputAll
operations changing existing mappings.boolean
Returns true if the maps produced byAbstractTestMap.makeEmptyMap()
andAbstractTestMap.makeFullMap()
support theremove
andclear
operations.boolean
Returns true if the maps produced byAbstractTestMap.makeEmptyMap()
andAbstractTestMap.makeFullMap()
support thesetValue
operation on entrySet entries.org.apache.commons.collections.BidiMap
Implement to create an emptyBidiMap
.org.apache.commons.collections.BidiMap
Override to create a fullBidiMap
other than the default.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
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, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, setUp
-
Constructor Details
-
TestInverseBidiMap
-
-
Method Details
-
makeEmptyBidiMap
public org.apache.commons.collections.BidiMap makeEmptyBidiMap()Description copied from class:AbstractTestBidiMap
Implement to create an emptyBidiMap
.- Specified by:
makeEmptyBidiMap
in classAbstractTestBidiMap
- Returns:
- an empty
BidiMap
implementation.
-
makeFullBidiMap
public org.apache.commons.collections.BidiMap makeFullBidiMap()Description copied from class:AbstractTestBidiMap
Override to create a fullBidiMap
other than the default.- Overrides:
makeFullBidiMap
in classAbstractTestBidiMap
- Returns:
- a full
BidiMap
implementation.
-
makeFullMap
Description copied from class:AbstractTestMap
Return a new, populated map. The mappings in the map should match the keys and values returned fromAbstractTestMap.getSampleKeys()
andAbstractTestMap.getSampleValues()
. The default implementation uses makeEmptyMap() and callsAbstractTestMap.addSampleMappings(java.util.Map)
to add all the mappings to the map.- Overrides:
makeFullMap
in classAbstractTestMap
- Returns:
- the map to be tested
-
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 asAbstractTestMap.getSampleValues()
and all array elements must be different. The default implementation constructs a set of String keys, and includes a single null key ifAbstractTestMap.isAllowNullKey()
returnstrue
.- Overrides:
getSampleKeys
in classAbstractTestMap
-
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 asAbstractTestMap.getSampleKeys()
. The default implementation constructs a set of String values and includes a single null value ifAbstractTestMap.isAllowNullValue()
returnstrue
, and includes two values that are the same ifAbstractTestMap.isAllowDuplicateValues()
returnstrue
.- Overrides:
getSampleValues
in classAbstractTestMap
-
getCompatibilityVersion
Description copied from class:AbstractTestBidiMap
Override as DualHashBidiMap didn't exist until version 3.- Overrides:
getCompatibilityVersion
in classAbstractTestBidiMap
- Returns:
- The version, or
null
if this object shouldn't be tested for compatibility with previous versions.
-
isAllowNullKey
public boolean isAllowNullKey()Description copied from class:AbstractTestMap
Returns true if the maps produced byAbstractTestMap.makeEmptyMap()
andAbstractTestMap.makeFullMap()
supports null keys.Default implementation returns true. Override if your collection class does not support null keys.
- Overrides:
isAllowNullKey
in classAbstractTestMap
-
isAllowNullValue
public boolean isAllowNullValue()Description copied from class:AbstractTestMap
Returns true if the maps produced byAbstractTestMap.makeEmptyMap()
andAbstractTestMap.makeFullMap()
supports null values.Default implementation returns true. Override if your collection class does not support null values.
- Overrides:
isAllowNullValue
in classAbstractTestMap
-
isPutAddSupported
public boolean isPutAddSupported()Description copied from class:AbstractTestMap
Returns true if the maps produced byAbstractTestMap.makeEmptyMap()
andAbstractTestMap.makeFullMap()
support theput
andputAll
operations adding new mappings.Default implementation returns true. Override if your collection class does not support put adding.
- Overrides:
isPutAddSupported
in classAbstractTestMap
-
isPutChangeSupported
public boolean isPutChangeSupported()Description copied from class:AbstractTestMap
Returns true if the maps produced byAbstractTestMap.makeEmptyMap()
andAbstractTestMap.makeFullMap()
support theput
andputAll
operations changing existing mappings.Default implementation returns true. Override if your collection class does not support put changing.
- Overrides:
isPutChangeSupported
in classAbstractTestMap
-
isSetValueSupported
public boolean isSetValueSupported()Description copied from class:AbstractTestMap
Returns true if the maps produced byAbstractTestMap.makeEmptyMap()
andAbstractTestMap.makeFullMap()
support thesetValue
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 classAbstractTestMap
-
isRemoveSupported
public boolean isRemoveSupported()Description copied from class:AbstractTestMap
Returns true if the maps produced byAbstractTestMap.makeEmptyMap()
andAbstractTestMap.makeFullMap()
support theremove
andclear
operations.Default implementation returns true. Override if your collection class does not support removal operations.
- Overrides:
isRemoveSupported
in classAbstractTestMap
-