|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.splunk.Resource com.splunk.ResourceCollection<T>
T
- The type of members of the collection.public class ResourceCollection<T extends Resource>
The ResourceCollection
abstract base class represents a collection of
Splunk resources.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface java.util.Map |
---|
java.util.Map.Entry<K,V> |
Field Summary | |
---|---|
protected java.lang.Class |
itemClass
|
protected java.util.LinkedHashMap<java.lang.String,java.util.LinkedList<T>> |
items
|
Fields inherited from class com.splunk.Resource |
---|
actions, path, refreshArgs, service, title |
Method Summary | |
---|---|
void |
clear()
|
boolean |
containsKey(java.lang.Object key)
|
boolean |
containsKey(java.lang.Object key,
Args namespace)
Determines whether a scoped, namespace-constrained key exists within this collection. |
boolean |
containsValue(java.lang.Object value)
|
protected T |
createItem(AtomEntry entry)
Creates a collection member corresponding to a given Atom entry. |
protected T |
createItem(java.lang.Class itemClass,
java.lang.String path,
Args namespace)
Creates a collection member. |
java.util.Set<java.util.Map.Entry<java.lang.String,T>> |
entrySet()
|
boolean |
equals(java.lang.Object o)
|
T |
get(java.lang.Object key)
Gets the value of a given key, if it exists within this collection. |
T |
get(java.lang.Object key,
Args namespace)
Gets a the value of a scoped, namespace-constrained key, if it exists within this collection. |
int |
hashCode()
|
boolean |
isEmpty()
|
protected java.lang.String |
itemKey(AtomEntry entry)
Returns the value to use as the key from a given Atom entry. |
protected java.lang.String |
itemPath(AtomEntry entry)
Returns the value to use as the member's path from a given Atom entry. |
java.util.Set<java.lang.String> |
keySet()
|
ResponseMessage |
list()
Issues an HTTP request to list the contents of the collection resource. |
T |
put(java.lang.String key,
T value)
|
void |
putAll(java.util.Map<? extends java.lang.String,? extends T> map)
Copies all mappings from a given map to this map (unsupported). |
ResourceCollection |
refresh()
Refreshes the local state of this resource. |
T |
remove(java.lang.Object key)
|
int |
size()
|
ResourceCollection<T> |
validate()
Ensures that the local state of the resource is current, calling refresh if necessary. |
java.util.Collection<T> |
values()
|
int |
valueSize(java.lang.Object key)
Returns the number of values that a specific key represents. |
Methods inherited from class com.splunk.Resource |
---|
getName, getPath, getService, getTitle, invalidate |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.LinkedHashMap<java.lang.String,java.util.LinkedList<T extends Resource>> items
protected java.lang.Class itemClass
Method Detail |
---|
public void clear()
clear
in interface java.util.Map<java.lang.String,T extends Resource>
public boolean containsKey(java.lang.Object key)
containsKey
in interface java.util.Map<java.lang.String,T extends Resource>
public boolean containsKey(java.lang.Object key, Args namespace)
key
- The key to look up.namespace
- The namespace to constrain the search to.
true
if the key exists, false
if not.public boolean containsValue(java.lang.Object value)
containsValue
in interface java.util.Map<java.lang.String,T extends Resource>
protected T createItem(java.lang.Class itemClass, java.lang.String path, Args namespace)
itemClass
- The class of the member to create.path
- The path to the member resource.namespace
- The namespace.
protected T createItem(AtomEntry entry)
ResourceCollection
was created.
Subclasses may override this method to provide alternative means of
instantiating collection members.
entry
- The AtomEntry
corresponding to the member to
instantiate.
public java.util.Set<java.util.Map.Entry<java.lang.String,T>> entrySet()
entrySet
in interface java.util.Map<java.lang.String,T extends Resource>
public boolean equals(java.lang.Object o)
equals
in interface java.util.Map<java.lang.String,T extends Resource>
equals
in class java.lang.Object
public T get(java.lang.Object key)
get
in interface java.util.Map<java.lang.String,T extends Resource>
key
- The key to look up.
null
if it doesn't
exist.
SplunkException
- The exception to throw if there is more than one
value represented by this key.public T get(java.lang.Object key, Args namespace)
key
- The key to look up.namespace
- The namespace to constrain the search to.
null
if it doesn't
exist.public int hashCode()
hashCode
in interface java.util.Map<java.lang.String,T extends Resource>
hashCode
in class java.lang.Object
public boolean isEmpty()
isEmpty
in interface java.util.Map<java.lang.String,T extends Resource>
protected java.lang.String itemKey(AtomEntry entry)
entry
- The AtomEntry
corresponding to the collection
member.
protected java.lang.String itemPath(AtomEntry entry)
entry
- The AtomEntry
corresponding to the collection
member.
public java.util.Set<java.lang.String> keySet()
keySet
in interface java.util.Map<java.lang.String,T extends Resource>
public ResponseMessage list()
public T put(java.lang.String key, T value)
put
in interface java.util.Map<java.lang.String,T extends Resource>
public void putAll(java.util.Map<? extends java.lang.String,? extends T> map)
putAll
in interface java.util.Map<java.lang.String,T extends Resource>
map
- The set of mappings to copy into this map.public ResourceCollection refresh()
refresh
in class Resource
Resource
instance.public T remove(java.lang.Object key)
remove
in interface java.util.Map<java.lang.String,T extends Resource>
public int size()
size
in interface java.util.Map<java.lang.String,T extends Resource>
public ResourceCollection<T> validate()
refresh
if necessary.
validate
in class Resource
Resource
instance.public java.util.Collection<T> values()
values
in interface java.util.Map<java.lang.String,T extends Resource>
public int valueSize(java.lang.Object key)
key
- The key to look up.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |