src/main/java/com/o19s/es/termstat/TermStatSupplier.java
@Override
    public Set<Entry<String, ArrayList<Float>>> entrySet() {
        return new AbstractSet<Entry<String, ArrayList<Float>>>() {
            @Override
            public Iterator<Entry<String, ArrayList<Float>>> iterator() {
                return new Iterator<Entry<String, ArrayList<Float>>>() {
                    private int index;

                    @Override
                    public boolean hasNext() {
                        return index < ACCEPTED_KEYS.size();
                    }

                    @Override
                    public Entry<String, ArrayList<Float>> next() {
                        switch (index++) {
                            case 0:
                                return new SimpleImmutableEntry<>("df", df_stats.getData());
                            case 1:
                                return new SimpleImmutableEntry<>("idf", df_stats.getData());
                            case 2:
                                return new SimpleImmutableEntry<>("tf", df_stats.getData());
                            case 3:
                                return new SimpleImmutableEntry<>("ttf", df_stats.getData());
                            case 4:
                                return new SimpleImmutableEntry<>("tp", df_stats.getData());

                            default:
                                return null;
                        }
                    }
                };
            }

            @Override
            public int size() {
                // All stats objects will be the same size
                return idf_stats.getData().size();
            }
        };
    }
/**
     * Strictly speaking the only methods of this {@code Map} needed are
     * containsKey and get. The remaining methods help fix issues like
     * - deserialization of FEATURE_VECTOR parameter as a Map object
     * - keeps editors like intellij happy when debugging e.g. providing introspection into Map object.
     */
Strictly speaking the only methods of this  Map needed are
containsKey and get. The remaining methods help fix issues like
- deserialization of FEATURE_VECTOR parameter as a Map object
- keeps editors like intellij happy when debugging e.g. providing introspection into Map object.
Strictly speaking the only methods of this Map needed are containsKey and get . The remaining methods help fix issues like - deserialization of FEATURE_VECTOR parameter as a Map object - keeps editors like intellij happy when debugging e . g . providing introspection into Map object .
@Override
    public Set<Entry<String, ArrayList<Float>>> entrySet() {
        return new AbstractSet<Entry<String, ArrayList<Float>>>() {
            @Override
            public Iterator<Entry<String, ArrayList<Float>>> iterator() {
                return new Iterator<Entry<String, ArrayList<Float>>>() {
                    private int index;
                    @Override
                    public boolean hasNext() {
                        return index < ACCEPTED_KEYS.size();
                    }
                    @Override
                    public Entry<String, ArrayList<Float>> next() {
                        switch (index++) {
                            case 0:
                                return new SimpleImmutableEntry<>("df", df_stats.getData());
                            case 1:
                                return new SimpleImmutableEntry<>("idf", df_stats.getData());
                            case 2:
                                return new SimpleImmutableEntry<>("tf", df_stats.getData());
                            case 3:
                                return new SimpleImmutableEntry<>("ttf", df_stats.getData());
                            case 4:
                                return new SimpleImmutableEntry<>("tp", df_stats.getData());
                            default:
                                return null;
                        }
                    }
                };
            }
            @Override
            public int size() {
                return idf_stats.getData().size();
            }
        };
    }
@ Override public Set < Entry < String , ArrayList < Float > > > entrySet ( ) { return new AbstractSet < Entry < String , ArrayList < Float > > > ( ) { @ Override public Iterator < Entry < String , ArrayList < Float > > > iterator ( ) { return new Iterator < Entry < String , ArrayList < Float > > > ( ) { private int index ; @ Override public boolean hasNext ( ) { return index < ACCEPTED_KEYS . size ( ) ; } @ Override public Entry < String , ArrayList < Float > > next ( ) { switch ( index ++ ) { case 0 : return new SimpleImmutableEntry < > ( "df" , df_stats . getData ( ) ) ; case 1 : return new SimpleImmutableEntry < > ( "idf" , df_stats . getData ( ) ) ; case 2 : return new SimpleImmutableEntry < > ( "tf" , df_stats . getData ( ) ) ; case 3 : return new SimpleImmutableEntry < > ( "ttf" , df_stats . getData ( ) ) ; case 4 : return new SimpleImmutableEntry < > ( "tp" , df_stats . getData ( ) ) ; default : return null ; } } } ; } @ Override public int size ( ) { return idf_stats . getData ( ) . size ( ) ; } } ; }
Strictly speaking the only methods of this {@code Map} needed are
 containsKey and get.
Strictly speaking the only methods of this { @code Map } needed are containsKey and get .
// All stats objects will be the same size