Class ListProperty

    • Constructor Summary

      Constructors 
      Constructor Description
      ListProperty​(java.lang.String name)
      Creates a new ListProperty with the given name and an empty list as data.
      ListProperty​(java.lang.String name, java.util.List<Property> aList)
      Creates a new ListProperty with the given name and the given list.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(int index, Property p)
      Adds the property p to the current list at position index (equal to java.util.List.set(index, object)
      void add​(Property p)
      Adds the property p to the current list.
      protected java.lang.Object cloneValue()
      cloneValue.
      Property get​(int index)
      Returns the Property at position specified by index.
      java.util.List<Property> getList()
      Returns the underlying list as java.util.List
      java.util.List<java.lang.Object> getListData()
      getListData.
      PropertyType getPropertyType()
      getPropertyType.
      long getSizeInBytes()
      The 'size' of a DataHolder is needed for the quota calculation.
      The size of an atomic DataHolder like a Property should be the real amount of bytes it uses, whether the size of complex objects should be cumulated.
      The overhead for administration shouldn't be counted (i.e.
      void remove​(int index)
      Remove the property at position index from this list.
      void remove​(Property p)
      Removes the given property from this list.
      net.anotheria.util.xml.XMLNode toXMLNode()
      Creates an xml node for export.
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ListProperty

        public ListProperty​(java.lang.String name)
        Creates a new ListProperty with the given name and an empty list as data.
        Parameters:
        name - a String object.
      • ListProperty

        public ListProperty​(java.lang.String name,
                            java.util.List<Property> aList)
        Creates a new ListProperty with the given name and the given list. The list should only contain Property objects.
        Warning: the content of the list parameter will be not explicitely check to contain only Property object, but will cause runtime exceptions later in case it contained something else.
        Parameters:
        name - a String object.
        aList - a List object.
    • Method Detail

      • getList

        public java.util.List<Property> getList()
        Returns the underlying list as java.util.List
        Returns:
        a List object.
      • get

        public Property get​(int index)
        Returns the Property at position specified by index.
        Parameters:
        index - a int.
        Returns:
        a Property object.
      • add

        public void add​(int index,
                        Property p)
        Adds the property p to the current list at position index (equal to java.util.List.set(index, object)
        Parameters:
        index - a int.
        p - a Property object.
      • add

        public void add​(Property p)
        Adds the property p to the current list.
        Parameters:
        p - a Property object.
      • remove

        public void remove​(Property p)
        Removes the given property from this list. If the same property is contained in the list more then one time, only the first occurence of the property will be removed.
        Parameters:
        p - a Property object.
      • remove

        public void remove​(int index)
        Remove the property at position index from this list.
        Parameters:
        index - a int.
      • getSizeInBytes

        public long getSizeInBytes()
        The 'size' of a DataHolder is needed for the quota calculation.
        The size of an atomic DataHolder like a Property should be the real amount of bytes it uses, whether the size of complex objects should be cumulated.
        The overhead for administration shouldn't be counted (i.e. the size of an IntProperty is the amount of bytes needed to store the int value itself, not the amount of bytes needed to store the DataHolder object). Returns the cumulative size of contained properties. The ListProperty itself is not counted.
        Specified by:
        getSizeInBytes in class DataHolder
        Returns:
        a long.
      • getListData

        public java.util.List<java.lang.Object> getListData()

        getListData.

        Returns:
        a List object.
      • cloneValue

        protected java.lang.Object cloneValue()
                                       throws java.lang.CloneNotSupportedException

        cloneValue.

        Specified by:
        cloneValue in class Property
        Returns:
        a Object object.
        Throws:
        java.lang.CloneNotSupportedException - if any.
      • toXMLNode

        public net.anotheria.util.xml.XMLNode toXMLNode()
        Creates an xml node for export.
        Overrides:
        toXMLNode in class Property
        Returns:
        new XMLNode object