protected void addUnit(final IAnnotationUnit unit) {
		int raterIdx = unit.getRaterIdx();
		if (raterIdx >= units.size()) {
			for (int i = units.size(); i < raterIdx; i++) {
                units.add(null);
            }
			units.add(unit);
		}
        else {
            units.set(raterIdx, unit);
        }

		if (unit.getCategory() != null) {
            nonNullCount++;
        }
	}
protected void addUnit ( final IAnnotationUnit unit ) { int raterIdx = unit . getRaterIdx ( ) ; if ( raterIdx >= units . size ( ) ) { for ( int i = units . size ( ) ; i < raterIdx ; i ++ ) { units . add ( null ) ; } units . add ( unit ) ; } else { units . set ( raterIdx , unit ) ; } if ( unit . getCategory ( ) != null ) { nonNullCount ++ ; } }
Adds the given unit to the coding study. Normally, the method
{@link CodingAnnotationStudy#addItem(Object...)} should be
used to define the annotation units of an item.