Class RosterPacket.Item

    • Constructor Detail

      • Item

        public Item​(BareJid jid,
                    java.lang.String name)
        Creates a new roster item.
        Parameters:
        jid - TODO javadoc me please
        name - TODO javadoc me please
      • Item

        public Item​(BareJid jid,
                    java.lang.String name,
                    boolean subscriptionPending)
        Creates a new roster item.
        Parameters:
        jid - the jid.
        name - the user's name.
        subscriptionPending - TODO javadoc me please
    • Method Detail

      • getUser

        @Deprecated
        public java.lang.String getUser()
        Deprecated.
        use getJid() instead.
        Returns the user.
        Returns:
        the user.
      • getJid

        public BareJid getJid()
        Returns the JID of this item.
        Returns:
        the JID.
      • getName

        public java.lang.String getName()
        Returns the user's name.
        Returns:
        the user's name.
      • setName

        public void setName​(java.lang.String name)
        Sets the user's name.
        Parameters:
        name - the user's name.
      • isApproved

        public boolean isApproved()
        Returns the roster item pre-approval state.
        Returns:
        the pre-approval state.
      • setApproved

        public void setApproved​(boolean approved)
        Sets the roster item pre-approval state.
        Parameters:
        approved - the pre-approval flag.
      • getGroupNames

        public java.util.Set<java.lang.String> getGroupNames()
        Returns an unmodifiable set of the group names that the roster item belongs to.
        Returns:
        an unmodifiable set of the group names.
      • addGroupName

        public void addGroupName​(java.lang.String groupName)
        Adds a group name.
        Parameters:
        groupName - the group name.
      • removeGroupName

        public void removeGroupName​(java.lang.String groupName)
        Removes a group name.
        Parameters:
        groupName - the group name.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object