Codota Logo
PathAwareFinder
Code IndexAdd Codota to your IDE (free)

How to use
PathAwareFinder
in
it.tidalwave.bluemarine2.model.finder

Best Java code snippets using it.tidalwave.bluemarine2.model.finder.PathAwareFinder (Showing top 4 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
SimpleDateFormat s =
  • Codota IconString pattern;new SimpleDateFormat(pattern)
  • Codota IconString template;Locale locale;new SimpleDateFormat(template, locale)
  • Codota Iconnew SimpleDateFormat()
  • Smart code suggestions by Codota
}
origin: it.tidalwave.bluemarine2/it-tidalwave-bluemarine2-model

/*******************************************************************************************************************
 *
 * @param   entity
 * @param   path    the path
 * @return          the entity, if present
 *
 ******************************************************************************************************************/
@Nonnull
private static Optional<PathAwareEntity> childMatchingPath (final @Nonnull PathAwareEntity entity,
                              final @Nonnull Path path)
 {
  return ((PathAwareFinder)asSimpleComposite(entity).findChildren()).withPath(path).optionalResult();
 }
origin: it.tidalwave.bluemarine2/it-tidalwave-bluemarine2-model

 /*******************************************************************************************************************
  *
  * Constrains the search to the entity with the given path.
  *
  * @param       path    the path
  * @return              the {@code Finder}
  *
  ******************************************************************************************************************/
 @Nonnull
 public default PathAwareFinder withPath (@Nonnull String path)
  {
   return withPath(Paths.get(path));
  }
}
origin: it.tidalwave.bluemarine2/it-tidalwave-bluemarine2-mediaserver

 @Test
 public void must_return_correct_root_children()
  throws Exception
  {
   // when
   final List<? extends Entity> children = underTest.findRoot().findChildren().results();
   // then
   assertThat(children.size(), is(4));
   assertThat(children.get(0).as(Displayable).getDisplayName(), is("Music"));
   assertThat(children.get(1).as(Displayable).getDisplayName(), is("Photos"));
   assertThat(children.get(2).as(Displayable).getDisplayName(), is("Videos"));
   assertThat(children.get(3).as(Displayable).getDisplayName(), is("Services"));
   // TODO: mock music and services, assert contents
  }
}
origin: it.tidalwave.bluemarine2/it-tidalwave-bluemarine2-upnp-mediaserver

final Entity entity = contentDirectory.findRoot()
                   .findChildren()
                   .withPath(path)
                   .optionalResult()
                   .orElseThrow(() ->
                       new ContentDirectoryException(NO_SUCH_OBJECT,
it.tidalwave.bluemarine2.model.finderPathAwareFinder

Most used methods

  • optionalResult
  • withPath
  • results

Popular in Java

  • Creating JSON documents from java classes using gson
  • findViewById (Activity)
  • putExtra (Intent)
  • onCreateOptionsMenu (Activity)
  • Menu (java.awt)
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Timer (java.util)
    A facility for threads to schedule tasks for future execution in a background thread. Tasks may be s
  • ConcurrentHashMap (java.util.concurrent)
    A hash table supporting full concurrency of retrievals and adjustable expected concurrency for updat
  • JComboBox (javax.swing)
  • Logger (org.slf4j)
    The main user interface to logging. It is expected that logging takes place through concrete impleme
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now