IProperty (@NotNull IProperty property) { List<IProperty> properties = getProperties(); if (properties.isEmpty()) return null; if (PropertiesImplUtil.isAlphaSorted(properties)) { final int insertIndex = Collections.binarySearch(getProperties(), property, (p1, p2) -> { final String k1 = p1.getKey(); final String k2 = p2.getKey(); LOG.assertTrue(k1 != null && k2 != null); return String.CASE_INSENSITIVE_ORDER.compare(k1, k2); }); return insertIndex == -1 ? null : getProperties().get(insertIndex < 0 ? -insertIndex - 2 : insertIndex); } return ContainerUtil.getLastItem(properties); }