Package com.independentsoft.office.odf

# Class ListItem

java.lang.Object
com.independentsoft.office.odf.ListItem

All Implemented Interfaces:
  `IContentElement`

public class ListItem extends Object implements IContentElement
Represents an item in a list.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ListItem()`
  Initializes a new instance of the ListItem class.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `add​(Heading heading)`
  Adds a Heading object to the content.
  `void`
  `add​(List list)`
  Adds a List object to the content.
  `void`
  `add​(Paragraph paragraph)`
  Adds a Paragraph object to the content.
  `ListItem`
  `clone()`
  Creates a new object that is a deep copy of the current instance.
  `List<ITextContent>`
  `getContent()`
  Contains a collection of ITextContent objects.
  `List<IContentElement>`
  `getContentElements()`
  Returns all content elements.
  `IContentElement`
  `getParent()`
  Returns the parent content element.
  `int`
  `getStartValue()`
  Gets the value that restarts numbering of a list at the current item.
  `void`
  `setParent​(IContentElement parent)`
  Sets the parent content element.
  `void`
  `setStartValue​(int startValue)`
  Sets the value that restarts numbering of a list at the current item.
  `String`
  `toString()`
  Converts the value of the current ListItem object to its equivalent string representation.

  ### Methods inherited from class java.lang.Object

  `equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### ListItem

    public ListItem()
    Initializes a new instance of the ListItem class.

- ## Method Details

  - ### add

    public void add​(Paragraph paragraph)
    Adds a Paragraph object to the content.
    Parameters:
      `paragraph` - the paragraph

  - ### add

    public void add​(Heading heading)
    Adds a Heading object to the content.
    Parameters:
      `heading` - the heading

  - ### add

    public void add​(List list)
    Adds a List object to the content.
    Parameters:
      `list` - the list

  - ### getContentElements

    public List<IContentElement> getContentElements()
    Returns all content elements.
    Specified by:
      `getContentElements` in interface `IContentElement`
    Returns:
      A collection of content elements.

  - ### getParent

    public IContentElement getParent()
    Returns the parent content element.
    Specified by:
      `getParent` in interface `IContentElement`
    Returns:
      the parent

  - ### setParent

    public void setParent​(IContentElement parent)
    Sets the parent content element.
    Specified by:
      `setParent` in interface `IContentElement`
    Parameters:
      `parent` - the new parent

  - ### clone

    public ListItem clone()
    Creates a new object that is a deep copy of the current instance.
    Specified by:
      `clone` in interface `IContentElement`
    Overrides:
      `clone` in class `Object`
    Returns:
      A new object that is a copy of this instance.

  - ### toString

    public String toString()
    Converts the value of the current ListItem object to its equivalent string representation.
    Overrides:
      `toString` in class `Object`
    Returns:
      the string

  - ### getContent

    public List<ITextContent> getContent()
    Contains a collection of ITextContent objects.
    Returns:
      the content

  - ### getStartValue

    public int getStartValue()
    Gets the value that restarts numbering of a list at the current item.
    Returns:
      the start value

  - ### setStartValue

    public void setStartValue​(int startValue)
    Sets the value that restarts numbering of a list at the current item.
    Parameters:
      `startValue` - the new start value