Java Reference
In-Depth Information
n
), and let
S
i
=
U
i
[
R
1
=
A
1
,...,
R
p
=
A
p
]
(1 ≤
i
≤
n
).
Otherwise, let
S
i
=
U
i
(1 ≤
i
≤
n
).
• For all
j
from 1 to
n
,
T
j
<:
S
j
.
• If the second method is a generic method as described above, then
A
l
<:
B
l
[
R
1
=
A
1
,...,
R
p
=
A
p
]
(1 ≤
l
≤
p
).
One variable arity member method named
m
is
more specific
than another variable arity
member method of the same name if either:
1.
One member method has
n
parameters and the other has
k
parameters, where
n
≥
k
,
and:
• The types of the parameters of the first member method are
T
1
, ...,
T
n-1
,
T
n
[]
.
• The types of the parameters of the other method are
U
1
, ...,
U
k-1
,
U
k
[]
.
• If the second method is generic then let
R
1
...
R
p
(
p
≥ 1) be its type parameters,
let
B
l
be the declared bound of
R
l
(1 ≤
l
≤
p
), let
A
1
...
A
p
be the type arguments
≤
i
≤
k
-1) and
T
i
<<
U
k
(
k
≤
i
≤
n
), and let
S
i
=
U
i
[
R
1
=
A
1
,...,
R
p
=
A
p
]
(1 ≤
i
≤
k
).
Otherwise, let
S
i
=
U
i
(1 ≤
i
≤
k
).
• For all
j
from 1 to
k
-1,
T
j
<:
S
j
, and,
• For all
j
from
k
to
n
,
T
j
<:
S
k
, and,
• If the second method is a generic method as described above, then
A
l
<:
B
l
[
R
1
=
A
1
,...,
R
p
=
A
p
]
(1 ≤
l
≤
p
).
2.
One member method has
k
parameters and the other has
n
parameters, where
n
≥
k
,
and:
• The types of the parameters of the first method are
U
1
, ...,
U
k-1
,
U
k
[]
.
• The types of the parameters of the other method are
T
1
, ...,
T
n-1
,
T
n
[]
.
• If the second method is generic, then let
R
1
...
R
p
(
p
≥ 1) be its type parameters,
let
B
l
be the declared bound of
R
l
(1 ≤
l
≤
p
), let
A
1
...
A
p
be the type arguments
≤
i
≤
k
-1) and
U
k
<<
T
i
(
k
≤
i
≤
n
), and let
S
i
=
T
i
[
R
1
=
A
1
,...,
R
p
=
A
p
] (1 ≤
i
≤
n
).
Otherwise, let
S
i
=
T
i
(1 ≤
i
≤
n
).
• For all
j
from 1 to
k
-1,
U
j
<:
S
j
, and,
• For all
j
from
k
to
n
,
U
k
<:
S
j
, and,