Help-Site Computer Manuals
Software
Hardware
Programming
Networking
  Algorithms & Data Structures   Programming Languages   Revision Control
  Protocols
  Cameras   Computers   Displays   Keyboards & Mice   Motherboards   Networking   Printers & Scanners   Storage
  Windows   Linux & Unix   Mac

Asterisk::LCR::Comparer
Generic Route Comparer for Asterisk::LCR

Asterisk::LCR::Comparer - Generic Route Comparer for Asterisk::LCR


NAME

Asterisk::LCR::Comparer - Generic Route Comparer for Asterisk::LCR


SUMMARY

This is a generic class for any Comparer object. Asterisk::LCR::Comparer objects must implement the sortme() method for it to function properly.


ATTRIBUTES

none.


METHODS

$self->normalize ($rate);

Turns $rate into a 1/1, base currency rate.

$self->sortme ($object1, $object2);

This method needs to be implemented by subclasses.

Should:

return +1 if $object1 is greater than $object2
return -1 if $object1 is smaller than $object2
return 0 if $object1 is equal to $object2

$self->eq ($object1, $object2);

Returns 1 if both objects are equal, 0 otherwise.

$self->ne ($object1, $object2);

Returns 1 if both objects are not equal, 0 otherwise.

$self->gt ($object1, $object2);

Returns 1 if $object1 is strictly greater than $object2, 0 otherwise.

$self->ge ($object1, $object2);

Returns 1 if $object1 is greater or equals than $object2, 0 otherwise.

$self->lt ($object1, $object2);

Returns 1 if $object1 is strictly smaller than $object2, 0 otherwise.

$self->ge ($object1, $object2);

Returns 1 if $object1 is smaller or equals than $object2, 0 otherwise.

Programminig
Wy
Wy
yW
Wy
Programming
Wy
Wy
Wy
Wy