boolean (Object value) { if (k1 != null) { if (Objects.equals(v1, value)) return true; if (k2 != null) { if (Objects.equals(v2, value)) return true; if (k3 != null) { if (Objects.equals(v3, value)) return true; } } } for (int i = 0; i < data.length; i += 2) { if (data[i] != null && Objects.equals(data[i + 1], value)) return true; } return false; }