Interface IPlatformActor<H>
-
- All Known Implementing Classes:
InvalidActor
public interface IPlatformActor<H>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description <P> IPlatformActor<P>
as(Class<P> clazz)
Tries to cast this actor to the specified handle typeH
getHandle()
Gets the platform handle of this actordefault boolean
isAvailable()
Checks if the actor is validvoid
sendMessage(String message)
Sends a message to the actor
-
-
-
Method Detail
-
isAvailable
default boolean isAvailable()
Checks if the actor is valid- Returns:
true
if the actor is valid otherwisefalse
-
getHandle
H getHandle()
Gets the platform handle of this actor- Returns:
- the platform handle
-
as
<P> IPlatformActor<P> as(Class<P> clazz)
Tries to cast this actor to the specified handle type- Type Parameters:
P
- the provided handle type- Parameters:
clazz
- the handle type- Returns:
- the same actor casted to the specified handle type or an
me.nemo_64.betterinputs.api.platform.InvalidActor
-
sendMessage
void sendMessage(String message)
Sends a message to the actor- Parameters:
message
- the message to be sent
-
-