@Test void should_get_level_from_priority() { assertThat(PmdLevelUtils.toLevel(BLOCKER)).isEqualTo(1); assertThat(PmdLevelUtils.toLevel(CRITICAL)).isEqualTo(2); assertThat(PmdLevelUtils.toLevel(MAJOR)).isEqualTo(3); assertThat(PmdLevelUtils.toLevel(MINOR)).isEqualTo(4); assertThat(PmdLevelUtils.toLevel(INFO)).isEqualTo(5); }
public static Integer toLevel(RulePriority priority) { return Math.abs(priority.ordinal() - INDEX_LEVEL); }
PmdLevelUtils { public static Integer toLevel(RulePriority priority) { return Math.abs(priority.ordinal() - INDEX_LEVEL); } }
PmdLevelUtils { public static Integer toLevel(RulePriority priority) { return Math.abs(priority.ordinal() - INDEX_LEVEL); } private  PmdLevelUtils(); }
PmdLevelUtils { public static Integer toLevel(RulePriority priority) { return Math.abs(priority.ordinal() - INDEX_LEVEL); } private  PmdLevelUtils(); static RulePriority fromLevel(@Nullable Integer level); static Integer toLevel(RulePriority priority); }
PmdLevelUtils { public static Integer toLevel(RulePriority priority) { return Math.abs(priority.ordinal() - INDEX_LEVEL); } private  PmdLevelUtils(); static RulePriority fromLevel(@Nullable Integer level); static Integer toLevel(RulePriority priority);  }