Skip to content
Reference > Methods

minimum(o)

Definition

Comparable minimum(Comparable ... o)

Description

Finds and returns the minimum value, skipping nulls. Returns null if all arguments are null. Note the return type will be the widest of input values.

Parameter Definition

Name Type Description
o Comparable... values to compare

Examples

1
2
3
String r1 = minimum("orange","bananna",null,"apple"); // r1 == apple
Object r2 = minimum(null,null,null); // r2 == null
String r3 = minimum("1","1.7","-1"); // r3 == -1