Package org.jitterbit.util

Examples of org.jitterbit.util.Interval


    /**
     * Returns the text in the given row.
     *
     */
    public static String getRowText(Document doc, int rowNumber) {
        Interval range = rowAsInterval(doc, rowNumber);
        return getText(doc, range);
    }
View Full Code Here


    protected final Document getDocument() {
        return document;
    }

    public final void handleInsert(int offset, String text) {
        Interval i = IntervalFactory.fromStartAndLength(offset, text.length());
        Partition start = getStartPointForScan(i);
        int endPosition = calculateEndOfDamagedRegionOnInsert(offset, text);
        int tailShift = text.length();
        calculateDamage(start, endPosition, tailShift);
    }
View Full Code Here

            }
        }
    }

    public final void handleRemoval(int offset, int length, String text) {
        Interval i = IntervalFactory.fromStartAndLength(offset, length);
        Partition start = getStartPointForScan(i);
        int endPosition = calculateEndOfDamagedRegionOnRemoval(offset, length, text);
        calculateDamage(start, endPosition, -length);
    }
View Full Code Here

    public final void handleReplace(int offset, int length, String text) {
        if (length == 0) {
            handleInsert(offset, text);
        } else {
            Interval i = IntervalFactory.fromStartAndLength(offset, Math.max(length, text.length()));
            calculateDamage(i);
        }
    }
View Full Code Here

TOP

Related Classes of org.jitterbit.util.Interval

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.