テンプレートの入力規則の制約「リスト」を追加する。
<p>POI-3.7以上が必要。
@param sheet シート
@param constraints 制約とするコレクションの中身
@param startPosition 開始位置
@param endPosition 終了位置
340775
public static void setupExplicitListConstaint(final Sheet sheet, final Collection<String> constraints,
            final Point startPosition, final Point endPosition) {

        ArgUtils.notNull(sheet, "sheet");
        ArgUtils.notEmpty(constraints, "constraints");
        ArgUtils.notNull(startPosition, "startPosition");
        ArgUtils.notNull(endPosition, "endPosition");

        setupExplicitListConstaint(sheet, constraints.toArray(new String[constraints.size()]),
                startPosition, endPosition);
    }
815554
private Optional<CellPosition> getHeaderPosition(final Sheet sheet, final XlsVerticalRecords anno,
            final FieldAccessor accessor, final Configuration config) throws AnnotationInvalidException, CellNotFoundException {

        if(Utils.isNotEmpty(anno.headerAddress())) {
            try {
                return Optional.of(CellPosition.of(anno.headerAddress()));

            } catch(IllegalArgumentException e) {
                throw new AnnotationInvalidException(anno, MessageBuilder.create("anno.attr.invalidAddress")
                        .var("property", accessor.getNameWithClass())
                        .varWithAnno("anno", XlsVerticalRecords.class)
                        .var("attrName", "headerAddress")
                        .var("attrValue", anno.headerAddress())
                        .format());

            }

        } else if(Utils.isNotEmpty(anno.tableLabel())) {
            try {
                final Cell labelCell = CellFinder.query(sheet, anno.tableLabel(), config).findWhenNotFoundException();

                if(anno.tableLabelAbove()) {
                    // 表の見出しが上にある場合、左側に補正する
                    int initColumn = labelCell.getColumnIndex() + anno.right()-1;
                    int initRow = labelCell.getRowIndex() + anno.bottom();
                    return Optional.of(CellPosition.of(initRow, initColumn));

                } else {

                    int initColumn = labelCell.getColumnIndex() + anno.right();
                    int initRow = labelCell.getRowIndex();
                    return Optional.of(CellPosition.of(initRow, initColumn));

                }

            } catch(CellNotFoundException ex) {
                if(anno.optional()) {
                    return Optional.empty();
                } else {
                    throw ex;
                }
            }
        } else {
            if(anno.headerRow() < 0) {
                throw  new AnnotationInvalidException(anno, MessageBuilder.create("anno.attr.min")
                        .var("property", accessor.getNameWithClass())
                        .varWithAnno("anno", XlsVerticalRecords.class)
                        .var("attrName", "headerRow")
                        .var("attrValue", anno.headerRow())
                        .var("min", 0)
                        .format());
            }

            if(anno.headerColumn() < 0) {
                throw new AnnotationInvalidException(anno, MessageBuilder.create("anno.attr.min")
                        .var("property", accessor.getNameWithClass())
                        .varWithAnno("anno", XlsVerticalRecords.class)
                        .var("attrName", "column")
                        .var("attrValue", anno.headerColumn())
                        .var("min", 0)
                        .format());

            }
            return Optional.of(CellPosition.of(anno.headerRow(), anno.headerColumn()));
        }
    }
278526
public void addConstraint( final FieldConstraint constraint ) {
        if ( this.constraints == null ) {
            this.constraints = new FieldConstraint[ 1 ];
            this.constraints[ 0 ] = constraint;
        } else {
            final FieldConstraint[] newList = new FieldConstraint[ this.constraints.length + 1 ];
            for ( int i = 0; i < this.constraints.length; i++ ) {
                newList[ i ] = this.constraints[ i ];
            }
            newList[ this.constraints.length ] = constraint;
            this.constraints = newList;
        }
    }
717194
public static AreaReference buildNameArea(final String sheetName,
            final Point startPosition, final Point endPosition, SpreadsheetVersion sheetVersion) {

        ArgUtils.notEmpty(sheetName, "sheetName");
        ArgUtils.notNull(startPosition, "startPosition");
        ArgUtils.notNull(endPosition, "endPosition");

        final CellReference firstRefs = new CellReference(sheetName, startPosition.y, startPosition.x, true, true);
        final CellReference lastRefs = new CellReference(sheetName, endPosition.y, endPosition.x, true, true);

        return new AreaReference(firstRefs, lastRefs, sheetVersion);
    }
163530
public static Name defineName(final Sheet sheet, final String name,
            final Point startPosition, final Point endPosition) {

        ArgUtils.notNull(sheet, "sheet");
        ArgUtils.notEmpty(name, "name");
        ArgUtils.notNull(startPosition, "startPosition");
        ArgUtils.notNull(endPosition, "endPosition");

        final Workbook workbook = sheet.getWorkbook();
        Name nameObj = workbook.getName(name);
        if(nameObj == null) {
            nameObj = workbook.createName();
            nameObj.setNameName(name);
        }

        final AreaReference areaRef = buildNameArea(sheet.getSheetName(), startPosition, endPosition,
                sheet.getWorkbook().getSpreadsheetVersion());
        nameObj.setRefersToFormula(areaRef.formatAsString());

        return nameObj;

    }
