@Nullable public static IsisLevel intersection(IsisLevel... levels) { if (levels.length == 0) { return null; } IsisLevel overlap = LEVEL_1_2; for (IsisLevel level : levels) { overlap = intersection(overlap, level); } return overlap; }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + _level.ordinal(); return result; }
activeLevels = IsisLevel.union(activeLevels, IsisLevel.LEVEL_2); Queue<RouteAdvertisement<IsisRoute>> queue = remoteVr._isisIncomingRoutes.get(edge.reverse()); IsisLevel circuitType = edge.getCircuitType(); if (circuitType.includes(IsisLevel.LEVEL_1) && activeLevels.includes(IsisLevel.LEVEL_1)) { queueDelta(queue, correctedL1Delta); if (circuitType.includes(IsisLevel.LEVEL_2) && activeLevels.includes(IsisLevel.LEVEL_2)) { queueDelta(queue, correctedL2Delta); if (_vrf.getIsisProcess().getLevel1() != null
@Nullable private static IsisLevel processLevel(IsisProcess isisProcess) { return union( isisProcess.getLevel1() != null ? LEVEL_1 : null, isisProcess.getLevel2() != null ? LEVEL_2 : null); }
@Nullable private static IsisLevel interfaceSettingsLevel(IsisInterfaceSettings settings) { return union( settings.getLevel1() != null ? LEVEL_1 : null, settings.getLevel2() != null ? LEVEL_2 : null); }
@Test public void testIntersection() { assertThat(intersection(), nullValue()); assertThat(intersection(LEVEL_1), equalTo(LEVEL_1)); assertThat(intersection(LEVEL_1, LEVEL_2), nullValue()); assertThat(intersection(LEVEL_1, LEVEL_1_2), equalTo(LEVEL_1)); assertThat(intersection(LEVEL_1, LEVEL_1_2, LEVEL_2), nullValue()); assertThat(intersection(LEVEL_1, null), nullValue()); }
@Override public int hashCode() { return Objects.hash(_circuitType.ordinal(), _node1, _node2); }
intersection( processLevel(proc1), interfaceSettingsLevel(is1),
@Override public int hashCode() { return Objects.hash( _admin, _area, _attach, _down, _level.ordinal(), _metric, _network, _nextHopIp, getNonForwarding(), getNonRouting(), _overload, _protocol.ordinal(), _systemId); }