org.millscript.millscript.datatypes
Interface ListAware

All Superinterfaces:
MapAware
All Known Implementing Classes:
AbstractListAware, XmlElement

public interface ListAware
extends MapAware

The ListAware interface should be implemented by any class which is not directly a List, but may wrap one. Such an object could be viewed as a List directly by ignoring the wrapping object. e.g. an XML element, which can be viewed as a List of its children.


Method Summary
 org.millscript.commons.util.IList asList()
          Returns this object as a List.
 java.lang.Object asOriginal(org.millscript.commons.util.IList<?> x)
          Returns a new object wrapping the supplied List.
 boolean sameAs(java.lang.Object x)
          Compares the specified object with this object, to see if they are the same type.
 
Methods inherited from interface org.millscript.millscript.datatypes.MapAware
asMap
 

Method Detail

asList

org.millscript.commons.util.IList asList()
Returns this object as a List.

Returns:
a list containing all the items in this object.

asOriginal

java.lang.Object asOriginal(org.millscript.commons.util.IList<?> x)
Returns a new object wrapping the supplied List.

Parameters:
x - a List to wrap in a copy of this object.
Returns:
an Object wrapping the supplied list.

sameAs

boolean sameAs(java.lang.Object x)
Compares the specified object with this object, to see if they are the same type.

Parameters:
x - Object to be compared for type with this object
Returns:
true if the specified object is the same type as this object


Copyright © 2001-2007 Open World Ltd. All Rights Reserved.