|
Brooklyn | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbrooklyn.util.collections.Jsonya.Navigator
@SuppressWarnings({"rawtypes","unchecked"}) public static class Jsonya.Navigator
Field Summary | |
---|---|
protected Function |
creationInPreviousFocus
|
protected java.lang.Object |
focus
|
protected java.lang.Class |
mapType
|
protected java.lang.Object |
root
|
Constructor Summary | |
Jsonya.Navigator(java.lang.Object backingStore, java.lang.Class mapType)
|
Method Summary | |
---|---|
Navigator
|
add(java.lang.Object o1, java.lang.Object... others)
adds the given arguments to a list at this point (will not descend into maps, and will not flatten lists) |
protected static void
|
addFlattened(java.util.Collection target, java.lang.Object item)
|
protected static void
|
addInternal(java.lang.Object initialFocus, java.lang.Object currentFocus, java.lang.Object o1, java.lang.Object... others)
|
Navigator
|
addUnflattened(java.lang.Object o1, java.lang.Object... others)
|
Navigator
|
at(java.lang.Object pathSegment, java.lang.Object... furtherPathSegments)
returns the navigator focussed at the indicated key sequence in the given map |
Navigator
|
atArray(java.lang.Object[] furtherPathSegments)
|
protected Navigator
|
down(java.lang.Object pathSegment)
utility for at(Object, Object...), taking one argument at a time |
protected Navigator
|
downList(java.lang.Object pathSegment)
|
protected Navigator
|
downMap(java.lang.Object pathSegment)
|
java.lang.Object
|
get()
returns the object at the focus, or null if none |
java.lang.Object
|
get(java.lang.Class type)
returns the object at the focus, casted to the given type, null if none |
java.lang.Object
|
get(java.lang.Object pathSegment, java.lang.Object... furtherPathSegments)
|
java.lang.Object
|
getFocusMap()
returns a java.util.Map at the given focus, creating if needed (so never null), throwing if it exists already and is not a map |
java.lang.Object
|
getRoot()
returns the object at the root |
java.lang.Object
|
getRootMap()
returns the java.util.Map at the root, throwing if root is not a map |
Navigator
|
list()
ensures the given focus is a list |
Navigator
|
map()
ensures the given focus is a map, creating if needed (and creating inside the list if it is in a list) |
protected java.util.List
|
newList()
|
protected java.util.Map
|
newMap()
|
Navigator
|
put(java.lang.Object k1, java.lang.Object v1, java.lang.Object... kvOthers)
puts the given key-value pair at the current focus (or multiple such), creating a map if needed, replacing any values stored against keys supplied here; if you wish to merge deep maps, see add(Object, Object...) |
Navigator
|
put(java.util.Map map)
as put(Object, Object, Object...) for the kv-pairs in the given map |
protected static void
|
putInternal(java.util.Map target, java.lang.Object k1, java.lang.Object v1, java.lang.Object... kvOthers)
|
Navigator
|
root()
|
Methods inherited from class java.lang.Object | |
---|---|
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Field Detail |
---|
protected Function creationInPreviousFocus
protected java.lang.Object focus
protected final java.lang.Class mapType
protected final java.lang.Object root
Constructor Detail |
---|
public Jsonya.Navigator(java.lang.Object backingStore, java.lang.Class mapType)
Method Detail |
---|
public Navigator add(java.lang.Object o1, java.lang.Object... others)
protected static void addFlattened(java.util.Collection target, java.lang.Object item)
protected static void addInternal(java.lang.Object initialFocus, java.lang.Object currentFocus, java.lang.Object o1, java.lang.Object... others)
public Navigator addUnflattened(java.lang.Object o1, java.lang.Object... others)
public Navigator at(java.lang.Object pathSegment, java.lang.Object... furtherPathSegments)
public Navigator atArray(java.lang.Object[] furtherPathSegments)
protected Navigator down(java.lang.Object pathSegment)
protected Navigator downList(java.lang.Object pathSegment)
protected Navigator downMap(java.lang.Object pathSegment)
public java.lang.Object get()
public java.lang.Object get(java.lang.Class type)
public java.lang.Object get(java.lang.Object pathSegment, java.lang.Object... furtherPathSegments)
public java.lang.Object getFocusMap()
public java.lang.Object getRoot()
public java.lang.Object getRootMap()
public Navigator list()
public Navigator map()
protected java.util.List newList()
protected java.util.Map newMap()
public Navigator put(java.lang.Object k1, java.lang.Object v1, java.lang.Object... kvOthers)
public Navigator put(java.util.Map map)
protected static void putInternal(java.util.Map target, java.lang.Object k1, java.lang.Object v1, java.lang.Object... kvOthers)
public Navigator root()
Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.