appilog.common.system.types.vectors

Class ObjectStateHolderVector

    • Constructor Detail

      • ObjectStateHolderVector

        public ObjectStateHolderVector()
        Default constructor
      • ObjectStateHolderVector

        public ObjectStateHolderVector(Element element)
                                throws AppilogIllegalParameterException
        Throws:
        AppilogIllegalParameterException
    • Method Detail

      • parseXml

        public static ObjectStateHolderVector parseXml(java.io.InputStream xmlStream,
                                       boolean isZipped)
                                                throws AppilogIllegalParameterException
        Throws:
        AppilogIllegalParameterException
      • parseXml

        public static ObjectStateHolderVector parseXml(java.io.InputStream xmlStream)
                                                throws AppilogIllegalParameterException
        Throws:
        AppilogIllegalParameterException
      • parseXml

        public static ObjectStateHolderVector parseXml(java.lang.String xmlString,
                                       boolean isZipped)
                                                throws AppilogIllegalParameterException
        Throws:
        AppilogIllegalParameterException
      • parseXml

        public static ObjectStateHolderVector parseXml(java.lang.String xmlString)
                                                throws AppilogIllegalParameterException
        Throws:
        AppilogIllegalParameterException
      • parseXml

        public static ObjectStateHolderVector parseXml(byte[] xmlBuffer)
                                                throws AppilogIllegalParameterException
        Throws:
        AppilogIllegalParameterException
      • deepClone

        public java.lang.Object deepClone()
        Returns a clone of this vector.
        Returns:
        A clone of this instance
      • add

        public void add(ObjectStateHolder element)
        Appends the specified element to the end of this vector.
        Parameters:
        element - element to be appended to this vector.
      • addAll

        public void addAll(ObjectStateHolderVector elements)
        Appends a vector of elements to the end of this vector.
        Parameters:
        elements - element to be appended to this vector.
      • add

        public void add(int index,
               ObjectStateHolder element)
        Inserts the specified element at the specified position in this vector. Shifts the element currently at that position and all subsequent elements to the right (adds one to their indexes).
        Parameters:
        index - The position at which the element is to be inserted
        element - The element to be inserted
        Throws:
        java.lang.ArrayIndexOutOfBoundsException - index is out of range (index < 0 || index > size()).
      • set

        public ObjectStateHolder set(int index,
                            ObjectStateHolder element)
        Replaces the element at the specified position in this vector with the specified element.
        Parameters:
        index - The index of element to replace
        element - The element to be stored at the specified position
        Returns:
        The element previously stored at the specified position
        Throws:
        java.lang.ArrayIndexOutOfBoundsException - index out of range (index < 0 || index >= size()).
        java.lang.IllegalArgumentException - fromIndex > toIndex.
      • remove

        public ObjectStateHolder remove(int index)
        Removes the element at the specified position in this vector. Shifts any subsequent elements to the left (subtracts one from their indexes).
        Parameters:
        index - the index of the element to removed.
        Returns:
        The element that was removed from the vector
        Throws:
        java.lang.ArrayIndexOutOfBoundsException - index out of range (index < 0 || index >= size()).
      • remove

        public boolean remove(ObjectStateHolder element)
        Removes the first occurrence of the specified element in this vector. If the vector does not contain the element, the vector is unchanged. More formally, removes the element with the lowest index i such that (o==null ? get(i)==null : o.equals(get(i))),if such an element exists.
        Parameters:
        element - The element to be removed from this vector, if present
        Returns:
        true if the vector contained the specified element
      • contains

        public boolean contains(CmdbDataID objectID)
      • indexOf

        public int indexOf(ObjectStateHolder element)
        Returns the position of the first occurence of the specified argument. The check uses the BaseVector#equals(java.lang.Object) method.
        Parameters:
        element - An ObjectStateHolder
        Returns:
        The index of the first occurrence of the argument in this vector, that is, the smallest value k such that elem.equals(elementData[k]) is true; returns -1 if the object is not found.
        See Also:
        Object.equals(Object)
      • get

        public ObjectStateHolder get(int index)
        Returns the element at the specified position in this vector.
        Parameters:
        index - The index of the element to return
        Returns:
        osh
        Throws:
        java.lang.ArrayIndexOutOfBoundsException - if the index is out of range
      • getIdVector

        public CmdbIdsVector getIdVector()
      • getCmdbObjectIds

        public CmdbObjectIds getCmdbObjectIds()
        Returns the vector of object IDs.
        Returns:
        all ids
      • toXml

        public Element toXml()
      • toZip

        public byte[] toZip()
                     throws AppilogIllegalParameterException,
                            java.io.IOException
        Throws:
        AppilogIllegalParameterException
        java.io.IOException
      • toZipBySerialization

        public byte[] toZipBySerialization()
                                    throws java.io.IOException
        Throws:
        java.io.IOException
      • toZipString

        public java.lang.String toZipString()
                                     throws AppilogIllegalParameterException,
                                            java.io.IOException
        Throws:
        AppilogIllegalParameterException
        java.io.IOException
      • sort

        public void sort(java.util.Comparator<? super ObjectStateHolder> comparator)
        Sorts the specified vector according to the order defined by the specified comparator. All elements in the vector must be mutually comparable using the specified comparator, that is, c.compare(e1, e2) must not throw a ClassCastException for any elements e1 and e2 in the list.
        This sort is stable, that is, equal elements are not reordered.
        The sorting algorithm is a modified mergesort in which the merge is omitted if the highest element in the low sublist is less than the lowest element in the high sublist. This algorithm gives n log(n) performance, and can approach linear performance on nearly sorted lists.
        Parameters:
        comparator - The comparator to determine the order of the list. A null value indicates that the elements' natural ordering should be used.
        Throws:
        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.
      • sort

        public void sort(StringVector attrs,
                boolean ascendent)
        Sorts the specified vector.
        Parameters:
        ascendent - true for ascending sort. false for descending sort.
        attrs - the vector to sort
      • sort

        public void sort(java.lang.String attrName,
                boolean ascendent)
      • sort

        public void sort(java.lang.String attrName)
      • toXmlString

        public java.lang.String toXmlString()
      • toXmlString

        public java.lang.String toXmlString(boolean withEncoding)
      • toXmlString

        public java.lang.StringBuffer toXmlString(java.lang.StringBuffer xml,
                                         boolean withEncoding)
      • clear

        public void clear()

Documentation Feedback
Copyright 2012 Micro Focus or one of its affiliates.