@Override public Set<StaticIPInfo> apply(HttpResponse response) { String text = returnStringIf200.apply(response); if (text == null || text.trim().equals("")) return ImmutableSet.<StaticIPInfo> of(); return ImmutableSet.copyOf(Iterables.transform(mapConverter.apply(text), mapToProfile)); } }
public void testNew() throws IOException { Map<String, String> input = new ListOfKeyValuesDelimitedByBlankLinesToListOfMaps().apply( Strings2.toStringAndClose(MapToServerInfoTest.class.getResourceAsStream("/new_server.txt"))).get(0); assertEquals(MAP_TO_DRIVE.apply(input), NEW); } }
public void test() throws IOException { Map<String, String> input = new ListOfKeyValuesDelimitedByBlankLinesToListOfMaps().apply( Strings2.toStringAndClose(MapToVLANInfoTest.class.getResourceAsStream("/vlan.txt"))).get(0); assertEquals(MAP_TO_VLAN.apply(input), ONE); } }
@Override public Set<ProfileInfo> apply(HttpResponse response) { String text = returnStringIf200.apply(response); if (text == null || text.trim().equals("")) return ImmutableSet.<ProfileInfo> of(); return ImmutableSet.copyOf(Iterables.transform(mapConverter.apply(text), mapToProfile)); } }
public void testComplete() throws IOException { Map<String, String> input = new ListOfKeyValuesDelimitedByBlankLinesToListOfMaps().apply( Strings2.toStringAndClose(MapToServerInfoTest.class.getResourceAsStream("/servers.txt"))).get(0); assertEquals(MAP_TO_DRIVE.apply(input), ONE); }
@Override public Set<DriveInfo> apply(HttpResponse response) { String text = returnStringIf200.apply(response); if (text == null || text.trim().equals("")) return ImmutableSet.<DriveInfo> of(); return ImmutableSet.copyOf(Iterables.transform(mapConverter.apply(text), mapToDrive)); } }
public void testComplete() throws IOException { Map<String, String> input = new ListOfKeyValuesDelimitedByBlankLinesToListOfMaps().apply( Strings2.toStringAndClose(MapToDriveInfoTest.class.getResourceAsStream("/drive.txt"))).get(0); assertEquals(MAP_TO_DRIVE.apply(input), ONE); } }
@Override public Set<ProfileInfo> apply(HttpResponse response) { String text = returnStringIf200.apply(response); if (text == null || text.trim().equals("")) return ImmutableSet.<ProfileInfo> of(); return ImmutableSet.copyOf(Iterables.transform(mapConverter.apply(text), mapToProfile)); } }
public void test() throws IOException { Map<String, String> input = new ListOfKeyValuesDelimitedByBlankLinesToListOfMaps().apply( Strings2.toStringAndClose(MapToProfileInfoTest.class.getResourceAsStream("/profile.txt"))).get(0); assertEquals(MAP_TO_PROFILE.apply(input), ONE); } }
@Override public Set<ServerInfo> apply(HttpResponse response) { String text = returnStringIf200.apply(response); if (text == null || text.trim().equals("")) return ImmutableSet.<ServerInfo> of(); return ImmutableSet.copyOf(Iterables.transform(mapConverter.apply(text), mapToServer)); } }
@Override public Set<VLANInfo> apply(HttpResponse response) { String text = returnStringIf200.apply(response); if (text == null || text.trim().equals("")) return ImmutableSet.<VLANInfo> of(); return ImmutableSet.copyOf(Iterables.transform(mapConverter.apply(text), mapToProfile)); } }
@Override public Set<ProfileInfo> apply(HttpResponse response) { String text = returnStringIf200.apply(response); if (text == null || text.trim().equals("")) return ImmutableSet.<ProfileInfo> of(); return ImmutableSet.copyOf(Iterables.transform(mapConverter.apply(text), mapToProfile)); } }
@Override public Set<DriveInfo> apply(HttpResponse response) { String text = returnStringIf200.apply(response); if (text == null || text.trim().equals("")) return ImmutableSet.<DriveInfo> of(); return ImmutableSet.copyOf(Iterables.transform(mapConverter.apply(text), mapToDrive)); } }
@Override public Set<VLANInfo> apply(HttpResponse response) { String text = returnStringIf200.apply(response); if (text == null || text.trim().equals("")) return ImmutableSet.<VLANInfo> of(); return ImmutableSet.copyOf(Iterables.transform(mapConverter.apply(text), mapToProfile)); } }
@Override public Set<StaticIPInfo> apply(HttpResponse response) { String text = returnStringIf200.apply(response); if (text == null || text.trim().equals("")) return ImmutableSet.<StaticIPInfo> of(); return ImmutableSet.copyOf(Iterables.transform(mapConverter.apply(text), mapToProfile)); } }
@Override public Set<VLANInfo> apply(HttpResponse response) { String text = returnStringIf200.apply(response); if (text == null || text.trim().equals("")) return ImmutableSet.<VLANInfo> of(); return ImmutableSet.copyOf(Iterables.transform(mapConverter.apply(text), mapToProfile)); } }
@Override public Set<DriveInfo> apply(HttpResponse response) { String text = returnStringIf200.apply(response); if (text == null || text.trim().equals("")) return ImmutableSet.<DriveInfo> of(); return ImmutableSet.copyOf(Iterables.transform(mapConverter.apply(text), mapToDrive)); } }
@Override public Set<ServerInfo> apply(HttpResponse response) { String text = returnStringIf200.apply(response); if (text == null || text.trim().equals("")) return ImmutableSet.<ServerInfo> of(); return ImmutableSet.copyOf(Iterables.transform(mapConverter.apply(text), mapToServer)); } }
@Override public Set<StaticIPInfo> apply(HttpResponse response) { String text = returnStringIf200.apply(response); if (text == null || text.trim().equals("")) return ImmutableSet.<StaticIPInfo> of(); return ImmutableSet.copyOf(Iterables.transform(mapConverter.apply(text), mapToProfile)); } }
@Override public Set<ServerInfo> apply(HttpResponse response) { String text = returnStringIf200.apply(response); if (text == null || text.trim().equals("")) return ImmutableSet.<ServerInfo> of(); return ImmutableSet.copyOf(Iterables.transform(mapConverter.apply(text), mapToServer)); } }