net.sf.plist
Class NSArray

java.lang.Object
  extended by net.sf.plist.NSObject
      extended by net.sf.plist.NSArray

public class NSArray
extends NSObject

Ordered list of NSObjects.

In this implementation, a List is used to represent the NSArray.

See Also:
List

Constructor Summary
NSArray(List<NSObject> theList)
          Constructor.
 
Method Summary
 NSObject[] array()
          Get an array containing all values of this object.
 NSObject get(int index)
          Get NSObject corresponding to index from this object.
 List<NSObject> getValue()
          Get the unmodifiable value of this object.
 List<NSObject> list()
          Get an unmodifiable List containing all values of this object.
 
Methods inherited from class net.sf.plist.NSObject
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NSArray

public NSArray(List<NSObject> theList)
Constructor.

Parameters:
theList - the contents of new object
Method Detail

get

public NSObject get(int index)
Get NSObject corresponding to index from this object.

Parameters:
index - index of object to retrieve

list

public List<NSObject> list()
Get an unmodifiable List containing all values of this object.

Returns:
the List

array

public NSObject[] array()

Get an array containing all values of this object. Changes made in the array will not affect this object.

When iterating through all items in this object, the list() method is a better choice for performance reasons.

Returns:
the array

getValue

public List<NSObject> getValue()
Get the unmodifiable value of this object.

Specified by:
getValue in class NSObject
Returns:
the value of this object
See Also:
list()