File: BasicDistanceInstanceIterator.java

package info (click to toggle)
libsecondstring-java 0.1~dfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 764 kB
  • sloc: java: 9,592; xml: 114; makefile: 6
file content (16 lines) | stat: -rwxr-xr-x 564 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
package com.wcohen.ss;

import com.wcohen.ss.api.*;
import java.util.Iterator;

/** A simple DistanceInstanceIterator implementation. 
 */

public class BasicDistanceInstanceIterator implements DistanceInstanceIterator {
	private Iterator myIterator;
	public BasicDistanceInstanceIterator(Iterator i) { myIterator=i; }
	public boolean hasNext() { return myIterator.hasNext(); }
	public Object next() { return myIterator.next(); }
	public DistanceInstance nextDistanceInstance() { return (DistanceInstance)next(); }
	public void remove() { myIterator.remove(); }
}