java.lang.Object
com.samskivert.mustache.BasicCollector
- All Implemented Interfaces:
Mustache.Collector
- Direct Known Subclasses:
DefaultCollector
A collector that does not use reflection and can be used with GWT.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateFetcher(Object ctx, String name) Creates a fetcher for a so-named variable in the supplied context object, which will never be null.abstract <K,V> Map<K, V> This should return a thread-safe map, eitherCollections.synchronizedMap(java.util.Map<K, V>)called on a standardMapimplementation or something likeConcurrentHashMap.Iterator<?>toIterator(Object value) Returns an iterator that can iterate over the supplied value, or null if the value is not a collection.
-
Constructor Details
-
BasicCollector
public BasicCollector()
-
-
Method Details
-
toIterator
Description copied from interface:Mustache.CollectorReturns an iterator that can iterate over the supplied value, or null if the value is not a collection.- Specified by:
toIteratorin interfaceMustache.Collector
-
createFetcher
Description copied from interface:Mustache.CollectorCreates 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 whichoctx.getClass().equals(nctx.getClass().- Specified by:
createFetcherin interfaceMustache.Collector
-
createFetcherCache
This should return a thread-safe map, eitherCollections.synchronizedMap(java.util.Map<K, V>)called on a standardMapimplementation or something likeConcurrentHashMap.- Specified by:
createFetcherCachein interfaceMustache.Collector
-