### a piece in the bag with just one follower

sub new {
    my $class = shift;

    $self = { nextelement => undef, data => undef };
    
    bless $self, $class;
}

sub getNextElement {
  my $self = shift;

  return $self->{nextelement};
}

sub setNext {
    my ($self, $bagel) = @_;

    $self->{nextelement} = $bagel;
}

sub getData {
  my $self = shift;

  return $self->{data};
}

sub setData {
    my ($self, $data) = @_;

    $self->{data} = $data;
}

1;
