boolean (@Nullable String text) { if (text == null) return false; int index = 0; while (true) { int index1 = text.indexOf('.', index); if (index1 < 0) index1 = text.length(); if (!isIdentifier(text.substring(index, index1))) return false; if (index1 == text.length()) return true; index = index1 + 1; } }