摘要:
for many sports fans worldwide, formula one racing is the pinnacle of all competitive racing. the degree of technology and skill that go into turning one lap in a formula one race car is unsurpasse......
摘要:
this article explores the recent trend toward open telecom platform solutions as proposed by three key industry consortia - picmg, osdl, and the sa forum - working in the areas of highly available ......
Generalized Enumeration Mechanism for Java @ JDJ
an iterator is a language mechanism that facilitates successive enumeration of all the elements of a collection in some definite order. java provides an iterator-like interface called enumeration. the implementation model imposed by enumerations is known as cursor objects. it is not a simple task, however, to develop enumerations for non-linear data structures or for those with complex control in terms of cursors. this is because the enumeration procedure for a cursor is confined to use only simple control structures.
in this article, a new iterator mechanism is proposed for java in which enumeration procedures can be described as if they were ordinary traversal procedures. it is fine to use arbitrary control structures such as recursive calls or infinite loops when developing enumeration procedures. iterators are defined to implement the enumeration interface and, thus, can be used in place of ordinary enumerations. the proposed iterator mechanism was implemented experimentally using threads and a zero-sized buffer.
introduction 【推荐阅读:浅谈Java与C#的事件处理机制】
summary
an abstract data type should provide enough operations so that everything users need to do with its objects can be done without inspecting the implementation details. since it is a common use of a collection to perform some action for its elements, we need a systematic way to access all elements. this method should be convenient to use and should not destruct the collection.
some programming languages, such as clu[1], sather[2] and icon[3], provide a mechanism called iterator (also known as enumerator) to handle this situation. in these languages, an iterator is invoked like a procedure but, instead of terminating with a result, it has many results which it produces one at a time. the produced items can be used in other parts that specify actions to be performed for each item.
iterators are more important in object-oriented programming than they were in other paradigms because programmers routinely construct abstract data types for collections in this paradigm. the author of the data abstraction must provide an iterator because the representation of the objects of the type is not known to the user.
java [4] provides an iterator-like interface called enume... 下一页
摘要:
in recent times, service oriented architectures (soa) have become synonymous with web services, in which large enterprise systems communicate business-critical information. however, in this series o......