Created
June 10, 2018 14:25
-
-
Save sebersole/2b4bdf3fd05d02e086d5f6eedf7aa37f to your computer and use it in GitHub Desktop.
CollectionSemantics contract
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface CollectionSemantics<C> { | |
/** | |
* Get the classification of collections described by this semantic | |
*/ | |
CollectionClassification getCollectionClassification(); | |
C instantiateRaw(int anticipatedSize); | |
Iterator getElementIterator(C rawCollection); | |
void visitElements(C rawCollection, Consumer action); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment