In this 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 snippet:
<T extends Enum<T> & GlyphIcons>
So I noticed, GlyphIcons
is an interface. So would that &
have the same role as implements
? For example:
<T extends Enum<T> implements GlyphIcons>
Is this (or almost so)?
What does the "&" character mean? when used in generic type declaration?