Template:Collection/doc
Appearance
An infobox for Java collections.
Syntax
[edit source]All parameters are required.
- name — The name of the collection. Automatically put in a
monospace font
by the template. - ordered — Whether the collection is ordered
- access — Whether the collection is random-access (Random), LIFO (FILO), FIFO, etc..
- key — How elements are retrieved. "Index" is appropriate for msot subinterfaces of
Collection
; lists should use "Iterator"; "Object" should be used for maps. - duplicates — Whether duplicate elements are allowed
- impl — Standard implementation(s) of the collection. Not automatically put in
monospace
by the template; this should be done manually with the {{code}} template.
An additional parameter, type, specifies whether the collection is an interface or implementation (class); however, it is optional and defaults to Interface.