10
In that code, the author creates a class as follows:
public abstract class GlyphIcon<T extends Enum<T> & GlyphIcons> extends Text { /* ... */ }
My question is to understand the meaning of this &
in the following part:
<T extends Enum<T> & GlyphIcons>
From what I’ve noticed, GlyphIcons
is an interface. So that &
would play the same role as a implements
? For example:
<T extends Enum<T> implements GlyphIcons>
That’s it (or almost it) ?
What is the "&" character when used in the generic type declaration?