Enum RangingRemovalReason

java.lang.Object
java.lang.Enum<RangingRemovalReason>
com.codename1.nearby.ranging.RangingRemovalReason
All Implemented Interfaces:
Comparable<RangingRemovalReason>

public enum RangingRemovalReason extends Enum<RangingRemovalReason>
Why a peer stopped being ranged, delivered to RangingListener.peerRemoved(RangingRemovalReason).
  • Enum Constant Details

    • PEER_ENDED

      public static final RangingRemovalReason PEER_ENDED
      The peer ended its side of the session deliberately.
    • TIMEOUT

      public static final RangingRemovalReason TIMEOUT
      The peer stopped responding -- moved out of range, went to sleep or lost its radio. On both platforms this is the ordinary "walked away" case.
    • UNKNOWN

      public static final RangingRemovalReason UNKNOWN
      Unclassified.
  • Method Details

    • values

      public static RangingRemovalReason[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static RangingRemovalReason valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null