Class ItemList

java.lang.Object
org.drip.service.representation.ItemList

public class ItemList
extends java.lang.Object
ItemList is an Adaptation of the ItemList Interface from the RFC4627 compliant JSON Simple (https://code.google.com/p/json-simple/). |a:b:c| = |a|,|b|,|c| |:| = ||,|| |a:| = |a|,||

Author:
Fang Yidong, Lakshmi Krishnamurthy
  • Constructor Summary

    Constructors
    Constructor Description
    ItemList()
    Empty ItemList Constructor
    ItemList​(java.lang.String s)
    ItemList Constructor
    ItemList​(java.lang.String s, java.lang.String sp)
    ItemList Constructor
    ItemList​(java.lang.String s, java.lang.String sp, boolean isMultiToken)
    ItemList Constructor
  • Method Summary

    Modifier and Type Method Description
    void add​(int i, java.lang.String item)
    Add the Specified Item at the Location
    void add​(java.lang.String item)
    Add the Specified Item
    void addAll​(java.lang.String s)
    Add all the Items in the Input String
    void addAll​(java.lang.String s, java.lang.String sp)
    Add all the Items in the Input String
    void addAll​(java.lang.String s, java.lang.String sp, boolean isMultiToken)
    Add all the Items in the Input String
    void addAll​(ItemList list)
    Add all the Items in the List
    void clear()
    Clear the List
    java.lang.String get​(int i)  
    java.lang.String[] getArray()
    Retrieve the Array of Items
    java.util.List getItems()
    Retrieve the List of Items
    void reset()
    Reset the List
    void setSP​(java.lang.String sp)
    Set the Separator
    int size()
    Retrieve the Number of Items
    void split​(java.lang.String s, java.lang.String sp, java.util.List append)
    Split the String using the Separator
    void split​(java.lang.String s, java.lang.String sp, java.util.List append, boolean isMultiToken)
    Split the String using the Separator
    java.lang.String toString()  
    java.lang.String toString​(java.lang.String sp)
    Generate the Item-separated String

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • ItemList

      public ItemList()
      Empty ItemList Constructor
    • ItemList

      public ItemList​(java.lang.String s)
      ItemList Constructor
      Parameters:
      s - Input String
    • ItemList

      public ItemList​(java.lang.String s, java.lang.String sp)
      ItemList Constructor
      Parameters:
      s - Input String
      sp - Separator
    • ItemList

      public ItemList​(java.lang.String s, java.lang.String sp, boolean isMultiToken)
      ItemList Constructor
      Parameters:
      s - Input String
      sp - Separator
      isMultiToken - TRUE - Token is Multiple
  • Method Details

    • getItems

      public java.util.List getItems()
      Retrieve the List of Items
      Returns:
      List of Items
    • getArray

      public java.lang.String[] getArray()
      Retrieve the Array of Items
      Returns:
      Array of Items
    • split

      public void split​(java.lang.String s, java.lang.String sp, java.util.List append, boolean isMultiToken)
      Split the String using the Separator
      Parameters:
      s - Input String
      sp - Separator
      append - List to Append to
      isMultiToken - TRUE - Token is Multiple
    • split

      public void split​(java.lang.String s, java.lang.String sp, java.util.List append)
      Split the String using the Separator
      Parameters:
      s - Input String
      sp - Separator
      append - List to Append to
    • setSP

      public void setSP​(java.lang.String sp)
      Set the Separator
      Parameters:
      sp - The Separator
    • add

      public void add​(int i, java.lang.String item)
      Add the Specified Item at the Location
      Parameters:
      i - Location
      item - Item
    • add

      public void add​(java.lang.String item)
      Add the Specified Item
      Parameters:
      item - Item
    • addAll

      public void addAll​(ItemList list)
      Add all the Items in the List
      Parameters:
      list - List of Items
    • addAll

      public void addAll​(java.lang.String s)
      Add all the Items in the Input String
      Parameters:
      s - Input String
    • addAll

      public void addAll​(java.lang.String s, java.lang.String sp)
      Add all the Items in the Input String
      Parameters:
      s - Input String
      sp - Separator
    • addAll

      public void addAll​(java.lang.String s, java.lang.String sp, boolean isMultiToken)
      Add all the Items in the Input String
      Parameters:
      s - Input String
      sp - Separator
      isMultiToken - TRUE - Multiple Token
    • get

      public java.lang.String get​(int i)
      Parameters:
      i - 0-based
      Returns:
      i
    • size

      public int size()
      Retrieve the Number of Items
      Returns:
      Number of Items
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object
    • toString

      public java.lang.String toString​(java.lang.String sp)
      Generate the Item-separated String
      Parameters:
      sp - Separator
      Returns:
      Item-separated String
    • clear

      public void clear()
      Clear the List
    • reset

      public void reset()
      Reset the List