Package org.drip.service.representation
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|,||
- Module = Computational Core Module
- Library = Computation Support
- Project = Environment, Product/Definition Containers, and Scenario/State Manipulation APIs
- Package = RFC4627 Compliant JSON Message Object
- Author:
- Fang Yidong, Lakshmi Krishnamurthy
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description void
add(int i, java.lang.String item)
Add the Specified Item at the Locationvoid
add(java.lang.String item)
Add the Specified Itemvoid
addAll(java.lang.String s)
Add all the Items in the Input Stringvoid
addAll(java.lang.String s, java.lang.String sp)
Add all the Items in the Input Stringvoid
addAll(java.lang.String s, java.lang.String sp, boolean isMultiToken)
Add all the Items in the Input Stringvoid
addAll(ItemList list)
Add all the Items in the Listvoid
clear()
Clear the Listjava.lang.String
get(int i)
java.lang.String[]
getArray()
Retrieve the Array of Itemsjava.util.List
getItems()
Retrieve the List of Itemsvoid
reset()
Reset the Listvoid
setSP(java.lang.String sp)
Set the Separatorint
size()
Retrieve the Number of Itemsvoid
split(java.lang.String s, java.lang.String sp, java.util.List append)
Split the String using the Separatorvoid
split(java.lang.String s, java.lang.String sp, java.util.List append, boolean isMultiToken)
Split the String using the Separatorjava.lang.String
toString()
java.lang.String
toString(java.lang.String sp)
Generate the Item-separated StringMethods 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 Stringsp
- Separator
-
ItemList
public ItemList(java.lang.String s, java.lang.String sp, boolean isMultiToken)ItemList Constructor- Parameters:
s
- Input Stringsp
- SeparatorisMultiToken
- 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 Stringsp
- Separatorappend
- List to Append toisMultiToken
- 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 Stringsp
- Separatorappend
- 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
- Locationitem
- Item
-
add
public void add(java.lang.String item)Add the Specified Item- Parameters:
item
- Item
-
addAll
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 Stringsp
- 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 Stringsp
- SeparatorisMultiToken
- 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 classjava.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
-