public boolean startsWith(FieldPath other) {
        if (other.size() > size()) {
            return false;
        }

        for (int i = 0; i < other.size(); i++) {
            if (!other.get(i).equals(get(i))) {
                return false;
            }
        }

        return true;
    }
Compares this field path with the given field path, returns true if the field path starts with the other.

@param other The field path to compare with.
@return Returns true if this field path starts with the other field path, otherwise false
document/src/main/java/com/yahoo/document/FieldPath.java