/** * Get the type of the given objectId. * * @return GroupId.Type */ private Type getType(Object objectId) { String type = parseType(objectId); if(type.equals("self")) { return Type.self; } else if(type.equals("friends")) { return Type.friends; } else if(type.equals("all")) { return Type.all; } else if(objectId instanceof String && ((String)objectId).startsWith("@")) { // Could be a custom @ id, and it certainly is not an object id // return null we don't know the type return Type.custom; } else { return Type.objectId; } }
/** * Get the type of the given objectId. * * @return GroupId.Type */ private Type getType(Object objectId) { String type = parseType(objectId); if(type.equals("self")) { return Type.self; } else if(type.equals("friends")) { return Type.friends; } else if(type.equals("all")) { return Type.all; } else if(objectId instanceof String && ((String)objectId).startsWith("@")) { // Could be a custom @ id, and it certainly is not an object id // return null we don't know the type return Type.custom; } else { return Type.objectId; } }