Water 5-Common Data Types-Generic Object and Collection
method length
Contract
Return typewob
No input parameters.
Water Contract
<method length/>
Returns an integer of the size of the object. For primitives (booleans, characters, numbers) returns 0. For Strings and java vectors, returns the length. For Records, returns a non-negative number that's the lowest integer for which there's no key of that integer. Usually when you've got a record and some integer named fields, you'll have consecutive integers up from zero like so: 0, 1, 2, 3 in which case length would return 4. But if you had integer fields of: 0, 1, 3, 4, length would return 2.