Map.empty Method

Determines whether the map contains any (key, value) pairs.

Syntax

public boolean empty()

Run On

Called

Return Value

Type: boolean
true if the map does not contain any elements; otherwise false.

Remarks

This is equivalent to (elements() == 0).

See Also

Map Class

Map.elements Method