Class PiActionProfileGroup.WeightedMember

  • Enclosing class:
    PiActionProfileGroup

    public static final class PiActionProfileGroup.WeightedMember
    extends Object
    Weighted reference to an action profile member as used in an action profile group.
    • Constructor Detail

      • WeightedMember

        public WeightedMember​(PiActionProfileMemberId memberId,
                              int weight)
        Creates a new reference for the given action profile member ID and weight.
        Parameters:
        memberId - action profile member ID
        weight - weight
      • WeightedMember

        public WeightedMember​(PiActionProfileMember memberInstance,
                              int weight)
        Creates a new reference from the given action profile member instance and weight. This constructor should be used when performing one-shot group programming (see instance()).
        Parameters:
        memberInstance - action profile member instance
        weight - weight
    • Method Detail

      • id

        public PiActionProfileMemberId id()
        Returns the ID of the action profile member.
        Returns:
        action profile member ID
      • weight

        public int weight()
        Returns the weight of this group member.
        Returns:
        weight
      • instance

        public PiActionProfileMember instance()
        If present, returns the instance of the action profile member pointed by this reference, otherwise returns null. This method is provided as a convenient way to perform one-shot group programming, and as such is meaningful only when performing write operations to a device. In other words, when reading groups from a device only the member reference should be returned and not the actual instance, hence this method should return null.
        Returns:
        action profile member instance, or null
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object