@Test public void testGetAllMembers() { assertThat( new InterfaceRangeMemberRange("ge-0/0/0", "ge-0/0/0").getAllMembers(), equalTo(ImmutableList.of("ge-0/0/0"))); assertThat( new InterfaceRangeMemberRange("ge-0/0/0", "ge-0/0/2").getAllMembers(), equalTo(ImmutableList.of("ge-0/0/0", "ge-0/0/1", "ge-0/0/2"))); assertThat( new InterfaceRangeMemberRange("ge-0/0/0", "ge-0/2/0").getAllMembers(), equalTo(ImmutableList.of("ge-0/0/0", "ge-0/1/0", "ge-0/2/0"))); assertThat( new InterfaceRangeMemberRange("ge-0/0/0", "ge-2/0/0").getAllMembers(), equalTo(ImmutableList.of("ge-0/0/0", "ge-1/0/0", "ge-2/0/0"))); }
public List<String> getAllMembers() { List<String> retList = new LinkedList<>(); for (int fpc = _fromInterface._fpc; fpc <= _toInterface._fpc; fpc++) { for (int pic = _fromInterface._pic; pic <= _toInterface._pic; pic++) { for (int port = _fromInterface._port; port <= _toInterface._port; port++) { retList.add(toInterfaceId(_fromInterface._type, fpc, pic, port)); } } } return retList; }
InterfaceRangeMemberRange implements Serializable { public List<String> getAllMembers() { List<String> retList = new LinkedList<>(); for (int fpc = _fromInterface._fpc; fpc <= _toInterface._fpc; fpc++) { for (int pic = _fromInterface._pic; pic <= _toInterface._pic; pic++) { for (int port = _fromInterface._port; port <= _toInterface._port; port++) { retList.add(toInterfaceId(_fromInterface._type, fpc, pic, port)); } } } return retList; } }
InterfaceRangeMemberRange implements Serializable { public List<String> getAllMembers() { List<String> retList = new LinkedList<>(); for (int fpc = _fromInterface._fpc; fpc <= _toInterface._fpc; fpc++) { for (int pic = _fromInterface._pic; pic <= _toInterface._pic; pic++) { for (int port = _fromInterface._port; port <= _toInterface._port; port++) { retList.add(toInterfaceId(_fromInterface._type, fpc, pic, port)); } } } return retList; } InterfaceRangeMemberRange(String fromInterfaceId, String toInterface); }
InterfaceRangeMemberRange implements Serializable { public List<String> getAllMembers() { List<String> retList = new LinkedList<>(); for (int fpc = _fromInterface._fpc; fpc <= _toInterface._fpc; fpc++) { for (int pic = _fromInterface._pic; pic <= _toInterface._pic; pic++) { for (int port = _fromInterface._port; port <= _toInterface._port; port++) { retList.add(toInterfaceId(_fromInterface._type, fpc, pic, port)); } } } return retList; } InterfaceRangeMemberRange(String fromInterfaceId, String toInterface); List<String> getAllMembers(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); @Nonnull InterfaceComponents getFromInterface(); @Nonnull InterfaceComponents getToInterface(); }
InterfaceRangeMemberRange implements Serializable { public List<String> getAllMembers() { List<String> retList = new LinkedList<>(); for (int fpc = _fromInterface._fpc; fpc <= _toInterface._fpc; fpc++) { for (int pic = _fromInterface._pic; pic <= _toInterface._pic; pic++) { for (int port = _fromInterface._port; port <= _toInterface._port; port++) { retList.add(toInterfaceId(_fromInterface._type, fpc, pic, port)); } } } return retList; } InterfaceRangeMemberRange(String fromInterfaceId, String toInterface); List<String> getAllMembers(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); @Nonnull InterfaceComponents getFromInterface(); @Nonnull InterfaceComponents getToInterface();  }