Interface HierarchicalRepository<T>

  • All Known Implementing Classes:
    HierarchicalObjectRepository

    public interface HierarchicalRepository<T>
    allows objects to be mapped against a regex pattern and held in order in a list
    • Method Detail

      • disableListeners

        void disableListeners()
      • enableListeners

        void enableListeners()
      • addMatch

        void addMatch​(String match,
                      T value)
        Add a new match to the repository
        Parameters:
        match - The regex to use to match against
        value - the value to hold against the match
      • addMatch

        void addMatch​(String match,
                      T value,
                      boolean immutableMatch)
      • getMatch

        T getMatch​(String match)
        return the value held against the nearest match
        Parameters:
        match - the match to look for
        Returns:
        the value
      • values

        List<T> values()
        Return a list of Values being added
        Returns:
      • setDefault

        void setDefault​(T defaultValue)
        set the default value to fallback to if none found
        Parameters:
        defaultValue - the value
      • getDefault

        T getDefault()
        Returns:
        the default match for this repo
      • removeMatch

        void removeMatch​(String match)
        remove a match from the repository
        Parameters:
        match - the match to remove
      • clear

        void clear()
        clear the repository
      • clearListeners

        void clearListeners()
        Removes all listeners.
      • clearCache

        void clearCache()
        Clears the cache.
      • getCacheSize

        int getCacheSize()
      • containsExactMatch

        boolean containsExactMatch​(String match)
      • containsExactWildcardMatch

        boolean containsExactWildcardMatch​(String match)