-
- All Implemented Interfaces:
public class EffectBuilderFXClass that lets the user choose the effect from all it can find.
-
-
Constructor Summary
Constructors Constructor Description EffectBuilderFX()Default constructor.
-
Method Summary
Modifier and Type Method Description <P extends Position2D<out P>, C extends EffectFX<P>> Optional<Class<C>>getResult()Asks the user to chose an effect and returns the related Class. <P extends Position2D<out P>> EffectFX<P>instantiateEffect(Class<out EffectFX<P>> clazz)Instantiates the desired effect. <P extends Position2D<out P>> EffectFX<P>chooseAndLoad()Asks the user to chose an effect and returns a new instance of the desired class. List<Class<out EffectFX<out Object>>>getFoundEffects()Gets an unmodifiable view of the effects found during construction. -
-
Method Detail
-
getResult
<P extends Position2D<out P>, C extends EffectFX<P>> Optional<Class<C>> getResult()
Asks the user to chose an effect and returns the related Class.
-
instantiateEffect
<P extends Position2D<out P>> EffectFX<P> instantiateEffect(Class<out EffectFX<P>> clazz)
Instantiates the desired effect.
- Parameters:
clazz- the class of the effect
-
chooseAndLoad
<P extends Position2D<out P>> EffectFX<P> chooseAndLoad()
Asks the user to chose an effect and returns a new instance of the desired class.
Call this method is the same as calling getResult and instantiateEffect}.
-
getFoundEffects
List<Class<out EffectFX<out Object>>> getFoundEffects()
Gets an unmodifiable view of the effects found during construction.
-
-
-
-