439105
function( startNode, startOffset ) {
			// W3C requires a check for the new position. If it is after the end
			// boundary, the range should be collapsed to the new start. It seams
			// we will not need this check for our use of this class so we can
			// ignore it for now.

			// Fixing invalid range start inside dtd empty elements.
			if ( startNode.type == CKEDITOR.NODE_ELEMENT && CKEDITOR.dtd.$empty[ startNode.getName() ] )
				startOffset = startNode.getIndex(), startNode = startNode.getParent();

			this.startContainer = startNode;
			this.startOffset = startOffset;

			if ( !this.endContainer ) {
				this.endContainer = startNode;
				this.endOffset = startOffset;
			}

			updateCollapsed( this );
		}
573128
function adjustStartPoint(rowIndex, cellIndex, cell, isSelectedCell) {
            if (rowIndex === _startPoint.rowPos && _startPoint.colPos >= cell.cellIndex && cell.cellIndex <= cellIndex && !isSelectedCell) {
                _startPoint.colPos++;
            }
        }
1365816
public void setGranulePosition(long position) {
        currentGranulePosition = position;
        for(OggPage p : buffer) {
            p.setGranulePosition(position);
        }
    }
456006
@UiThread
    public void collapseParentRange(int startParentPosition, int parentCount) {
        int endParentPosition = startParentPosition + parentCount;
        for (int i = startParentPosition; i < endParentPosition; i++) {
            collapseParent(i);
        }
    }
350219
@Override
	public Color put(Double position, Color color) {
		if( position == null ) {
			throw new NullPointerException("Null endpoint position");
		}
		if( color == null ){
			throw new NullPointerException("Null colors are not allowed.");
		}
		return mapping.put(position, color);
	}
982882
public void setupCellPositoin(final CellPosition address) {
        ArgUtils.notNull(address, "address");
        setupCellPositoin(address.getRow(), address.getColumn());
    }
631046
@Override
    public void position(long pos) {
        log.debug("position: {}", pos);
        currentFrame = getFrame(pos);
        log.debug("Setting current sample: {}", currentFrame);
    }
819320
public void calculateEndPoints(double start, double stop) {

		Point p1 = points.get(0);
		if (p1.getX().doubleValue() != start) {
			points.add(0, new Point(start, p1.getY()));
		}

		int end = points.size();
		Point p2 = points.get(end - 1);
		if (p2.getY().doubleValue() != stop) {
			points.add(end, new Point(stop, p2.getY()));
		}
	}
29333
public void insertWith(int insertPosition, List<BaseCell> list) {
        int newItemSize = list != null ? list.size() : 0;
        if (newItemSize > 0 && mGroupBasicAdapter != null) {
            if (insertPosition >= mGroupBasicAdapter.getItemCount()) {
                insertPosition = mGroupBasicAdapter.getItemCount() - 1;
            }
            BaseCell insertCell = mGroupBasicAdapter.getItemByPosition(insertPosition);
            int cardIdx = mGroupBasicAdapter.findCardIdxFor(insertPosition);
            Card card = mGroupBasicAdapter.getCardRange(cardIdx).second;
            card.addCells(card, card.getCells().indexOf(insertCell), list);
            List<LayoutHelper> layoutHelpers = getLayoutManager().getLayoutHelpers();
            if (layoutHelpers != null && cardIdx >= 0 && cardIdx < layoutHelpers.size()) {
                for (int i = 0, size = layoutHelpers.size(); i < size; i++) {
                    LayoutHelper layoutHelper = layoutHelpers.get(i);
                    int start = layoutHelper.getRange().getLower();
                    int end = layoutHelper.getRange().getUpper();
                    if (end < insertPosition) {
                        //do nothing
                    } else if (start <= insertPosition && insertPosition <= end) {
                        layoutHelper.setItemCount(layoutHelper.getItemCount() + newItemSize);
                        layoutHelper.setRange(start, end + newItemSize);
                    } else if (insertPosition < start) {
                        layoutHelper.setRange(start + newItemSize, end + newItemSize);
                    }
                }
                mGroupBasicAdapter.insertComponents(insertPosition, list);
            }
        }
    }
771430
function Position(start) {
    this.start = start;
    this.end = { line: lineno, column: column };
    this.source = options.source;
  }
767570
public void add(MultiVertexGeometryImpl src, int beginIndex, int endIndex) {
		int endIndexC = endIndex < 0 ? src.getPointCount() : endIndex;
		if (beginIndex < 0 || beginIndex > src.getPointCount()
				|| endIndexC < beginIndex)
			throw new IllegalArgumentException();

		if (beginIndex == endIndexC)
			return;

		mergeVertexDescription(src.getDescription());
		int count = endIndexC - beginIndex;
		int oldPointCount = m_pointCount;
		resize(m_pointCount + count);
		_verifyAllStreams();
		for (int iattrib = 0, nattrib = src.getDescription()
				.getAttributeCount(); iattrib < nattrib; iattrib++) {
			int semantics = src.getDescription()._getSemanticsImpl(iattrib);
			int ncomps = VertexDescription.getComponentCount(semantics);
			AttributeStreamBase stream = getAttributeStreamRef(semantics);
			AttributeStreamBase srcStream = src
					.getAttributeStreamRef(semantics);
			stream.insertRange(oldPointCount * ncomps, srcStream, beginIndex
					* ncomps, count * ncomps, true, 1, oldPointCount * ncomps);
		}
	}
792503
private void setPosition(CmsPositionBean position) {

        m_currentPosition = position;
        setSelectPosition(position.getLeft(), position.getTop(), position.getHeight(), position.getWidth());
    }