Tabnine Logo
Diff
Code IndexAdd Tabnine to your IDE (free)

How to use
Diff
in
org.apache.wicket.util.diff

Best Java code snippets using org.apache.wicket.util.diff.Diff (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
List l =
  • Codota Iconnew ArrayList()
  • Codota Iconnew LinkedList()
  • Smart code suggestions by Tabnine
}
origin: org.apache.wicket/wicket-util

/**
 * compute the difference between an original and a revision.
 * 
 * @param orig
 *            the original
 * @param rev
 *            the revision to compare with the original.
 * @param algorithm
 *            the difference algorithm to use
 * @return a Revision describing the differences
 * @throws DifferentiationFailedException
 */
public static Revision diff(final Object[] orig, final Object[] rev,
  final DiffAlgorithm algorithm) throws DifferentiationFailedException
{
  if ((orig == null) || (rev == null))
  {
    throw new IllegalArgumentException();
  }
  return new Diff(orig, algorithm).diff(rev);
}
origin: org.apache.wicket/com.springsource.org.apache.wicket

/**
 * Converts an array of {@link Object Object} to a string using {@link Diff#NL Diff.NL} as the
 * line separator.
 * 
 * @param o
 *            the array of objects.
 * @return String
 */
public static String arrayToString(Object[] o)
{
  return arrayToString(o, Diff.NL);
}
origin: org.apache.wicket/wicket-util

/**
 * Performs random edits on the input sequence. Useful for testing.
 * 
 * @param text
 *            The input sequence.
 * @return The sequence with random edits performed.
 */
public static Object[] randomEdit(final Object[] text)
{
  return randomEdit(text, text.length);
}
origin: org.ops4j.pax.wicket/pax-wicket-service

/**
 * compute the difference between an original and a revision.
 * 
 * @param orig
 *            the original
 * @param rev
 *            the revision to compare with the original.
 * @return a Revision describing the differences
 * @throws DifferentiationFailedException
 */
public static Revision diff(Object[] orig, Object[] rev) throws DifferentiationFailedException
{
  if (orig == null || rev == null)
  {
    throw new IllegalArgumentException();
  }
  return diff(orig, rev, null);
}
origin: org.apache.wicket/com.springsource.org.apache.wicket

/**
 * Shuffles around the items in the input sequence.
 * 
 * @param text
 *            the input sequence.
 * @return The shuffled sequence.
 */
public static Object[] shuffle(Object[] text)
{
  return shuffle(text, text.length);
}
origin: org.apache.wicket/wicket-util

/**
 * Generate a random sequence of the given size.
 * 
 * @param size
 *            the size of the sequence to generate.
 * @return The generated sequence.
 */
public static Object[] randomSequence(final int size)
{
  return randomSequence(size, size);
}
origin: org.ops4j.pax.wicket/pax-wicket-service

/**
 * Create a differencing object using the given algorithm
 * 
 * @param original
 *            the original text that will be compared
 * @param algorithm
 *            the difference algorithm to use.
 */
public Diff(Object[] original, DiffAlgorithm algorithm)
{
  if (original == null)
  {
    throw new IllegalArgumentException();
  }
  orig = original;
  if (algorithm != null)
  {
    this.algorithm = algorithm;
  }
  else
  {
    this.algorithm = defaultAlgorithm();
  }
}
origin: org.apache.wicket/com.springsource.org.apache.wicket

/**
 * compute the difference between an original and a revision.
 * 
 * @param orig
 *            the original
 * @param rev
 *            the revision to compare with the original.
 * @return a Revision describing the differences
 * @throws DifferentiationFailedException
 */
public static Revision diff(Object[] orig, Object[] rev) throws DifferentiationFailedException
{
  if (orig == null || rev == null)
  {
    throw new IllegalArgumentException();
  }
  return diff(orig, rev, null);
}
origin: org.apache.wicket/wicket-util

/**
 * Shuffles around the items in the input sequence.
 * 
 * @param text
 *            the input sequence.
 * @return The shuffled sequence.
 */
public static Object[] shuffle(final Object[] text)
{
  return shuffle(text, text.length);
}
origin: org.apache.wicket/com.springsource.org.apache.wicket

/**
 * Generate a random sequence of the given size.
 * 
 * @param size
 *            the size of the sequence to generate.
 * @return The generated sequence.
 */
public static Object[] randomSequence(int size)
{
  return randomSequence(size, size);
}
origin: org.apache.wicket/wicket-util

/**
 * Create a differencing object using the given algorithm
 * 
 * @param original
 *            the original text that will be compared
 * @param algorithm
 *            the difference algorithm to use.
 */
public Diff(final Object[] original, final DiffAlgorithm algorithm)
{
  if (original == null)
  {
    throw new IllegalArgumentException();
  }
  orig = original;
  if (algorithm != null)
  {
    this.algorithm = algorithm;
  }
  else
  {
    this.algorithm = defaultAlgorithm();
  }
}
origin: org.apache.wicket/com.springsource.org.apache.wicket

