NAME IdSet

Class encapsulating a set of DBMDatabase::Id.

This package is part of the DBMDatabase manpage. For more information on the database see the DBMDatabase::Overview.

Copyright &copy 1997 Curtis E. Dyreson. All rights reserved. Please be aware of the DBMDatabase::Licence and DBMDatabase::Version.


DESCRIPTION

An IdSet is a data type for columns in a database DBMDatabase::Table. An IdSet cannot be used as a key.


METHODS


new(Id[] \@ids)

Construct a Set from a list of Ids


fromBytes(string $b)

Construct a new IdSet from a byte image of an DBMDatabase::IdList or IdSet.

Construct a new IdSet from an DBMDatabase::IdList (basically, convert the list to a set).


numberOfElements()

Return the number of Ids in the set.


memberOf(Id $id)

Returns true if it is, false otherwise.


delete(Id $id)

Delete an Id from the set.


insert(Id $id)

Inserts an DBMDatabase::Id into this set.


enumerate()

Return an enumeration of the IdSet. OK, we have to fake it in Perl since this is a Java concept (although now that I understand hash tables I think I can do it with each). So we will return the list of values in the table. Currently, only small sets should be enumerated.


union(IdSet $other)

Union this set with the other set, and update this set with the result.


unionSelf(IdSet $other)

Union this set with the other set, and update this set with the result.


intersect(IdSet $other)

Intersect this set with the other set, and return the result.


intersectSelf(IdSet $other)

Intersect this set with the other set, and update this set with the result.


toIdArrayReference()

Returns a reference to an array of Ids from the Set.


image()

Create a formatted string of all the elements in the set


toBytes()

Convert to a byte array


import()

Is this still needed? Just for requires.