Class MemoryStyleSource

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.Map<java.lang.String,​java.util.Map<java.lang.String,​java.lang.String>> backing  
      private static java.util.logging.Logger log  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void clear()
      Clear all styles.
      java.lang.String get​(java.lang.String group, java.lang.String name)
      Returns the appropriate style for the given style-group and style-name, or null if missing.
      java.lang.Iterable<java.lang.String> groups()
      Returns configured style-group names.
      void remove​(java.lang.String group)
      Remove all styles for given style-group.
      void remove​(java.lang.String group, java.lang.String name)
      Remove a specific style from style-group.
      void set​(java.lang.String group, java.lang.String name, java.lang.String style)
      Set a specific style in a style-group.
      java.util.Map<java.lang.String,​java.lang.String> styles​(java.lang.String group)
      Returns configured styles for given style-group.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • log

        private static final java.util.logging.Logger log
      • backing

        private final java.util.Map<java.lang.String,​java.util.Map<java.lang.String,​java.lang.String>> backing
    • Constructor Detail

      • MemoryStyleSource

        public MemoryStyleSource()
    • Method Detail

      • get

        @Nullable
        public java.lang.String get​(java.lang.String group,
                                    java.lang.String name)
        Description copied from interface: StyleSource
        Returns the appropriate style for the given style-group and style-name, or null if missing.
        Specified by:
        get in interface StyleSource
        Parameters:
        group - the group
        name - the style name
        Returns:
        the style
      • set

        public void set​(java.lang.String group,
                        java.lang.String name,
                        java.lang.String style)
        Description copied from interface: StyleSource
        Set a specific style in a style-group.
        Specified by:
        set in interface StyleSource
        Parameters:
        group - the group
        name - the style name
        style - the style to set
      • remove

        public void remove​(java.lang.String group)
        Description copied from interface: StyleSource
        Remove all styles for given style-group.
        Specified by:
        remove in interface StyleSource
        Parameters:
        group - the group
      • remove

        public void remove​(java.lang.String group,
                           java.lang.String name)
        Description copied from interface: StyleSource
        Remove a specific style from style-group.
        Specified by:
        remove in interface StyleSource
        Parameters:
        group - the group
        name - the style name to remove
      • clear

        public void clear()
        Description copied from interface: StyleSource
        Clear all styles.
        Specified by:
        clear in interface StyleSource
      • groups

        public java.lang.Iterable<java.lang.String> groups()
        Description copied from interface: StyleSource
        Returns configured style-group names.
        Specified by:
        groups in interface StyleSource
        Returns:
        Immutable collection.
      • styles

        public java.util.Map<java.lang.String,​java.lang.String> styles​(java.lang.String group)
        Description copied from interface: StyleSource
        Returns configured styles for given style-group.
        Specified by:
        styles in interface StyleSource
        Parameters:
        group - the style group
        Returns:
        Immutable map.