TransWikia.com

What is an appropriate name for a property that tells whether a list is empty, single or multiple?

English Language & Usage Asked by rsampaths16 on June 20, 2021

I have a property in programming which tells whether a list is empty, or has only one element or has more than one element. ( empty, single, multiple ).

I want to know what would be an appropriate name for the property that contains this value?

For example

{} -> empty
{"hi"} -> single / singular
{"hi", "bye"} -> multiple / plural

I want to know the name of the property that contains those values?

One Answer

The nearest term you'll probably find is the hypernym cardinality.

cardinality [noun] [mathematics]

The number of elements in a set or other grouping, as a property of that grouping.

[Lexico]

This takes values 0, 1, 2, 3 ... rather than 0, 1, many.

Answered by Edwin Ashworth on June 20, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP