Java Doc for IndexedContainer.java in  » Web-Framework » Millstone » org » millstone » base » data » util » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Web Framework » Millstone » org.millstone.base.data.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.millstone.base.data.util.IndexedContainer

All known Subclasses:   org.millstone.base.data.util.HierarchicalContainer,
IndexedContainer
public class IndexedContainer implements Container,Container.Indexed,Container.ItemSetChangeNotifier,Container.PropertySetChangeNotifier,Property.ValueChangeNotifier,Container.Sortable,Comparator,Cloneable(Code)
Indexed container implementation.

A list implementation of the org.millstone.base.data.Container interface. A list is a ordered collection wherein the user has a precise control over where in the list each new Item is inserted. The user may access the Items by their integer index (position in the list) or by their Item ID.


See Also:   org.millstone.base.data.Container
author:
   IT Mill Ltd.
version:
   3.1.1
since:
   3.0

Inner Class :class IndexedContainerItem implements Item


Constructor Summary
public  IndexedContainer()
    
public  IndexedContainer(Collection itemIds)
    

Method Summary
public  booleanaddContainerProperty(Object propertyId, Class type, Object defaultValue)
     Add a new Property to all Items in the list.
public  ObjectaddItem()
     Create a new Item into the list, and assign it an automatic ID.
public  ItemaddItem(Object itemId)
     Create a new Item with the given ID into the list.
public  ItemaddItemAfter(Object previousItemId, Object newItemId)
    
public  ObjectaddItemAfter(Object previousItemId)
    
public  ItemaddItemAt(int index, Object newItemId)
    
public  ObjectaddItemAt(int index)
    
public  voidaddListener(Container.PropertySetChangeListener listener)
     Registers a new Property set change listener for this list.
public  voidaddListener(Container.ItemSetChangeListener listener)
     Adds a Item set change listener for the list.
public  voidaddListener(Property.ValueChangeListener listener)
     Registers a new value change listener for this object.
public  Objectclone()
    
public  intcompare(Object o1, Object o2)
     Compare two items for sorting.
public  booleancontainsId(Object itemId)
    
public  booleanequals(Object obj)
    
public  ObjectfirstItemId()
     Gets the ID of the first Item in the list.
public  PropertygetContainerProperty(Object itemId, Object propertyId)
     Gets the Property identified by the given Item ID and Property ID from the lsit.
public  CollectiongetContainerPropertyIds()
     Gets the ID's of all Properties stored in the list.
public  ObjectgetIdByIndex(int index)
     Get ID with the index.
public  ItemgetItem(Object itemId)
     Gets the Item with the given Item ID from the list.
public  CollectiongetItemIds()
     Gets the ID's of all Items stored in the list.
public  CollectiongetSortableContainerPropertyIds()
    
public  ClassgetType(Object propertyId)
     Gets the type of a Property stored in the list.
public  inthashCode()
    
public  intindexOfId(Object itemId)
     Get the index of an id.
public  booleanisFirstId(Object itemId)
     Tests if the Item corresponding to the given Item ID is the first Item in the list.
public  booleanisLastId(Object itemId)
     Tests if the Item corresponding to the given Item ID is the last Item in the list.
public  ObjectlastItemId()
     Gets the ID of the last Item in the list.
public  ObjectnextItemId(Object itemId)
     Gets the ID of the Item following the Item that corresponds to itemId.
public  ObjectprevItemId(Object itemId)
     Gets the ID of the Item preceding the Item that corresponds to itemId.
public  booleanremoveAllItems()
     Remove all Items from the list.
public  booleanremoveContainerProperty(Object propertyId)
     Remove a Property specified by the given Property ID from the list.
public  booleanremoveItem(Object itemId)
     Remove the Item corresponding to the given Item ID from the list.
public  voidremoveListener(Container.PropertySetChangeListener listener)
     Removes a previously registered Property set change listener.
public  voidremoveListener(Container.ItemSetChangeListener listener)
     Removes a Item set change listener from the object.
public  voidremoveListener(Property.ValueChangeListener listener)
     Removes a previously registered value change listener.
public  intsize()
     Gets the number of Items in the list.
public synchronized  voidsort(Object[] propertyId, boolean[] ascending)
    


Constructor Detail
IndexedContainer
public IndexedContainer()(Code)



IndexedContainer
public IndexedContainer(Collection itemIds)(Code)




Method Detail
addContainerProperty
public boolean addContainerProperty(Object propertyId, Class type, Object defaultValue)(Code)
Add a new Property to all Items in the list. The Property ID, data type and default value of the new Property are given as parameters.
Parameters:
  propertyId - ID of the new Property
Parameters:
  type - Data type of the new Property
Parameters:
  defaultValue - The value all created Properties are initialized to true if the operation succeeded,false if not



addItem
public Object addItem()(Code)
Create a new Item into the list, and assign it an automatic ID. The new ID is returned, or null if the operation fails. After a successful call you can use the IndexedContainer.getItem(Object ItemId) getItem method to fetch the Item. ID of the newly created Item, or null in case of afailure



addItem
public Item addItem(Object itemId)(Code)
Create a new Item with the given ID into the list. The new Item is returned, and it is ready to have its Properties modified. Returns null if the operation fails or the Container already contains a Item with the given ID.
Parameters:
  itemId - ID of the Item to be created Created new Item, or null in case of a failure



addItemAfter
public Item addItemAfter(Object previousItemId, Object newItemId)(Code)

See Also:   org.millstone.base.data.Container.Ordered.addItemAfter(ObjectObject)



addItemAfter
public Object addItemAfter(Object previousItemId)(Code)

