Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does lub(T1,... Tn) mean?

Tags:

java

exception

The following quote is from

JLS 14.20

The declared type of an exception parameter that denotes its type as a union with alternatives D1 | D2 | ... | Dn is lub(D1, D2, ..., Dn).

What is the lub(D1,...Dn) here?

like image 914
St.Antario Avatar asked Oct 17 '25 11:10

St.Antario


2 Answers

It stands for "Least Upper Bound" and is formally defined in §4.10.4. Least Upper Bound:

The least upper bound, or "lub", of a set of reference types is a shared supertype that is more specific than any other shared supertype (that is, no other shared supertype is a subtype of the least upper bound).

like image 176
NPE Avatar answered Oct 20 '25 01:10

NPE


It stands for least upper bound. See JLS 4.10.4.

like image 44
Oliver Charlesworth Avatar answered Oct 20 '25 01:10

Oliver Charlesworth



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!