com.github.mkroli.lpm

Type members

Classlikes

This class stores data belonging to decimal number ranges. This can be used inside dial plans. Ranges with more than 2 permutations are compressed automatically. When querying this the value of the longest matching path will be returned. So if there are the ranges 1 and 11-13 when querying with 12, the later's value will be returned. This is as it holds the longer prefix (2 digits instead of 1).

This class stores data belonging to decimal number ranges. This can be used inside dial plans. Ranges with more than 2 permutations are compressed automatically. When querying this the value of the longest matching path will be returned. So if there are the ranges 1 and 11-13 when querying with 12, the later's value will be returned. This is as it holds the longer prefix (2 digits instead of 1).

Example usage:

val lpm = new LongestPrefixMatch[String].
 addValueForRange("123", "456", "V1").
 addValueForRange("12345", "12349", "V2")
lpm.getValueFromPrefix("1234")  // will return Some("V1")
lpm.getValueFromPrefix("12347") // will return Some("V2")
class LongestPrefixMatchJ[T >: Object]

This is a wrapper around com.github.mkroli.lpm.LongestPrefixMatch for easier use with the Java language.

This is a wrapper around com.github.mkroli.lpm.LongestPrefixMatch for easier use with the Java language.