The icollections.ujmi sample declares interfaces for collections and lists.
This is a set of interface declarations describing basic collection and list functionality. See Interfaces.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ujml PUBLIC "-//UIEVOLUTION//DTD UJML 2.1//EN" "http://www.uievolution.com/dtd/ujml-2.1.dtd"[]>
<!--
Copyright (c) 2000-2007 UIEvolution, Inc.
http://www.uievolution.com
-->
<!--
icollections.ujmi
Interface declarations for collection components.
-->
<ujml>
<interfaces>
<!--
IEnumerable
Provides functions to enumerate through a series of components.
NOT THREAD-SAFE: Unless other provision is made (special IEnumerable instances)
the functions of this interface are neither re-entrant nor thread-safe.
-->
<interface name="IEnumerable">
<functions>
<!--
Resets enumeration so getNextItem returns the first item.
-->
<function name="reset" type="void"/>
<!--
Returns the next item in the enumeration.
-->
<function name="getNextItem" type="reference"/>
<!--
Returns true if the enumeration has completed.
-->
<function name="atEnd" type="boolean"/>
</functions>
</interface>
<!--
ICollection
NOTE: Any component that implements ICollection should also implement
IEnumerable.
Provides a collection of Components that can be enumerated. A
collection does not guarentee item order or provide direct
access to specified items. Collections act as generic containers
you can use in code without knowing how the collection is
implemented.
-->
<interface name="ICollection">
<functions>
<!--
Returns the IEnumerable interface.
-->
<function name="enumerator" type="IEnumerable" />
<!--
Adds an item to the Collection and returns
true. If the item cannot be added it returns
false.
-->
<function name="addItem" type="boolean">
<parameters>
<var name="value" type="reference"/>
</parameters>
</function>
<!--
Removes the specified item from the Collection. If the
item is not in the Collection it is ignored.
-->
<function name="removeItem" type="void">
<parameters>
<var name="value" type="reference"/>
</parameters>
</function>
<!--
Removes all items in the Collection.
-->
<function name="clear" type="void"/>
</functions>
</interface>
<!--
IList
NOTE: Any component that implements IList should also implement
IEnumerable and ICollection.
Provides a collection of Components that can be treated as
a list, with similarities to an array.
-->
<interface name="IList">
<functions>
<!--
Returns the IEnumerable interface.
-->
<function name="enumerator" type="IEnumerable" />
<!--
Returns the ICollection interface.
-->
<function name="collection" type="ICollection" />
<!--
Returns the maximum size of the List.
-->
<function name="max" type="int"/>
<!--
Returns the count of items the List.
-->
<function name="count" type="int"/>
<!--
Adds an item to the end of the List and returns
the item's index. If the item cannot be added it returns
-1.
-->
<function name="addItem" type="int">
<parameters>
<var name="value" type="reference"/>
</parameters>
</function>
<!--
Checks to see if the new item is already on the List. If it is
on the List it returns the item's index, otherwise it performs
like the addItem() method.
-->
<function name="addItemUnique" type="int">
<parameters>
<var name="value" type="reference"/>
</parameters>
</function>
<!--
Attempts to insert an item into the the List at the specified index
and returns the item's index. If the item cannot be added it returns
-1. If the specified index is greater than count(), the new item is
added to the end of the List. If the specified index is less than
0 the new item is added at the beginning of the Array List and it returns
0. If the item cannot be added it returns -1.
-->
<function name="insertItem" type="int">
<parameters>
<var name="index" type="int"/>
<var name="value" type="reference"/>
</parameters>
</function>
<!--
Removes the specified item from the List. If the
item is not in the List it is ignored.
-->
<function name="removeItem" type="void">
<parameters>
<var name="value" type="reference"/>
</parameters>
</function>
<!--
Removes the item at the specified index from the
List. If the index is not valid it is ignored.
-->
<function name="removeAt" type="void">
<parameters>
<var name="index" type="int"/>
</parameters>
</function>
<!--
Removes all items in the List.
-->
<function name="clear" type="void"/>
<!--
Returns the index of the specified item. If the
item is not in the List it returns -1.
-->
<function name="getItemIndex" type="int">
<parameters>
<var name="value" type="reference"/>
</parameters>
</function>
<!--
Sets the item in the List at the passed
index to the passed value. If the index is not valid
this function does nothing.
-->
<function name="setItem" type="void">
<parameters>
<var name="index" type="int"/>
<var name="value" type="reference"/>
</parameters>
</function>
<!--
Returns the item at the passed index of the List.
Returns a null item if the index is not valid.
-->
<function name="getItem" type="reference">
<parameters>
<var name="index" type="int"/>
</parameters>
</function>
</functions>
</interface>
</interfaces>
</ujml>|
Copyright (c) 2000-2007 UIEvolution, Inc. All rights reserved.
|
|
What do you think about this topic? Send feedback!
|