Package com.independentsoft.office.spreadsheet.extensions

# Class AlternateContentChoice

java.lang.Object
com.independentsoft.office.spreadsheet.extensions.AlternateContentChoice

public class AlternateContentChoice extends Object
Represents a markup compatibility choice (`mc:Choice` element) of an `AlternateContent` block.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AlternateContentChoice()`
  Instantiates a new alternate content choice.
  `AlternateContentChoice​(InternalXMLStreamReader reader, ExtensionContentFactory factory)`
  Instantiates a new alternate content choice.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `AlternateContentChoice`
  `clone()`
  `List<IExtensionContent>`
  `getContents()`
  Gets the choice contents.
  `List<String[]>`
  `getRequiredNamespaces()`
  Gets the resolved namespaces for the `Requires` prefixes.
  `String`
  `getRequires()`
  Gets the whitespace-separated list of namespace prefixes this choice requires.
  `void`
  `setRequires​(String requires)`
  Sets the whitespace-separated list of namespace prefixes this choice requires.
  `String`
  `toString()`

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

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

- ## Constructor Details

  - ### AlternateContentChoice

    public AlternateContentChoice()
    Instantiates a new alternate content choice.

  - ### AlternateContentChoice

    public AlternateContentChoice​(InternalXMLStreamReader reader, ExtensionContentFactory factory) throws XMLStreamException
    Instantiates a new alternate content choice.

    Enters positioned ON the `mc:Choice` start element and leaves positioned ON its end element, so the caller's loop advances past it.

    Parameters:
      `reader` - the reader
      `factory` - the content factory mapping child elements to typed models, or null to preserve every child as raw XML
    Throws:
      `XMLStreamException` - the XML stream exception

- ## Method Details

  - ### clone

    public AlternateContentChoice clone()
    Overrides:
      `clone` in class `Object`

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`

  - ### getRequires

    public String getRequires()
    Gets the whitespace-separated list of namespace prefixes this choice requires.
    Returns:
      the requires

  - ### setRequires

    public void setRequires​(String requires)
    Sets the whitespace-separated list of namespace prefixes this choice requires.
    Parameters:
      `requires` - the new requires

  - ### getRequiredNamespaces

    public List<String[]> getRequiredNamespaces()
    Gets the resolved namespaces for the `Requires` prefixes. Each entry is a two element array holding the prefix and its namespace URI.
    Returns:
      the required namespaces

  - ### getContents

    public List<IExtensionContent> getContents()
    Gets the choice contents.
    Returns:
      the contents