@Test public void testGetAllMembers() { assertThat( new InterfaceRangeMember("ge-0/0/0").getAllMembers(), equalTo(ImmutableList.of("ge-0/0/0"))); assertThat( new InterfaceRangeMember("ge-[0-1]/0/0").getAllMembers(), equalTo(ImmutableList.of("ge-0/0/0", "ge-1/0/0"))); assertThat( new InterfaceRangeMember("ge-0/[0-1]/0").getAllMembers(), equalTo(ImmutableList.of("ge-0/0/0", "ge-0/1/0"))); assertThat( new InterfaceRangeMember("ge-0/0/[0-1]").getAllMembers(), equalTo(ImmutableList.of("ge-0/0/0", "ge-0/0/1"))); }
List<String> getAllMembers() { List<String> retList = new LinkedList<>(); for (Integer fpc : InterfaceRangeMember.expandComponent(_fpc)) { for (Integer pic : InterfaceRangeMember.expandComponent(_pic)) { for (Integer port : InterfaceRangeMember.expandComponent(_port)) { retList.add(InterfaceRange.toInterfaceId(_type, fpc, pic, port)); } } } return retList; }
InterfaceRangeMember implements Serializable { List<String> getAllMembers() { List<String> retList = new LinkedList<>(); for (Integer fpc : InterfaceRangeMember.expandComponent(_fpc)) { for (Integer pic : InterfaceRangeMember.expandComponent(_pic)) { for (Integer port : InterfaceRangeMember.expandComponent(_port)) { retList.add(InterfaceRange.toInterfaceId(_type, fpc, pic, port)); } } } return retList; } }
InterfaceRangeMember implements Serializable { List<String> getAllMembers() { List<String> retList = new LinkedList<>(); for (Integer fpc : InterfaceRangeMember.expandComponent(_fpc)) { for (Integer pic : InterfaceRangeMember.expandComponent(_pic)) { for (Integer port : InterfaceRangeMember.expandComponent(_port)) { retList.add(InterfaceRange.toInterfaceId(_type, fpc, pic, port)); } } } return retList; } InterfaceRangeMember(String memberId); }
InterfaceRangeMember implements Serializable { List<String> getAllMembers() { List<String> retList = new LinkedList<>(); for (Integer fpc : InterfaceRangeMember.expandComponent(_fpc)) { for (Integer pic : InterfaceRangeMember.expandComponent(_pic)) { for (Integer port : InterfaceRangeMember.expandComponent(_port)) { retList.add(InterfaceRange.toInterfaceId(_type, fpc, pic, port)); } } } return retList; } InterfaceRangeMember(String memberId); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); }
InterfaceRangeMember implements Serializable { List<String> getAllMembers() { List<String> retList = new LinkedList<>(); for (Integer fpc : InterfaceRangeMember.expandComponent(_fpc)) { for (Integer pic : InterfaceRangeMember.expandComponent(_pic)) { for (Integer port : InterfaceRangeMember.expandComponent(_port)) { retList.add(InterfaceRange.toInterfaceId(_type, fpc, pic, port)); } } } return retList; } InterfaceRangeMember(String memberId); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }