Revision 6c3a8db8
Added by Leszek Koltunski over 4 years ago
| src/main/java/org/distorted/library/effectqueue/EffectQueue.java | ||
|---|---|---|
| 372 | 372 | return false; | 
| 373 | 373 | } | 
| 374 | 374 |  | 
| 375 | /////////////////////////////////////////////////////////////////////////////////////////////////// | |
| 376 |  | |
| 377 | public boolean exists(long id) | |
| 378 |     {
 | |
| 379 | for(int i=0; i<mNumEffects; i++) | |
| 380 |       {
 | |
| 381 | if( mEffects[i].getID() == id ) return true; | |
| 382 | } | |
| 383 |  | |
| 384 | return false; | |
| 385 | } | |
| 386 |  | |
| 375 | 387 | /////////////////////////////////////////////////////////////////////////////////////////////////// | 
| 376 | 388 |  | 
| 377 | 389 | public int getNumEffects() | 
| src/main/java/org/distorted/library/main/DistortedEffects.java | ||
|---|---|---|
| 85 | 85 | return mID; | 
| 86 | 86 | } | 
| 87 | 87 |  | 
| 88 | /////////////////////////////////////////////////////////////////////////////////////////////////// | |
| 89 | /** | |
| 90 | * Return if this queue contains effect with a given ID. | |
| 91 | */ | |
| 92 | public boolean exists(long id) | |
| 93 |     {
 | |
| 94 | int num = (int)(id&EffectType.MASK); | |
| 95 | return mQueues[num].exists(id); | |
| 96 | } | |
| 97 |  | |
| 88 | 98 | /////////////////////////////////////////////////////////////////////////////////////////////////// | 
| 89 | 99 | /** | 
| 90 | 100 | * Aborts all Effects. | 
Also available in: Unified diff
Add a new API DistortedEffects.exists(long id)