Java Doc for IntervalIterator.java in  » Search-Engine » mg4j » it » unimi » dsi » mg4j » search » 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 » Search Engine » mg4j » it.unimi.dsi.mg4j.search 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


it.unimi.dsi.mg4j.search.IntervalIterator

IntervalIterator
public interface IntervalIterator extends Iterator<Interval>(Code)
An iterator over . Apart for the usual methods of a (type-specific) iterator, it has a special (optional) IntervalIterator.reset() method that allows one to reset the iterator: the exact meaning of this operation is decided by the implementing classes. Typically, after a IntervalIterator.reset() , one can iterate over a new sequence.

Warning: from MG4J 1.2, most methods throw an IOException (such exceptions used to be catched and wrapped into a RuntimeException ).

This interface also specifies a method IntervalIterator.extent() returning a positive integer that is supposed to approximate the minimum possible length of an interval returned by this iterator. This method returns -1 if this extent cannot be computed.





Method Summary
public  intextent()
     Returns an approximation of a lower bound for the length of an interval returned by this iterator.
public  voidintervalTerms(IntSet terms)
     Provides the set of terms that span the current interval.

For each interval returned by MG4J, there is a set of terms that caused the interval to be returned. The terms appear inside the interval, and certainly at its extremes.

Note that the results of this method must be taken with a grain of salt: there might be different sets of terms causing the current interval, and only one will be returned.

public  Intervalnext()
     Returns the next interval.
public  IntervalnextInterval()
     Returns the next interval provided by this interval iterator, or null if no more intervals are available.

This method has been reintroduced in MG4J 1.2 with a different semantics. The special return value null is used to mark the end of iteration.

public  voidreset()
     Resets the internal state of this iterator for a new document.



Method Detail
extent
public int extent()(Code)
Returns an approximation of a lower bound for the length of an interval returned by this iterator. an approximation of a lower bound for the length of an interval.



intervalTerms
public void intervalTerms(IntSet terms)(Code)
Provides the set of terms that span the current interval.

For each interval returned by MG4J, there is a set of terms that caused the interval to be returned. The terms appear inside the interval, and certainly at its extremes.

Note that the results of this method must be taken with a grain of salt: there might be different sets of terms causing the current interval, and only one will be returned.
Parameters:
  terms - a set of integers that will be filled with the terms spanning the current interval.




next
public Interval next()(Code)
Returns the next interval. IntervalIterator.nextInterval()Iterator Iterator<Interval>IntervalIterator.nextInterval()
See Also:   IntervalIterator.nextInterval()



nextInterval
public Interval nextInterval() throws IOException(Code)
Returns the next interval provided by this interval iterator, or null if no more intervals are available.

This method has been reintroduced in MG4J 1.2 with a different semantics. The special return value null is used to mark the end of iteration. The reason for this change is providing fully lazy iteration over intervals. Fully lazy iteration does not provide an hasNext() method—you have to actually ask for the next element and check the return value. Fully lazy iteration is much lighter on method calls (half) and in most (if not all) MG4J classes leads to a much simpler logic. Moreover, IntervalIterator.nextInterval() can be specified as throwing an IOException , which avoids the pernicious proliferation of try/catch blocks in very short, low-level methods (it was having a detectable impact on performance). the next interval, or null if no more intervals are available.




reset
public void reset() throws IOException(Code)
Resets the internal state of this iterator for a new document.

To reduce object creation, interval iterators are usually created in a lazy fashion by document iterator when they are needed. However, this implies that every time the document iterator is moved, some internal state of the interval iterator must be reset (e.g., because on the new document some of the component interval iterators are now IntervalIterators.TRUE ).




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