See Also:   org.millstone.base.data.Container.Ordered.addItemAfter(Object)



addItemAt
public Item addItemAt(int index, Object newItemId)(Code)

See Also:   org.millstone.base.data.Container.Indexed.addItemAt(intObject)



addItemAt
public Object addItemAt(int index)(Code)

See Also:   org.millstone.base.data.Container.Indexed.addItemAt(int)



addListener
public void addListener(Container.PropertySetChangeListener listener)(Code)
Registers a new Property set change listener for this list.
Parameters:
  listener - the new Listener to be registered



addListener
public void addListener(Container.ItemSetChangeListener listener)(Code)
Adds a Item set change listener for the list.
Parameters:
  listener - listener to be added



addListener
public void addListener(Property.ValueChangeListener listener)(Code)
Registers a new value change listener for this object.
Parameters:
  listener - the new Listener to be registered



clone
public Object clone() throws CloneNotSupportedException(Code)



compare
public int compare(Object o1, Object o2)(Code)
Compare two items for sorting.
See Also:   java.util.Comparator.compare(java.lang.Objectjava.lang.Object)
See Also:    #sort((java.lang.Object[], boolean[])



containsId
public boolean containsId(Object itemId)(Code)
Tests if the list contains the specified Item
Parameters:
  itemId - ID the of Item to be tested for true if the operation succeeded,false if not



equals
public boolean equals(Object obj)(Code)



firstItemId
public Object firstItemId()(Code)
Gets the ID of the first Item in the list. ID of the first Item in the list



getContainerProperty
public Property getContainerProperty(Object itemId, Object propertyId)(Code)
Gets the Property identified by the given Item ID and Property ID from the lsit. If the list does not contain the Property, null is returned.
Parameters:
  itemId - ID of the Item which contains the requested Property
Parameters:
  propertyId - ID of the Property to retrieve Property with the given ID or null
See Also:   org.millstone.base.data.Container.getContainerProperty(ObjectObject)



getContainerPropertyIds
public Collection getContainerPropertyIds()(Code)
Gets the ID's of all Properties stored in the list. The ID's are returned as a unmodifiable collection. unmodifiable collection of Property IDs



getIdByIndex
public Object getIdByIndex(int index)(Code)
Get ID with the index. The following is true for the index: 0 <= index < size(). ID in the given index.
Parameters:
  index - Index of the requested ID in the container.



getItem
public Item getItem(Object itemId)(Code)
Gets the Item with the given Item ID from the list. If the list does not contain the requested Item, null is returned.
Parameters:
  itemId - ID of the Item to retrieve the Item with the given ID or null if the Item isnot found in the list



getItemIds
public Collection getItemIds()(Code)
Gets the ID's of all Items stored in the list. The ID's are returned as a unmodifiable collection. unmodifiable collection of Item IDs



getSortableContainerPropertyIds
public Collection getSortableContainerPropertyIds()(Code)



getType
public Class getType(Object propertyId)(Code)
Gets the type of a Property stored in the list.
Parameters:
  id - ID of the Property Type of the requested Property



hashCode
public int hashCode()(Code)



indexOfId
public int indexOfId(Object itemId)(Code)
Get the index of an id. The following is true for the index: 0 <= index < size(). Index of the Item or -1 if the Item is not in the container.
Parameters:
  itemId - ID of an Item in the collection



isFirstId
public boolean isFirstId(Object itemId)(Code)
Tests if the Item corresponding to the given Item ID is the first Item in the list.
Parameters:
  itemId - ID of an Item in the list true if the Item is first in the list,false if not



isLastId
public boolean isLastId(Object itemId)(Code)
Tests if the Item corresponding to the given Item ID is the last Item in the list.
Parameters:
  itemId - ID of an Item in the list true if the Item is last in the list,false if not



lastItemId
public Object lastItemId()(Code)
Gets the ID of the last Item in the list. ID of the last Item in the list



nextItemId
public Object nextItemId(Object itemId)(Code)
Gets the ID of the Item following the Item that corresponds to itemId. If the given Item is the last or not found in the list, null is returned.
Parameters:
  itemId - ID of an Item in the list ID of the next Item or null



prevItemId
public Object prevItemId(Object itemId)(Code)
Gets the ID of the Item preceding the Item that corresponds to itemId. If the given Item is the first or not found in the list, null is returned.
Parameters:
  itemId - ID of an Item in the list ID of the previous Item or null



removeAllItems
public boolean removeAllItems()(Code)
Remove all Items from the list. Note that Property ID and type information is preserved. true if the operation succeeded,false if not



removeContainerProperty
public boolean removeContainerProperty(Object propertyId)(Code)
Remove a Property specified by the given Property ID from the list. Note that the Property will be removed from all Items in the list.
Parameters:
  propertyId - ID of the Property to remove true if the operation succeeded,false if not



removeItem
public boolean removeItem(Object itemId)(Code)
Remove the Item corresponding to the given Item ID from the list.
Parameters:
  itemId - ID of the Item to remove true if the operation succeeded,false if not



removeListener
public void removeListener(Container.PropertySetChangeListener listener)(Code)
Removes a previously registered Property set change listener.
Parameters:
  listener - listener to be removed



removeListener
public void removeListener(Container.ItemSetChangeListener listener)(Code)
Removes a Item set change listener from the object.
Parameters:
  listener - listener to be removed



removeListener
public void removeListener(Property.ValueChangeListener listener)(Code)
Removes a previously registered value change listener.
Parameters:
  listener - listener to be removed



size
public int size()(Code)
Gets the number of Items in the list. number of Items in the list



sort
public synchronized void sort(Object[] propertyId, boolean[] ascending)(Code)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.