org.osgi.util.gsm
Class IMEICondition
java.lang.Object
org.osgi.util.gsm.IMEICondition
public class IMEICondition
- extends Object
Class representing an IMEI condition. Instances of this class contain a
string value that is matched against the IMEI of the device.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
getCondition
public static Condition getCondition(Bundle bundle,
ConditionInfo conditionInfo)
- Creates an IMEICondition object.
- Parameters:
bundle
- ignored, as the IMEI number is the property of the mobile device,
and thus the same for all bundles.conditionInfo
- contains the IMEI value to match the device's IMEI against. Its
ConditionInfo.getArgs()
method should return a String array with one value, the
IMEI string. The IMEI is 15 digits without hypens. Limited pattern matching is allowed,
then the string is 0 to 14 digits, followed by an asterisk(*
).
- Returns:
- An IMEICondition object, that can tell whether its IMEI number matches that of the device.
If the number contains an asterisk(
*
), then the beginning
of the imei is compared to the pattern.
- Throws:
NullPointerException
- if one of the parameters is null
.
IllegalArgumentException
- if the IMEI is not a string of 15 digits, or
0 to 14 digits with an *
at the end.
Copyright © 2006-2011 OSGi Alliance. All Rights Reserved.