/**
 * compute the difference between an original and a revision.
 * 
 * @param orig
 *            the original
 * @param rev
 *            the revision to compare with the original.
 * @param algorithm
 *            the difference algorithm to use
 * @return a Revision describing the differences
 * @throws DifferentiationFailedException
 */
public static Revision diff(Object[] orig, Object[] rev, DiffAlgorithm algorithm)
    throws DifferentiationFailedException
{
  if (orig == null || rev == null)
  {
    throw new IllegalArgumentException();
  }
  return new Diff(orig, algorithm).diff(rev);
}
origin: org.apache.wicket/wicket-util

/**
 * compute the difference between an original and a revision.
 * 
 * @param orig
 *            the original
 * @param rev
 *            the revision to compare with the original.
 * @return a Revision describing the differences
 * @throws DifferentiationFailedException
 */
public static Revision diff(final Object[] orig, final Object[] rev)
  throws DifferentiationFailedException
{
  if ((orig == null) || (rev == null))
  {
    throw new IllegalArgumentException();
  }
  return diff(orig, rev, null);
}
origin: org.apache.wicket/com.springsource.org.apache.wicket

/**
 * Performs random edits on the input sequence. Useful for testing.
 * 
 * @param text
 *            The input sequence.
 * @return The sequence with random edits performed.
 */
public static Object[] randomEdit(Object[] text)
{
  return randomEdit(text, text.length);
}
origin: org.apache.wicket/wicket-util

/**
 * Converts an array of {@link Object Object} to a string using {@link Diff#NL Diff.NL} as the
 * line separator.
 * 
 * @param o
 *            the array of objects.
 * @return String
 */
public static String arrayToString(final Object[] o)
{
  return arrayToString(o, Diff.NL);
}
origin: org.ops4j.pax.wicket/pax-wicket-service

/**
 * Shuffles around the items in the input sequence.
 * 
 * @param text
 *            the input sequence.
 * @return The shuffled sequence.
 */
public static Object[] shuffle(Object[] text)
{
  return shuffle(text, text.length);
}
origin: org.ops4j.pax.wicket/pax-wicket-service

/**
 * Generate a random sequence of the given size.
 * 
 * @param size
 *            the size of the sequence to generate.
 * @return The generated sequence.
 */
public static Object[] randomSequence(int size)
{
  return randomSequence(size, size);
}
origin: org.apache.wicket/com.springsource.org.apache.wicket

/**
 * Create a differencing object using the given algorithm
 * 
 * @param original
 *            the original text that will be compared
 * @param algorithm
 *            the difference algorithm to use.
 */
public Diff(Object[] original, DiffAlgorithm algorithm)
{
  if (original == null)
  {
    throw new IllegalArgumentException();
  }
  orig = original;
  if (algorithm != null)
  {
    this.algorithm = algorithm;
  }
  else
  {
    this.algorithm = defaultAlgorithm();
  }
}
origin: org.ops4j.pax.wicket/pax-wicket-service

/**
 * compute the difference between an original and a revision.
 * 
 * @param orig
 *            the original
 * @param rev
 *            the revision to compare with the original.
 * @param algorithm
 *            the difference algorithm to use
 * @return a Revision describing the differences
 * @throws DifferentiationFailedException
 */
public static Revision diff(Object[] orig, Object[] rev, DiffAlgorithm algorithm)
  throws DifferentiationFailedException
{
  if (orig == null || rev == null)
  {
    throw new IllegalArgumentException();
  }
  return new Diff(orig, algorithm).diff(rev);
}
origin: org.apache.wicket/com.springsource.org.apache.wicket

public boolean checkLicenseHeader(File file)
{
  Revision revision = null;
  try
  {
    String header = extractLicenseHeader(file, 0, 16);
    revision = Diff.diff(getLicenseHeader().split(LINE_ENDING), header.split(LINE_ENDING));
  }
  catch (Exception e)
  {
    Assert.fail(e.getMessage());
  }
  return revision.size() == 0;
}
org.apache.wicket.util.diffDiff

Javadoc

Implements a differencing engine that works on arrays of Object.

Within this library, the word text means a unit of information subject to version control.

Text is represented as Object[] because the diff engine is capable of handling more than plain ascci. In fact, arrays of any type that implements java.lang.Object#hashCode and java.lang.Object#equals correctly can be subject to differencing using this library.

This library provides a framework in which different differencing algorithms may be used. If no algorithm is specified, a default algorithm is used.

Most used methods

  • <init>
    Create a differencing object using the given algorithm
  • diff
    compute the difference between an original and a revision.
  • arrayToString
  • defaultAlgorithm
  • randomEdit
    Performs random edits on the input sequence. Useful for testing.
  • randomSequence
    Generate a random sequence of the given size.
  • shuffle
    Shuffles around the items in the input sequence.

Popular in Java

  • Creating JSON documents from java classes using gson
  • setContentView (Activity)
  • findViewById (Activity)
  • onRequestPermissionsResult (Fragment)
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • Runner (org.openjdk.jmh.runner)
  • Option (scala)
  • Sublime Text for Python
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now