org.eclipse.edje/src/main/java/org/eclipse/edje/PeripheralManagerPermission.java
private boolean match(String constraint, String value) {
		if (constraint.equals(value)) {
			return true;
		}
		int wildcardOffset = constraint.indexOf('*');
		if (wildcardOffset == -1) {
			// they are not equals, and there's no wildcard in the constraint
			return false;
		}
		int otherWildcardOffset = constraint.indexOf('*', wildcardOffset + 1);
		if (otherWildcardOffset != -1) {
			throw new IllegalArgumentException("Illegal constraint format: " + constraint);
		}
		// same prefix ?
		if (!value.regionMatches(0, constraint, 0, wildcardOffset)) {
			return false;
		}
		int suffixLen = constraint.length() - wildcardOffset - 1;

		return value.regionMatches(value.length() - suffixLen, constraint, wildcardOffset + 1, suffixLen);
	}
/**
	 * Checks whether the specified value matches the specified constraint. The
	 * constraint may contain:
	 * <li>an optional prefix string
	 * <li>an option wildcard character ('*')
	 * <li>an optional suffix string
	 *
	 * @param constraint
	 *            the constraint to match with
	 * @param value
	 *            he string to compare to the constraint
	 * @return
	 */
Checks whether the specified value matches the specified constraint. The
constraint may contain:
an optional prefix string
an option wildcard character ('*')
an optional suffix string

@param constraint
the constraint to match with
@param value
he string to compare to the constraint
@return
Checks whether the specified value matches the specified constraint . The constraint may contain : an optional prefix string an option wildcard character ( ' * ' ) an optional suffix string @param constraint the constraint to match with @param value he string to compare to the constraint @return
private boolean match(String constraint, String value) {
		if (constraint.equals(value)) {
			return true;
		}
		int wildcardOffset = constraint.indexOf('*');
		if (wildcardOffset == -1) {
			return false;
		}
		int otherWildcardOffset = constraint.indexOf('*', wildcardOffset + 1);
		if (otherWildcardOffset != -1) {
			throw new IllegalArgumentException("Illegal constraint format: " + constraint);
		}
		if (!value.regionMatches(0, constraint, 0, wildcardOffset)) {
			return false;
		}
		int suffixLen = constraint.length() - wildcardOffset - 1;
		return value.regionMatches(value.length() - suffixLen, constraint, wildcardOffset + 1, suffixLen);
	}
private boolean match ( String constraint , String value ) { if ( constraint . equals ( value ) ) { return true ; } int wildcardOffset = constraint . indexOf ( '*' ) ; if ( wildcardOffset == - 1 ) { return false ; } int otherWildcardOffset = constraint . indexOf ( '*' , wildcardOffset + 1 ) ; if ( otherWildcardOffset != - 1 ) { throw new IllegalArgumentException ( "Illegal constraint format: " + constraint ) ; } if ( ! value . regionMatches ( 0 , constraint , 0 , wildcardOffset ) ) { return false ; } int suffixLen = constraint . length ( ) - wildcardOffset - 1 ; return value . regionMatches ( value . length ( ) - suffixLen , constraint , wildcardOffset + 1 , suffixLen ) ; }
Checks whether the specified value matches the specified constraint.
Checks whether the specified value matches the specified constraint .
// they are not equals, and there's no wildcard in the constraint // same prefix ?