public class SourcedMatchData extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
SourcedMatchData.InputFormatException
Signals an incorrectly formatted MatchData file.
|
static class |
SourcedMatchData.Instance
A single item (aka record, string, etc) to match against
others.
|
static class |
SourcedMatchData.MatchIterator
Iterates over all stored StringWrappers
|
| Constructor and Description |
|---|
SourcedMatchData() |
SourcedMatchData(String filename)
Read match data from a file.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addInstance(String src,
String id,
String text)
Add a single instance, with given src and id, to the datafile
|
String |
getFilename() |
SourcedMatchData.Instance |
getInstance(String src,
int j)
Get the j-th record for the named source.
|
StringWrapperIterator |
getIterator() |
String |
getSource(int i)
Get string identifier for i-th source
|
static void |
main(String[] argv) |
int |
numInstances(String src)
Number of records for source with given string id
|
int |
numSources()
Number of sources in data set
|
String |
toString() |
public SourcedMatchData(String filename) throws SourcedMatchData.InputFormatException
public SourcedMatchData()
public void addInstance(String src, String id, String text)
public int numSources()
public String getSource(int i)
public int numInstances(String src)
public SourcedMatchData.Instance getInstance(String src, int j)
public StringWrapperIterator getIterator()
public String getFilename()
public static void main(String[] argv)
Copyright © 2016. All rights reserved.