martin.common
Class SentenceSplitter

java.lang.Object
  extended by martin.common.SentenceSplitter
All Implemented Interfaces:
java.lang.Iterable<Pair<java.lang.Integer>>, java.util.Iterator<Pair<java.lang.Integer>>

public class SentenceSplitter
extends java.lang.Object
implements java.util.Iterator<Pair<java.lang.Integer>>, java.lang.Iterable<Pair<java.lang.Integer>>


Field Summary
private  java.util.List<java.lang.Integer> breaks
           
(package private)  int c
           
 
Constructor Summary
SentenceSplitter(java.lang.String text)
           
SentenceSplitter(java.lang.String text, boolean splitOnLineBreaks)
           
 
Method Summary
 boolean hasNext()
           
 java.util.Iterator<Pair<java.lang.Integer>> iterator()
           
static void main(java.lang.String[] args)
           
 Pair<java.lang.Integer> next()
           
 void remove()
           
static java.util.List<Pair<java.lang.Integer>> toList(java.lang.String text)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

c

int c

breaks

private java.util.List<java.lang.Integer> breaks
Constructor Detail

SentenceSplitter

public SentenceSplitter(java.lang.String text)

SentenceSplitter

public SentenceSplitter(java.lang.String text,
                        boolean splitOnLineBreaks)
Method Detail

hasNext

public boolean hasNext()
Specified by:
hasNext in interface java.util.Iterator<Pair<java.lang.Integer>>

next

public Pair<java.lang.Integer> next()
Specified by:
next in interface java.util.Iterator<Pair<java.lang.Integer>>

remove

public void remove()
Specified by:
remove in interface java.util.Iterator<Pair<java.lang.Integer>>

iterator

public java.util.Iterator<Pair<java.lang.Integer>> iterator()
Specified by:
iterator in interface java.lang.Iterable<Pair<java.lang.Integer>>

toList

public static java.util.List<Pair<java.lang.Integer>> toList(java.lang.String text)

main

public static void main(java.lang.String[] args)