public class AbstractTestMap.TestMapKeySet extends AbstractTestSet
collection, confirmed
COLLECTIONS_MAJOR_VERSION
Constructor and Description |
---|
AbstractTestMap.TestMapKeySet() |
Modifier and Type | Method and Description |
---|---|
java.lang.Object[] |
getFullElements()
Returns an array of objects that are contained in a collection
produced by
AbstractTestCollection.makeFullCollection() . |
java.lang.Object[] |
getOtherElements()
Returns an array of elements that are not contained in a
full collection.
|
boolean |
isAddSupported()
Returns true if the collections produced by
AbstractTestCollection.makeCollection() and AbstractTestCollection.makeFullCollection()
support the add and addAll
operations. |
boolean |
isNullSupported()
Returns true to indicate that the collection supports holding null.
|
boolean |
isRemoveSupported()
Returns true if the collections produced by
AbstractTestCollection.makeCollection() and AbstractTestCollection.makeFullCollection()
support the remove , removeAll ,
retainAll , clear and
iterator().remove() methods. |
boolean |
isTestSerialization()
Is serialization testing supported.
|
java.util.Set |
makeEmptySet()
Makes an empty set.
|
java.util.Set |
makeFullSet()
Makes a full set by first creating an empty set and then adding
all the elements returned by
AbstractTestCollection.getFullElements() . |
void |
resetEmpty()
Resets the
AbstractTestCollection.collection and AbstractTestCollection.confirmed fields to empty
collections. |
void |
resetFull()
Resets the
AbstractTestCollection.collection and AbstractTestCollection.confirmed fields to full
collections. |
void |
verify()
Provides additional verifications for sets.
|
getConfirmedSet, getSet, isEqualsCheckable, makeCollection, makeConfirmedCollection, makeConfirmedFullCollection, makeFullCollection, testSetEquals, testSetHashCode
areEqualElementsDistinguishable, cloneMapEntry, getFullNonNullElements, getFullNonNullStringElements, getOtherNonNullElements, getOtherNonNullStringElements, isFailFastSupported, makeObject, testCollectionAdd, testCollectionAddAll, testCollectionClear, testCollectionContains, testCollectionContainsAll, testCollectionIsEmpty, testCollectionIterator, testCollectionIteratorFailFast, testCollectionIteratorRemove, testCollectionRemove, testCollectionRemoveAll, testCollectionRetainAll, testCollectionSize, testCollectionToArray, testCollectionToArray2, testCollectionToString, testSerializeDeserializeThenCompare, testUnsupportedAdd, testUnsupportedRemove
getCanonicalEmptyCollectionName, getCanonicalFullCollectionName, getCompatibilityVersion, readExternalFormFromBytes, readExternalFormFromDisk, skipSerializedCanonicalTests, supportsEmptyCollections, supportsFullCollections, testCanonicalEmptyCollectionExists, testCanonicalFullCollectionExists, testEqualsNull, testObjectEqualsSelf, testObjectHashCodeEqualsContract, testObjectHashCodeEqualsSelfHashCode, testSimpleSerialization, writeExternalFormToBytes, writeExternalFormToDisk
clone, ignoredTests, makeSuite, toString
public java.lang.Object[] getFullElements()
AbstractTestCollection
AbstractTestCollection.makeFullCollection()
. Every element in the
returned array must be an element in a full collection.
The default implementation returns a heterogenous array of
objects with some duplicates. null is added if allowed.
Override if you require specific testing elements. Note that if you
override AbstractTestCollection.makeFullCollection()
, you must override
this method to reflect the contents of a full collection.
getFullElements
in class AbstractTestCollection
public java.lang.Object[] getOtherElements()
AbstractTestCollection
AbstractTestCollection.makeFullCollection()
.
The default implementation returns a heterogenous array of elements
without null. Note that some of the tests add these elements
to an empty or full collection, so if your collection restricts
certain kinds of elements, you should override this method.getOtherElements
in class AbstractTestCollection
public java.util.Set makeEmptySet()
AbstractTestSet
makeEmptySet
in class AbstractTestSet
public java.util.Set makeFullSet()
AbstractTestSet
AbstractTestCollection.getFullElements()
.
Override if your set does not support the add operation.makeFullSet
in class AbstractTestSet
public boolean isNullSupported()
AbstractTestCollection
isNullSupported
in class AbstractTestCollection
public boolean isAddSupported()
AbstractTestCollection
AbstractTestCollection.makeCollection()
and AbstractTestCollection.makeFullCollection()
support the add
and addAll
operations.Default implementation returns true. Override if your collection class does not support add or addAll.
isAddSupported
in class AbstractTestCollection
public boolean isRemoveSupported()
AbstractTestCollection
AbstractTestCollection.makeCollection()
and AbstractTestCollection.makeFullCollection()
support the remove
, removeAll
,
retainAll
, clear
and
iterator().remove()
methods.
Default implementation returns true. Override if your collection
class does not support removal operations.isRemoveSupported
in class AbstractTestCollection
public boolean isTestSerialization()
AbstractTestObject
isTestSerialization
in class AbstractTestObject
public void resetEmpty()
AbstractTestCollection
AbstractTestCollection.collection
and AbstractTestCollection.confirmed
fields to empty
collections. Invoke this method before performing a modification
test.resetEmpty
in class AbstractTestCollection
public void resetFull()
AbstractTestCollection
AbstractTestCollection.collection
and AbstractTestCollection.confirmed
fields to full
collections. Invoke this method before performing a modification
test.resetFull
in class AbstractTestCollection
public void verify()
AbstractTestSet
verify
in class AbstractTestSet
Copyright © 2001-2015 Apache Software Foundation. All Rights Reserved.