src/main/java/wyfs/util/Trie.java
private boolean match(Path.ID id, int idIndex, int myIndex, boolean submatch) {
		int mySize = depth + 1;
		if (myIndex == mySize && idIndex == id.size()) {
			return true;
		} else if(idIndex == id.size()) {
			return submatch;
		} else if (myIndex == mySize) {
			return false;
		}

		String myComponent = get(myIndex);
		if (myComponent.equals("*")) {
			return match(id, idIndex + 1, myIndex + 1, submatch);
		} else if (myComponent.equals("**")) {
			myIndex++;
			for (int i = idIndex; i <= id.size(); ++i) {
				if (match(id, i, myIndex, submatch)) {
					return true;
				}
			}
			return false;
		} else {
			return myComponent.equals(id.get(idIndex))
					&& match(id, idIndex + 1, myIndex + 1, submatch);
		}
	}
private boolean match(Path.ID id, int idIndex, int myIndex, boolean submatch) {
		int mySize = depth + 1;
		if (myIndex == mySize && idIndex == id.size()) {
			return true;
		} else if(idIndex == id.size()) {
			return submatch;
		} else if (myIndex == mySize) {
			return false;
		}

		String myComponent = get(myIndex);
		if (myComponent.equals("*")) {
			return match(id, idIndex + 1, myIndex + 1, submatch);
		} else if (myComponent.equals("**")) {
			myIndex++;
			for (int i = idIndex; i <= id.size(); ++i) {
				if (match(id, i, myIndex, submatch)) {
					return true;
				}
			}
			return false;
		} else {
			return myComponent.equals(id.get(idIndex))
					&& match(id, idIndex + 1, myIndex + 1, submatch);
		}
	}
private boolean match ( Path . ID id , int idIndex , int myIndex , boolean submatch ) { int mySize = depth + 1 ; if ( myIndex == mySize && idIndex == id . size ( ) ) { return true ; } else if ( idIndex == id . size ( ) ) { return submatch ; } else if ( myIndex == mySize ) { return false ; } String myComponent = get ( myIndex ) ; if ( myComponent . equals ( "*" ) ) { return match ( id , idIndex + 1 , myIndex + 1 , submatch ) ; } else if ( myComponent . equals ( "**" ) ) { myIndex ++ ; for ( int i = idIndex ; i <= id . size ( ) ; ++ i ) { if ( match ( id , i , myIndex , submatch ) ) { return true ; } } return false ; } else { return myComponent . equals ( id . get ( idIndex ) ) && match ( id , idIndex + 1 , myIndex + 1 , submatch ) ; } }
=========================================================
=========================================================