Class PListParser.Dict

  • All Implemented Interfaces:
    java.lang.Iterable<java.util.Map.Entry<java.lang.String,​java.lang.Object>>
    Enclosing class:
    PListParser

    public static class PListParser.Dict
    extends java.lang.Object
    implements java.lang.Iterable<java.util.Map.Entry<java.lang.String,​java.lang.Object>>
    Small helper class representing a tree node.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.Map<java.lang.String,​java.lang.Object> children  
    • Constructor Summary

      Constructors 
      Constructor Description
      Dict()
      Constructor
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void dump()
      Dumps a dictionary with all sub-nodes to the console.
      private static void dumpInternal​(PListParser.Dict plist, int indent)  
      java.lang.Object get​(java.lang.String key)  
      java.lang.Object getAtPath​(java.lang.String path)
      Get a node at a given path.
      java.util.Iterator<java.util.Map.Entry<java.lang.String,​java.lang.Object>> iterator()
      iterator
      int size()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
    • Field Detail

      • children

        private java.util.Map<java.lang.String,​java.lang.Object> children
    • Constructor Detail

      • Dict

        public Dict()
        Constructor
    • Method Detail

      • get

        public java.lang.Object get​(java.lang.String key)
        Parameters:
        key - of the child node.
        Returns:
        the child node, null if not existing.
      • iterator

        public java.util.Iterator<java.util.Map.Entry<java.lang.String,​java.lang.Object>> iterator()
        iterator
        Specified by:
        iterator in interface java.lang.Iterable<java.util.Map.Entry<java.lang.String,​java.lang.Object>>
        See Also:
        Iterable.iterator()
      • size

        public int size()
        Returns:
        the size of this dictionary.
      • dump

        public void dump()
        Dumps a dictionary with all sub-nodes to the console.
      • dumpInternal

        private static void dumpInternal​(PListParser.Dict plist,
                                         int indent)
        Parameters:
        plist -
        indent -
      • getAtPath

        public java.lang.Object getAtPath​(java.lang.String path)
        Get a node at a given path.
        Parameters:
        path - a / separated path into the plist hirarchy.
        Returns:
        the object located at the given path, null if it does not exist.