com.h3c.util

## Class JSONUtils.Array

- java.lang.Object
- - com.h3c.util.JSONUtils.Primitive
  - - com.h3c.util.JSONUtils.Array

- Enclosing class:
    JSONUtils

      public static class JSONUtils.Array
      extends JSONUtils.Primitive

  Abstraction of a JSON array.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `JSONUtils.Array()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `JSONUtils.Array` | `add(boolean item)` Add an item to the array.
    `JSONUtils.Array` | `add(Enum<?> item)` Add an item to the array.
    `JSONUtils.Array` | `add(JSONUtils.Primitive item)` Add an item to the array.
    `JSONUtils.Array` | `add(JSONUtils.Primitive[] items)` Add an array of items to the array.
    `JSONUtils.Array` | `add(long item)` Add an item to the array.
    `JSONUtils.Array` | `add(String item)` Add an item to the array.
    `boolean` | `equals(Object o)`
    `JSONUtils.Primitive` | `get(int index)` Get the entity at the specified index of this array.
    `int` | `hashCode()`
    `JSONUtils.Array` | `inline()` Mark the specified item to be formatted in-line.
    `int` | `size()` Returns the number of items in this array.

    - ### Methods inherited from class com.h3c.util.JSONUtils.Primitive

      `isInline, toString`

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

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### JSONUtils.Array

          public JSONUtils.Array()

  - ### Method Detail

    - #### inline

          public JSONUtils.Array inline()

      Description copied from class: `JSONUtils.Primitive`
      Mark the specified item to be formatted in-line.
      Overrides:
        `inline` in class `JSONUtils.Primitive`
      Returns:
        the item

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `JSONUtils.Primitive`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `JSONUtils.Primitive`

    - #### size

          public int size()

      Returns the number of items in this array.
      Returns:
        the number of items

    - #### get

          public JSONUtils.Primitive get(int index)

      Get the entity at the specified index of this array.
      Parameters:
        `index` - entity index
      Returns:
        entity at the specified position in the list

    - #### add

          public JSONUtils.Array add(JSONUtils.Primitive item)

      Add an item to the array.
      Parameters:
        `item` - item to be added
      Returns:
        the array
      Throws:
        `NullPointerException` - if parameter is null

    - #### add

          public JSONUtils.Array add(String item)

      Add an item to the array.
      Parameters:
        `item` - item to be added
      Returns:
        the array
      Throws:
        `NullPointerException` - if parameter is null

    - #### add

          public JSONUtils.Array add(long item)

      Add an item to the array.
      Parameters:
        `item` - item to be added
      Returns:
        the array

    - #### add

          public JSONUtils.Array add(boolean item)

      Add an item to the array.
      Parameters:
        `item` - item to be added
      Returns:
        the array

    - #### add

          public JSONUtils.Array add(Enum<?> item)

      Add an item to the array.
      Parameters:
        `item` - item to be added
      Returns:
        the array
      Throws:
        `NullPointerException` - if parameter is null

    - #### add

          public JSONUtils.Array add(JSONUtils.Primitive[] items)

      Add an array of items to the array.
      Parameters:
        `items` - items to be added
      Returns:
        the array
      Throws:
        `NullPointerException` - if parameter is null

Copyright © 2014. All Rights Reserved.