isEmpty
isEmpty(set: Set<IpAddress>) : Bool
Returns a Bool indicating if set contains no elements.
For example,
isEmpty(ipAddressSet([ipSubnet("1.2.3.4/32")]))returnsfalsewhileisEmpty(intersect(ipAddressSet([ipSubnet("1.2.3.4/32")]), ipAddressSet([ipSubnet("5.6.7.8/32")])))returnstrue.
isEmpty(str: String) : Bool
Returns a Bool indicating if str has no characters. For example, isEmpty("") returns true while
isEmpty("hello") returns false.
isEmpty(collection: Bag<T>) : Bool for any type T.
Returns a Bool indicating if a collection contains no elements.
- Note that this method accepts both
ListsandBags, since Lists subtype Bags.
For example, isEmpty([1, 2, 3]) returns false while isEmpty(foreach x in fromTo(1, 0) select x) returns true.