mirror of
https://github.com/sojamo/controlp5
synced 2024-11-25 07:07:56 +01:00
Update ControllerList.java
__*ControllerInterface< ? extends ControllerInterface< ? >*__
This commit is contained in:
parent
7b1b52f2d4
commit
f611e4d653
@ -32,10 +32,10 @@ import java.util.RandomAccess;
|
||||
* Stores objects of type ControllerInterface and CDrawable, mainly for internal use.
|
||||
*/
|
||||
public class ControllerList implements RandomAccess {
|
||||
protected final List< ControllerInterface< ? > > controllers = new ArrayList< >( );
|
||||
protected final List< ControllerInterface< ? extends ControllerInterface< ? > > > controllers = new ArrayList< >( );
|
||||
protected final List< CDrawable > drawables = new ArrayList< >( );
|
||||
|
||||
public ControllerList add( final ControllerInterface< ? > theController ) {
|
||||
public ControllerList add( final ControllerInterface< ? extends ControllerInterface< ? > > theController ) {
|
||||
if ( !contains( theController ) ) synchronized ( controllers ) {
|
||||
controllers.add( theController );
|
||||
}
|
||||
@ -49,7 +49,7 @@ public class ControllerList implements RandomAccess {
|
||||
return this;
|
||||
}
|
||||
|
||||
public ControllerList remove( final ControllerInterface< ? > theController ) {
|
||||
public ControllerList remove( final ControllerInterface< ? extends ControllerInterface< ? > > theController ) {
|
||||
if ( !isEmpty( ) ) synchronized ( controllers ) {
|
||||
controllers.remove( theController );
|
||||
}
|
||||
@ -77,11 +77,11 @@ public class ControllerList implements RandomAccess {
|
||||
return this;
|
||||
}
|
||||
|
||||
public ControllerInterface< ? > get( final int theIndex ) {
|
||||
public ControllerInterface< ? extends ControllerInterface< ? > > get( final int theIndex ) {
|
||||
return controllers.get( theIndex );
|
||||
}
|
||||
|
||||
public List< ControllerInterface< ? >> get( ) {
|
||||
public List< ControllerInterface< ? extends ControllerInterface< ? > > > get( ) {
|
||||
return controllers;
|
||||
}
|
||||
|
||||
@ -93,7 +93,7 @@ public class ControllerList implements RandomAccess {
|
||||
return drawables;
|
||||
}
|
||||
|
||||
public boolean contains( final ControllerInterface< ? > theController ) {
|
||||
public boolean contains( final ControllerInterface< ? extends ControllerInterface< ? > > theController ) {
|
||||
return controllers.contains( theController );
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user