@Test void testPathLastSegments() { assertEquals("", WebDAVUtils.getLastSegment(emptyList())); assertEquals("foo", WebDAVUtils.getLastSegment(singletonList(asPathSegment("foo")))); assertEquals("bar", WebDAVUtils.getLastSegment(asList(asPathSegment("foo"), asPathSegment("bar")))); assertEquals("baz", WebDAVUtils.getLastSegment(asList(asPathSegment("foo"), asPathSegment("bar"), asPathSegment("baz")))); }
public static String getLastSegment(final List<PathSegment> segments) { if (segments.isEmpty()) { return ""; } return segments.get(segments.size() - 1).getPath(); }
WebDAVUtils { public static String getLastSegment(final List<PathSegment> segments) { if (segments.isEmpty()) { return ""; } return segments.get(segments.size() - 1).getPath(); } }
WebDAVUtils { public static String getLastSegment(final List<PathSegment> segments) { if (segments.isEmpty()) { return ""; } return segments.get(segments.size() - 1).getPath(); } private  WebDAVUtils(); }
WebDAVUtils { public static String getLastSegment(final List<PathSegment> segments) { if (segments.isEmpty()) { return ""; } return segments.get(segments.size() - 1).getPath(); } private  WebDAVUtils(); static void recursiveDelete(final ServiceBundler services, final Session session, final IRI identifier,
            final String baseUrl); static void closeDataset(final Dataset dataset); static CompletionStage<Void> recursiveCopy(final ServiceBundler services, final Session session,
            final IRI identifier, final IRI destination, final String baseUrl); static CompletionStage<Void> recursiveCopy(final ServiceBundler services, final Session session,
            final Resource resource, final IRI destination, final String baseUrl); static CompletionStage<Void> depth1Copy(final ServiceBundler services, final Session session,
            final Resource resource, final IRI destination, final String baseUrl); static CompletionStage<Void> copy(final ServiceBundler services, final Session session,
            final IRI identifier, final IRI destination, final String baseUrl); static CompletionStage<Void> copy(final ServiceBundler services, final Session session,
            final Resource resource, final IRI destination, final String baseUrl); static Function<Quad, Quad> skolemizeQuads(final ResourceService service, final String baseUrl); static String getLastSegment(final List<PathSegment> segments); static String getAllButLastSegment(final List<PathSegment> segments); static String externalUrl(final IRI identifier, final String baseUrl); }
WebDAVUtils { public static String getLastSegment(final List<PathSegment> segments) { if (segments.isEmpty()) { return ""; } return segments.get(segments.size() - 1).getPath(); } private  WebDAVUtils(); static void recursiveDelete(final ServiceBundler services, final Session session, final IRI identifier,
            final String baseUrl); static void closeDataset(final Dataset dataset); static CompletionStage<Void> recursiveCopy(final ServiceBundler services, final Session session,
            final IRI identifier, final IRI destination, final String baseUrl); static CompletionStage<Void> recursiveCopy(final ServiceBundler services, final Session session,
            final Resource resource, final IRI destination, final String baseUrl); static CompletionStage<Void> depth1Copy(final ServiceBundler services, final Session session,
            final Resource resource, final IRI destination, final String baseUrl); static CompletionStage<Void> copy(final ServiceBundler services, final Session session,
            final IRI identifier, final IRI destination, final String baseUrl); static CompletionStage<Void> copy(final ServiceBundler services, final Session session,
            final Resource resource, final IRI destination, final String baseUrl); static Function<Quad, Quad> skolemizeQuads(final ResourceService service, final String baseUrl); static String getLastSegment(final List<PathSegment> segments); static String getAllButLastSegment(final List<PathSegment> segments); static String externalUrl(final IRI identifier, final String baseUrl);  }