NAME

List::Range::Set - Set of the range

SYNOPSIS

use List::Range;
use List::Range::Set;

my $set = List::Range::Set->new('MySet' => [
    List::Range->new(name => "A",              upper =>  0),
    List::Range->new(name => "B", lower =>  1, upper => 10),
    List::Range->new(name => "C", lower => 11, upper => 20),
    List::Range->new(name => "D", lower => 21, upper => 30),
    List::Range->new(name => "E", lower => 31, upper => 40),
    List::Range->new(name => "F", lower => 41, upper => 50),
]);

$set->includes(0);  # => true
$set->includes(1);  # => true
$set->includes(11); # => true
$set->includes(31); # => true
$set->includes(50); # => true
$set->includes(51); # => false

DESCRIPTION

List::Range::Set provides a set of range. And a List::Range::Set object is a List::Range object.

METHODS

List::Range::Set->new($name, \@ranges)

Create a new List::Range::Set object.

$set->ranges

Returns the ranges of the set.

SEE ALSO

List::Range

LICENSE

Copyright (C) karupanerura.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

AUTHOR

karupanerura <karupa@cpan.org>