Interface Mustache.Collector

    • Method Detail

      • toIterator

        java.util.Iterator<?> toIterator​(java.lang.Object value)
        Returns an iterator that can iterate over the supplied value, or null if the value is not a collection.
      • createFetcher

        Mustache.VariableFetcher createFetcher​(java.lang.Object ctx,
                                               java.lang.String name)
        Creates a fetcher for a so-named variable in the supplied context object, which will never be null. The fetcher will be cached and reused for future contexts for which octx.getClass().equals(nctx.getClass().
      • createFetcherCache

        <K,​V> java.util.Map<K,​V> createFetcherCache()
        Creates a map to be used to cache Mustache.VariableFetcher instances. The GWT-compatible collector returns a HashMap here, but the reflection based fetcher (which only works on the JVM and Android, returns a concurrent hashmap.