Package org.drip.service.common
Class PhoneLetterCombinationGenerator
java.lang.Object
org.drip.service.common.PhoneLetterCombinationGenerator
public class PhoneLetterCombinationGenerator
extends java.lang.Object
PhoneLetterCombinationGenerator generates the Phone Letter Combinations. It implements the
following Functions:
- Generate the Standard PhoneLetterCombinationGenerator
- PhoneLetterCombinationGenerator Constructor
- Retrieve the Digit to Character Array Map
- Generate the Set of Candidate Characters from the specified Digit and its Count
- Generate all the Candidate Sequence Sets, given the Phone Number
- Author:
- Lakshmi Krishnamurthy
-
Constructor Summary
Constructors Constructor Description PhoneLetterCombinationGenerator(java.util.Map<java.lang.Character,char[]> digitCharacterMap)PhoneLetterCombinationGenerator Constructor -
Method Summary
Modifier and Type Method Description java.util.Set<java.lang.String>candidateCharacterSet(char digit, int count)Generate the Set of Candidate Characters from the specified Digit and its Countjava.util.Map<java.lang.Character,char[]>digitCharacterMap()Retrieve the Digit to Character Array Mapjava.util.Set<java.lang.String>sequenceSet(java.lang.String number)Generate all the Candidate Sequence Sets, given the Phone Number.static PhoneLetterCombinationGeneratorStandard()Generate the Standard PhoneLetterCombinationGeneratorMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
PhoneLetterCombinationGenerator
public PhoneLetterCombinationGenerator(java.util.Map<java.lang.Character,char[]> digitCharacterMap) throws java.lang.ExceptionPhoneLetterCombinationGenerator Constructor- Parameters:
digitCharacterMap- The Digit To Character Array Map- Throws:
java.lang.Exception- Thrown if the Input is Invalid
-
-
Method Details
-
Standard
Generate the Standard PhoneLetterCombinationGenerator- Returns:
- The Standard PhoneLetterCombinationGenerator
-
digitCharacterMap
public java.util.Map<java.lang.Character,char[]> digitCharacterMap()Retrieve the Digit to Character Array Map- Returns:
- Digit to Character Array Map
-
candidateCharacterSet
public java.util.Set<java.lang.String> candidateCharacterSet(char digit, int count)Generate the Set of Candidate Characters from the specified Digit and its Count- Parameters:
digit- Digitcount- Count of the Digit- Returns:
- Set of Candidate Characters
-
sequenceSet
public java.util.Set<java.lang.String> sequenceSet(java.lang.String number)Generate all the Candidate Sequence Sets, given the Phone Number.- Parameters:
number- The Input Phone Number- Returns:
- The Candidate Sequence Sets
-