Enum RosterPacket.ItemType

    • Enum Constant Detail

      • none

        public static final RosterPacket.ItemType none
        The user does not have a subscription to the contact's presence, and the contact does not have a subscription to the user's presence; this is the default value, so if the subscription attribute is not included then the state is to be understood as "none".
      • to

        public static final RosterPacket.ItemType to
        The user has a subscription to the contact's presence, but the contact does not have a subscription to the user's presence.
      • from

        public static final RosterPacket.ItemType from
        The contact has a subscription to the user's presence, but the user does not have a subscription to the contact's presence.
      • both

        public static final RosterPacket.ItemType both
        The user and the contact have subscriptions to each other's presence (also called a "mutual subscription").
    • Method Detail

      • values

        public static RosterPacket.ItemType[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (RosterPacket.ItemType c : RosterPacket.ItemType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static RosterPacket.ItemType 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
      • asSymbol

        public String asSymbol()
        Get a String containing symbols representing the item type. The first symbol in the string is a big dot, representing the local entity. The second symbol represents the established subscription relation and is typically an arrow. The head(s) of the arrow point in the direction presence messages are sent. For example, if there is only a head pointing to the big dot, then the local user will receive presence information from the remote entity.
        Returns:
        the symbolic representation of this item type.