private FieldIndex registerFieldIndex ( final int index , final InternalReadAccessor fieldExtractor ) { FieldIndex fieldIndex = null ; // is linkedlist null, if so create and add if ( this . hashedFieldIndexes == null ) { this . hashedFieldIndexes = new LinkedList < FieldIndex > ( ) ; fieldIndex = new FieldIndex ( index , fieldExtractor ) ; this . hashedFieldIndexes . add ( fieldIndex ) ; } // still null, so see if it already exists if ( fieldIndex == null ) { fieldIndex = findFieldIndex ( index ) ; } // doesn't exist so create it if ( fieldIndex == null ) { fieldIndex = new FieldIndex ( index , fieldExtractor ) ; this . hashedFieldIndexes . add ( fieldIndex ) ; } fieldIndex . increaseCounter ( ) ; return fieldIndex ; }
Returns a FieldIndex which Keeps a count on how many times a particular field is used with an equality check in the sinks .