of

public static Optional<EntityVisibility> of(Class<? extends EntityState> stateClass)

Obtains an instance of EntityVisibility for the given entity state class.

Returns Optional.empty(), if the given message is not an Entity, i.e. has no corresponding option defined.

Return

new instance

Parameters

stateClass

the entity state class