public boolean match(Pattern pattern)
	{
		String[] patternArray = pattern.getPatternArray();
		// path and pattern must have the same number of entries.
		if (pathArray.length != patternArray.length) return false;
		// check respective path and pattern array, taking wild card into account.
		for (int i = 0; i < pathArray.length ; i++)
		{
			if (!patternArray[i].equals(Pattern.WILDCARD) && !pathArray[i].equals(patternArray[i])) return false;
		}
		// we ran through all entries, and no mismatches, so this is a match.
		return true;
	}