|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--edu.iu.iv.modeling.tarl.util.impl.DefaultAuthorsTopicBucket
This class is a default implemention of the AuthorsTopicBucketInterface.
It represents the group of Authors as an instance of DefaultAuthorGroup. It represents the Topic as an instance of DefaultTopic.
AuthorGroup,
Topic,
AuthorsTopicBucket| Constructor Summary | |
DefaultAuthorsTopicBucket()
Creates a new empty instance of AuthorsTopicBucket. |
|
| Method Summary | |
void |
addAuthor(Author author)
Adds an Author only if his/her Topic is the same as that of the Bucket. |
AuthorGroup |
getAuthors()
Returns the AuthorGroup that the AuthorsTopicBucket stores |
Topic |
getTopic()
Returns the common Topic of the AuthorGroup |
void |
initialize(java.util.Collection collection)
Initializes the Bucket with Authors from the collection |
java.util.Collection |
partitionBucket(int numElements)
Partitions the bucket to fixed sized groups of Authors and returns the Collection of these groups. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DefaultAuthorsTopicBucket()
AuthorsTopicBucket. The common Topic is set to null.
| Method Detail |
public void initialize(java.util.Collection collection)
Authors from the collection
initialize in interface AuthorsTopicBucketcollection - Specifies the collection of authorspublic void addAuthor(Author author)
Author only if his/her Topic is the same as that of the Bucket.
addAuthor in interface AuthorsTopicBucketauthor - the author to be added to the bucketpublic Topic getTopic()
Topic of the AuthorGroup
getTopic in interface AuthorsTopicBucketpublic AuthorGroup getAuthors()
AuthorGroup that the AuthorsTopicBucket stores
getAuthors in interface AuthorsTopicBucketpublic java.util.Collection partitionBucket(int numElements)
Authors and returns the Collection of these groups. tarl.defaultimpl.misc.ExtendedHashSet#partitionSet(Collection collection, int numElements) available with the ExtendedHashSet.
partitionBucket in interface AuthorsTopicBucketnumElements - the number of elements in most of the individual buckets
AuthorsTopicBuckets
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||