|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object BaseVector appilog.common.system.types.vectors.ObjectStateHolderVector
public class ObjectStateHolderVector
The ObjectStateHolderVector class implements a growable array of
elements of type ObjectStateHolder
.
In the Jython script, this class is used as the results format. Usually, all you have to do is
to create an empty vector and add all the relevant objects to it.
For example, Jython code returning a host conneced to an IP:
// Init the CIs
hostOSH =...
ipOSH =...
link =...
// Add them to the vector
vec.add(hostOSH)
vec.add(ipOSH)
vec.add(link)
return vec
ObjectStateHolder
Constructor Summary | |
---|---|
ObjectStateHolderVector()
Default constructor |
|
ObjectStateHolderVector(Element element)
Constructor |
Method Summary | |
---|---|
void |
add(int index,
ObjectStateHolder element)
Inserts the specified element at the specified position in this vector. |
void |
add(ObjectStateHolder element)
Appends the specified element to the end of this vector. |
void |
addAll(ObjectStateHolderVector elements)
Appends a vector of elements to the end of this vector. |
boolean |
contains(java.lang.Object objectID)
|
boolean |
contains(ObjectStateHolder element)
Checks if the specified object is contained in this vector. |
java.lang.Object |
deepClone()
Returns a clone of this vector. |
ObjectStateHolder |
get(int index)
Returns the element at the specified position in this vector. |
CmdbObjectIds |
getCmdbObjectIds()
Returns the vector of object IDs. |
CmdbIdsVector |
getIdVector()
Returns the vector of object IDs. |
ObjectStateHolderVector |
getSubVector(int from,
int to)
Returns a vector comprising the elements in this vector between the specified indexes (inclusive). |
int |
indexOf(ObjectStateHolder element)
Returns the position of the first occurence of the specified argument. |
static ObjectStateHolderVector |
parseXml(byte[] xmlBuffer)
|
static ObjectStateHolderVector |
parseXml(java.io.InputStream xmlStream)
|
static ObjectStateHolderVector |
parseXml(java.io.InputStream xmlStream,
boolean isZipped)
|
static ObjectStateHolderVector |
parseXml(java.lang.String xmlString)
|
static ObjectStateHolderVector |
parseXml(java.lang.String xmlString,
boolean isZipped)
|
ObjectStateHolder |
remove(int index)
Removes the element at the specified position in this vector. |
boolean |
remove(ObjectStateHolder element)
Removes the first occurrence of the specified element in this vector. |
ObjectStateHolder |
set(int index,
ObjectStateHolder element)
Replaces the element at the specified position in this vector with the specified element. |
void |
sort(java.util.Comparator comparator)
Sorts the specified vector according to the order defined by the specified comparator. |
void |
sort(java.lang.String attrName)
|
void |
sort(StringVector attrs,
boolean ascendent)
Sorts the specified vector. |
ObjectStateHolderVector |
subList(int indexFrom,
int indexTo)
|
Element |
toXml()
|
java.lang.String |
toXmlString()
|
java.lang.String |
toXmlString(boolean withEncoding)
|
java.lang.StringBuffer |
toXmlString(java.lang.StringBuffer xml,
boolean withEncoding)
|
byte[] |
toZip()
|
byte[] |
toZipBySerialization()
|
java.lang.String |
toZipString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ObjectStateHolderVector()
public ObjectStateHolderVector(Element element) throws AppilogIllegalParameterException
AppilogIllegalParameterException
Method Detail |
---|
public static ObjectStateHolderVector parseXml(java.io.InputStream xmlStream, boolean isZipped) throws AppilogIllegalParameterException
AppilogIllegalParameterException
public static ObjectStateHolderVector parseXml(java.io.InputStream xmlStream) throws AppilogIllegalParameterException
AppilogIllegalParameterException
public static ObjectStateHolderVector parseXml(java.lang.String xmlString, boolean isZipped) throws AppilogIllegalParameterException
AppilogIllegalParameterException
public static ObjectStateHolderVector parseXml(java.lang.String xmlString) throws AppilogIllegalParameterException
AppilogIllegalParameterException
public static ObjectStateHolderVector parseXml(byte[] xmlBuffer) throws AppilogIllegalParameterException
AppilogIllegalParameterException
public java.lang.Object deepClone()
public void add(ObjectStateHolder element)
element
- element to be appended to this vector.public void addAll(ObjectStateHolderVector elements)
elements
- element to be appended to this vector.public void add(int index, ObjectStateHolder element)
index
- The position at which the element is to be insertedelement
- The element to be inserted
java.lang.ArrayIndexOutOfBoundsException
- index is out of range
(index < 0 || index > size()).public ObjectStateHolder set(int index, ObjectStateHolder element)
index
- The index of element to replaceelement
- The element to be stored at the specified position
java.lang.ArrayIndexOutOfBoundsException
- index out of range
(index < 0 || index >= size()).
java.lang.IllegalArgumentException
- fromIndex > toIndex.public ObjectStateHolder remove(int index)
index
- the index of the element to removed.
java.lang.ArrayIndexOutOfBoundsException
- index out of range (index
< 0 || index >= size()).public boolean remove(ObjectStateHolder element)
(o==null ? get(i)==null : o.equals(get(i)))
,if such
an element exists.
element
- The element to be removed from this vector, if present
public boolean contains(ObjectStateHolder element)
equals
method.
element
- an ObjectStateHolder
to be tested
true
if the specified object
is the same as an element in this vector, otherwise false
.public boolean contains(java.lang.Object objectID)
public int indexOf(ObjectStateHolder element)
equals
method.
element
- An ObjectStateHolder
-1
if the object is not found.Object.equals(Object)
public ObjectStateHolder get(int index)
index
- The index of the element to return
java.lang.ArrayIndexOutOfBoundsException
- if the index is out of rangepublic ObjectStateHolderVector getSubVector(int from, int to)
public CmdbIdsVector getIdVector()
public CmdbObjectIds getCmdbObjectIds()
public Element toXml()
public byte[] toZip() throws AppilogIllegalParameterException, java.io.IOException
AppilogIllegalParameterException
java.io.IOException
public byte[] toZipBySerialization() throws java.io.IOException
java.io.IOException
public java.lang.String toZipString() throws AppilogIllegalParameterException, java.io.IOException
AppilogIllegalParameterException
java.io.IOException
public void sort(java.util.Comparator comparator)
comparator
- The comparator to determine the order of the list. A
null value indicates that the elements' natural
ordering should be used.
java.lang.ClassCastException
- if the list contains elements that are not
mutually comparable using the specified comparator.
java.lang.UnsupportedOperationException
- if the specified list's
list-iterator does not support the set operation.public void sort(StringVector attrs, boolean ascendent)
ascendent
- true for ascending sort. false
for descending sort.attrs
- the vector to sort
public void sort(java.lang.String attrName)
public ObjectStateHolderVector subList(int indexFrom, int indexTo)
public java.lang.String toXmlString()
public java.lang.String toXmlString(boolean withEncoding)
public java.lang.StringBuffer toXmlString(java.lang.StringBuffer xml, boolean withEncoding)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |