If a sequence owns its own memory, then the sequence itself will allocate the its memory and is permitted to grow and shrink that memory (i.e., change its maximum) dynamically.The length may vary dynamically between 0 and the maximum (inclusive) it is not permissible to access an element at an index greater than or equal to the length.Ī sequence may either "own" the memory associated with it, or it may "borrow" that memory. In Java, sequences implement the interface, and thus support all of the collection APIs and idioms familiar to Java programmers.Ī sequence is logically composed of three things: an array of elements, a maximum number of elements that the array may contain (i.e., its allocated size), and a logical length indicating how many of the allocated elements are valid. In all APIs except Java, FooSeq contains deep copies of Foo elements in Java, which does not provide direct support for deep copy semantics, FooSeq contains references to Foo objects. The type of a sequence containing elements of type "Foo" (whether "Foo" is one of your types or a built-in Connext type) is typically called "FooSeq". A sequence is an ordered collection of elements of the same type.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |