Skip to main content
added 12 characters in body
Source Link
Aviv Cohn
  • 21.6k
  • 35
  • 127
  • 186

I know three terms that have to do with storing objects or data. I'm not sure I understand the exact differences between the terms. Please confirm if what I'm about to write is accurate.

A data structureA data structure is a group of data types or objects of the same type, grouped together in some formation.

A collectionA collection is the same as a data structure (I don't mean a Java Collection, I mean a collection in the more general meaning).

An aggregateAn aggregate is an object containing a collection or data structure, providing an interface to communicate with the inner data structure. For example, the object someContainer, which contains an inner ArrayList, is an aggregate because it contains a data structure, encapsulates it, and provides an interface to manipulate it.

Is all of this accurate?

I know three terms that have to do with storing objects or data. I'm not sure I understand the exact differences between the terms. Please confirm if what I'm about to write is accurate.

A data structure is a group of data types or objects of the same type, grouped together in some formation.

A collection is the same as a data structure (I don't mean a Java Collection, I mean a collection in the more general meaning).

An aggregate is an object containing a collection or data structure. For example, the object someContainer, which contains an inner ArrayList, is an aggregate because it contains a data structure.

Is all of this accurate?

I know three terms that have to do with storing objects or data. I'm not sure I understand the exact differences between the terms. Please confirm if what I'm about to write is accurate.

A data structure is a group of data types or objects of the same type, grouped together in some formation.

A collection is the same as a data structure (I don't mean a Java Collection, I mean a collection in the more general meaning).

An aggregate is an object containing a collection or data structure, providing an interface to communicate with the inner data structure. For example, the object someContainer, which contains an inner ArrayList, is an aggregate because it contains a data structure, encapsulates it, and provides an interface to manipulate it.

Is all of this accurate?

Source Link
Aviv Cohn
  • 21.6k
  • 35
  • 127
  • 186

Collection vs data structure vs aggregate

I know three terms that have to do with storing objects or data. I'm not sure I understand the exact differences between the terms. Please confirm if what I'm about to write is accurate.

A data structure is a group of data types or objects of the same type, grouped together in some formation.

A collection is the same as a data structure (I don't mean a Java Collection, I mean a collection in the more general meaning).

An aggregate is an object containing a collection or data structure. For example, the object someContainer, which contains an inner ArrayList, is an aggregate because it contains a data structure.

Is all of this accurate?