fiftyone.mobile.detection
Class LicenceKey

java.lang.Object
  extended by fiftyone.mobile.detection.LicenceKey

public class LicenceKey
extends Object

Class to hold and validate a 51Degrees.mobi Licence key.


Field Summary
private static String key
          String to hold the licence key.
 
Constructor Summary
LicenceKey()
           
 
Method Summary
static String getKey()
          Returns the license key held by this object, or null if no valid key has been set.
static void setKey(String licenceKey)
          Assigns the given license key to the License key object if it is a valid key.
private static boolean validate(String licenceKey)
          Method to validate a license key before it is added to the Object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

key

private static String key
String to hold the licence key.

Constructor Detail

LicenceKey

public LicenceKey()
Method Detail

setKey

public static void setKey(String licenceKey)
Assigns the given license key to the License key object if it is a valid key.

Parameters:
licenceKey - The license key to add to the collection.

getKey

public static String getKey()
Returns the license key held by this object, or null if no valid key has been set.

Returns:
The license key as a string.

validate

private static boolean validate(String licenceKey)
Method to validate a license key before it is added to the Object.

Parameters:
licenceKey - the License key to validate.
Returns:
true if valid, else false.