NAME

PNI::Set - is a set of elements

SYNOPSIS

my $set = PNI::Set->new;

my $elem1 = PNI::Elem->new;
$set->add($elem1);

my $elem2 = PNI::Elem->new;
$set->add($elem2);

$set->list;    # ($elem1,$elem2)

ATTRIBUTES

elem

Hash of elements contained in this PNI::Set.

min

Minimum number of elements: default is 0.

max

Maximum number of elements: default is 0, which means infinity otherwise it would be the empty set.

METHODS

add

$set->add($elem);

Add a PNI::Elem to this PNI::Set.

del

$set->del($elem);

Remove a PNI::Elem from this PNI::Set.

ids

my @ids = $set->ids;

Return a list containing every id of this set elements.

list

my @elems = $set->list;

my $num_elems = scalar( $set->list );