- private final List<Prefix> _greatest_common_prefixes = new ArrayList<>();
- private final List<Prefix> _greatest_common_prefixes_up = new ArrayList<>();
- private final List<Prefix> _greatest_common_prefixes_down = new ArrayList<>();
+ private final List<Prefix> _greatest_common_prefixes = new ArrayList<Prefix>();
+ private final List<Prefix> _greatest_common_prefixes_up = new ArrayList<Prefix>();
+ private final List<Prefix> _greatest_common_prefixes_down = new ArrayList<Prefix>();
private List<Prefix> _all = null;
private List<Prefix> _collapsed = null;
private List<Prefix> _cleaned_spec = null;
private List<Prefix> _all = null;
private List<Prefix> _collapsed = null;
private List<Prefix> _cleaned_spec = null;
- _all = new ArrayList<>();
- _collapsed = new ArrayList<>();
- _cleaned_spec = new ArrayList<>();
+ _all = new ArrayList<Prefix>();
+ _collapsed = new ArrayList<Prefix>();
+ _cleaned_spec = new ArrayList<Prefix>();
- _all_up = new ArrayList<>();
- _collapsed_up = new ArrayList<>();
- _cleaned_spec_up = new ArrayList<>();
+ _all_up = new ArrayList<Prefix>();
+ _collapsed_up = new ArrayList<Prefix>();
+ _cleaned_spec_up = new ArrayList<Prefix>();
- _all_down = new ArrayList<>();
- _collapsed_down = new ArrayList<>();
- _cleaned_spec_down = new ArrayList<>();
+ _all_down = new ArrayList<Prefix>();
+ _collapsed_down = new ArrayList<Prefix>();
+ _cleaned_spec_down = new ArrayList<Prefix>();
final List<Prefix> cleaned,
final List<Prefix> collapsed,
final String separator ) {
final List<Prefix> cleaned,
final List<Prefix> collapsed,
final String separator ) {
- final List<Prefix> cleaned_spec = new ArrayList<>();
- final Set<String> collapsed_set = new HashSet<>();
+ final List<Prefix> cleaned_spec = new ArrayList<Prefix>();
+ final Set<String> collapsed_set = new HashSet<String>();
for( final Prefix prefix : cleaned ) {
if ( ( prefix.getConfidence() >= cutoff ) && !collapsed_set.contains( prefix.getPrefix() ) ) {
spec.add( prefix );
for( final Prefix prefix : cleaned ) {
if ( ( prefix.getConfidence() >= cutoff ) && !collapsed_set.contains( prefix.getPrefix() ) ) {
spec.add( prefix );
- final List<Prefix> collapsed = new ArrayList<>();
- final Set<String> firsts = new HashSet<>();
+ final List<Prefix> collapsed = new ArrayList<Prefix>();
+ final Set<String> firsts = new HashSet<String>();
double confidence_sum = 0;
for( final Prefix prefix : cleaned ) {
final String f = prefix.getPrefixFirstElement();
double confidence_sum = 0;
for( final Prefix prefix : cleaned ) {
final String f = prefix.getPrefixFirstElement();
private final static List<Prefix> obtainAllPrefixes( final List<Prefix> greatest_common_prefixes,
final String separator ) {
private final static List<Prefix> obtainAllPrefixes( final List<Prefix> greatest_common_prefixes,
final String separator ) {
for( final Prefix prefix : greatest_common_prefixes ) {
final List<String> prefixes = ForesterUtil.spliIntoPrefixes( prefix.getPrefix(), separator );
for( final String p : prefixes ) {
for( final Prefix prefix : greatest_common_prefixes ) {
final List<String> prefixes = ForesterUtil.spliIntoPrefixes( prefix.getPrefix(), separator );
for( final String p : prefixes ) {
for( final Entry<String, Double> entry : map.entrySet() ) {
l.add( new Prefix( entry.getKey(), entry.getValue(), separator ) );
}
for( final Entry<String, Double> entry : map.entrySet() ) {
l.add( new Prefix( entry.getKey(), entry.getValue(), separator ) );
}