ThreeState (UserDefinedJsonSchemaConfiguration.Item item, BeforeAfter<String> beforeAfter) { if (!StringUtil.isEmptyOrSpaces(beforeAfter.getBefore()) && item.getPath().startsWith(beforeAfter.getBefore())) { return ThreeState.YES; } if (!StringUtil.isEmptyOrSpaces(beforeAfter.getAfter()) && item.getPath().endsWith(beforeAfter.getAfter())) { return ThreeState.YES; } return ThreeState.UNSURE; }