Interface IterableWithSize<E>
- Type Parameters:
E
- element type
- All Superinterfaces:
Iterable<E>
- All Known Subinterfaces:
ApprovalFields
,ApprovalsField
,AttachmentBaseFields
,AttachmentBasesField
,BaselineCollectionElementFields
,BaselineCollectionElementsField
,BaselineCollectionFields
,BaselineCollectionsField
,BaselineFields
,BuildFields
,CategoriesField
,CategoryFields
,CommentBaseFields
,CommentBasesField<C>
,CommentBasesTreeField<C>
,CommentFields
,CommentsField
,CommentsTreeField
,DocumentFields
,DocumentWorkflowSignatureFields
,DocumentWorkflowSignaturesField
,DocumentWorkItems
,EnumOptionFields
,EnumOptionsField
,ExternallyLinkedWorkItemFields
,FeatureSelectionItemFields
,Fields
,GlobalRolesField
,HyperlinkFields
,HyperlinksField
,IterableField<E>
,LinkedOslcResourceFields
,LinkedOslcResourcesField
,LinkedResourceFields
,LinkedResourcesField
,LinkedWorkItemFields
,ModelObjectsReferenceField<E>
,ModelObjectsSearch<T>
,ModelObjectsSearchWithTemplates<T>
,ModelObjectsSqlSearch
,ParametersAndDefinitionsField
,ParametersField
,ParametersLibrary
,PlanFields
,PlanningConstraintFields
,PlanningConstraintsField
,PlansField
,PlanWorkItems
,ProjectFields
,ProjectRolesField
,ProjectsField
,ReadOnlyStrictCollection<E>
,ReadOnlyStrictList<E>
,RevisionFields
,RevisionsField
,RichPageFields
,ScriptFields
,SignatureFields
,SignaturesField
,StrictCollection<E>
,StrictList<E>
,TestRecordFields
,TestRecordsField
,TestRunFields
,TestStepResultFields
,TestStepResultsField
,TimePointFields
,UpdatableBaselineCollectionElementsField
,UpdatableBaselineCollectionFields
,UpdatableBaselineCollectionsField
,UpdatableBaselineFields
,UpdatableCategoriesField
,UpdatableCategoryFields
,UpdatableDocumentFields
,UpdatableDocumentWorkItems
,UpdatableEnumOptionsField
,UpdatableGlobalRolesField
,UpdatableLinkedOslcResourcesField
,UpdatableLinkedWorkItemFields
,UpdatablePlanFields
,UpdatablePlanWorkItems
,UpdatableProjectFields
,UpdatableProjectRolesField
,UpdatableRichPageFields
,UpdatableScriptFields
,UpdatableTestRunFields
,UpdatableTimePointFields
,UpdatableUserFields
,UpdatableUserGroupFields
,UpdatableUsersField
,UpdatableWorkItemFields
,UpdatableWorkItemLinkedWorkItemsField
,UserFields
,UserGroupFields
,UsersField
,WikiPageFields
,WorkflowSignatureFields
,WorkflowSignaturesField<T>
,WorkItemFields
,WorkItemLinkedWorkItemsField
,WorkRecordFields
,WorkRecordsField
- All Known Implementing Classes:
DelegatingIterableWithSize
,ImmutableStrictList
,IterableWithSizeCollectionAdapter
,LazyIterableAggregator
,LazyWrappingIterable
,StrictHashSet
,StrictListImpl
Represents read only collection of semantical elements - it does not guarantee that next iteration will return the same instance of the object.
Or in other words: the instance returned in next iteration can be different instance of object,
but it has to represent the semantically same element from problem domain.
So the condition (iterator().next() == iterator().next()) is not guaranteed to always evaluate to TRUE
- Since:
- 3.9.0
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAllTo
(Collection<? super E> collection) boolean
isEmpty()
int
size()
E[]
Iterating over array is faster, when checking for concurrent modification is not needed.Returns new ArrayList containing the same elements, so modifying the returned list does not modify the original collection.Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Method Details
-
size
int size() -
isEmpty
boolean isEmpty() -
addAllTo
-
toArrayList
Returns new ArrayList containing the same elements, so modifying the returned list does not modify the original collection. -
toArray
Iterating over array is faster, when checking for concurrent modification is not needed.- Parameters:
a
- - must have exactly the same size as the collection
-