Class PListParser.Dict
- java.lang.Object
-
- com.github.markusbernhardt.proxy.util.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 voiddump()Dumps a dictionary with all sub-nodes to the console.private static voiddumpInternal(PListParser.Dict plist, int indent)java.lang.Objectget(java.lang.String key)java.lang.ObjectgetAtPath(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()iteratorintsize()
-
-
-
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:
iteratorin interfacejava.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.
-
-