scala.actors.threadpool.Arrays类的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(7.2k)|赞(0)|评价(0)|浏览(211)

本文整理了Java中scala.actors.threadpool.Arrays类的一些代码示例,展示了Arrays类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Arrays类的具体详情如下:
包路径:scala.actors.threadpool.Arrays
类名称:Arrays

Arrays介绍

暂无

代码示例

代码示例来源:origin: org.sonatype.flexmojos/flexmojos-coverage-reporter

@SuppressWarnings( "unchecked" )
public CoverageReportRequest( File dataDirectory, List<String> formats, String encoding, File reportDirectory,
               File... sourcePath )
{
  super();
  this.dataDirectory = dataDirectory;
  this.formats = formats;
  this.encoding = encoding;
  this.reportDirectory = reportDirectory;
  this.sourcePath = Arrays.asList( sourcePath );
}

代码示例来源:origin: org.scala-lang/scala-actors

/**
 * @since 1.6
 */
public static Object[] copyOf(Object[] original, int newLength) {
  return copyOf(original, newLength, original.getClass());
}

代码示例来源:origin: org.scala-lang/scala-actors

/**
 * @since 1.6
 */
public static Object[] copyOfRange(Object[] original, int from, int to) {
  return copyOfRange(original, from, to, original.getClass());
}

代码示例来源:origin: org.scala-lang/scala-actors

/**
 * @since 1.5
 */
public static int deepHashCode(Object a[]) {
  if (a == null) return 0;
  int hash = 1;
  for (int i=0; i<a.length; i++) {
    Object e = a[i];
    hash = 31*hash +
        (e instanceof Object[]  ? deepHashCode((Object[])e) :
        (e instanceof byte[]    ? hashCode((byte[])e) :
        (e instanceof short[]   ? hashCode((short[])e) :
        (e instanceof int[]     ? hashCode((int[])e) :
        (e instanceof long[]    ? hashCode((long[])e) :
        (e instanceof char[]    ? hashCode((char[])e) :
        (e instanceof boolean[] ? hashCode((boolean[])e) :
        (e instanceof float[]   ? hashCode((float[])e) :
        (e instanceof double[]  ? hashCode((double[])e) :
        (e != null              ? e.hashCode() : 0))))))))));
  }
  return hash;
}

代码示例来源:origin: org.scala-lang.virtualized/scala-actors

e1.equals(e2) :
(e1 instanceof Object[] && e2 instanceof Object[]) ?
    deepEquals((Object[])e1, (Object[])e2) :
(e1 instanceof byte[] && e2 instanceof byte[]) ?
    equals((byte[])e1, (byte[])e2) :
(e1 instanceof short[] && e2 instanceof short[]) ?
    equals((short[])e1, (short[])e2) :
(e1 instanceof int[] && e2 instanceof int[]) ?
    equals((int[])e1, (int[])e2) :
(e1 instanceof long[] && e2 instanceof long[]) ?
    equals((long[])e1, (long[])e2) :
(e1 instanceof char[] && e2 instanceof char[]) ?
    equals((char[])e1, (char[])e2) :
(e1 instanceof boolean[] && e2 instanceof boolean[]) ?
    equals((boolean[])e1, (boolean[])e2) :
(e1 instanceof float[] && e2 instanceof float[]) ?
    equals((float[])e1, (float[])e2) :
(e1 instanceof double[] && e2 instanceof double[]) ?
    equals((double[])e1, (double[])e2) :
e1.equals(e2);

代码示例来源:origin: org.scala-lang.virtualized/scala-actors

else deepToString((Object[])e, buf, seen);
  (e instanceof byte[]) ? toString( (byte[]) e) :
  (e instanceof short[]) ? toString( (short[]) e) :
  (e instanceof int[]) ? toString( (int[]) e) :
  (e instanceof long[]) ? toString( (long[]) e) :
  (e instanceof char[]) ? toString( (char[]) e) :
  (e instanceof boolean[]) ? toString( (boolean[]) e) :
  (e instanceof float[]) ? toString( (float[]) e) :
  (e instanceof double[]) ? toString( (double[]) e) : "");

代码示例来源:origin: org.openimaj/sandbox

System.out.println(Arrays.toString(model));

代码示例来源:origin: org.scala-lang/scala-actors

else deepToString((Object[])e, buf, seen);
  (e instanceof byte[]) ? toString( (byte[]) e) :
  (e instanceof short[]) ? toString( (short[]) e) :
  (e instanceof int[]) ? toString( (int[]) e) :
  (e instanceof long[]) ? toString( (long[]) e) :
  (e instanceof char[]) ? toString( (char[]) e) :
  (e instanceof boolean[]) ? toString( (boolean[]) e) :
  (e instanceof float[]) ? toString( (float[]) e) :
  (e instanceof double[]) ? toString( (double[]) e) : "");

代码示例来源:origin: org.scala-lang.virtualized/scala-actors

/**
 * @since 1.5
 */
public static int deepHashCode(Object a[]) {
  if (a == null) return 0;
  int hash = 1;
  for (int i=0; i<a.length; i++) {
    Object e = a[i];
    hash = 31*hash +
        (e instanceof Object[]  ? deepHashCode((Object[])e) :
        (e instanceof byte[]    ? hashCode((byte[])e) :
        (e instanceof short[]   ? hashCode((short[])e) :
        (e instanceof int[]     ? hashCode((int[])e) :
        (e instanceof long[]    ? hashCode((long[])e) :
        (e instanceof char[]    ? hashCode((char[])e) :
        (e instanceof boolean[] ? hashCode((boolean[])e) :
        (e instanceof float[]   ? hashCode((float[])e) :
        (e instanceof double[]  ? hashCode((double[])e) :
        (e != null              ? e.hashCode() : 0))))))))));
  }
  return hash;
}

代码示例来源:origin: org.scala-lang/scala-actors

e1.equals(e2) :
(e1 instanceof Object[] && e2 instanceof Object[]) ?
    deepEquals((Object[])e1, (Object[])e2) :
(e1 instanceof byte[] && e2 instanceof byte[]) ?
    equals((byte[])e1, (byte[])e2) :
(e1 instanceof short[] && e2 instanceof short[]) ?
    equals((short[])e1, (short[])e2) :
(e1 instanceof int[] && e2 instanceof int[]) ?
    equals((int[])e1, (int[])e2) :

代码示例来源:origin: openimaj/openimaj

System.out.println(Arrays.toString(model));

代码示例来源:origin: net.flexmojos.oss/flexmojos-coverage-reporter

@SuppressWarnings( "unchecked" )
public CoverageReportRequest( File dataDirectory, List<String> formats, String encoding, File reportDirectory,
               File... sourcePath )
{
  super();
  this.dataDirectory = dataDirectory;
  this.formats = formats;
  this.encoding = encoding;
  this.reportDirectory = reportDirectory;
  this.sourcePath = Arrays.asList( sourcePath );
}

代码示例来源:origin: org.scala-lang.virtualized/scala-actors

/**
 * @since 1.6
 */
public static Object[] copyOf(Object[] original, int newLength) {
  return copyOf(original, newLength, original.getClass());
}

代码示例来源:origin: org.scala-lang.virtualized/scala-actors

/**
 * @since 1.6
 */
public static Object[] copyOfRange(Object[] original, int from, int to) {
  return copyOfRange(original, from, to, original.getClass());
}

代码示例来源:origin: org.fusesource.fabric/process-manager

public Command(String... command) {
  this(ImmutableList.copyOf(Arrays.asList(command)), DEFAULT_SUCCESSFUL_EXIT_CODES, DEFAULT_DIRECTORY, ImmutableMap.<String, String>of(), DEFAULT_TIME_LIMIT);
}

代码示例来源:origin: org.scala-lang.virtualized/scala-actors

public static Object[] collectionToArray(Collection c) {
  // guess the array size; expect to possibly be different
  int len = c.size();
  Object[] arr = new Object[len];
  Iterator itr = c.iterator();
  int idx = 0;
  while (true) {
    while (idx < len && itr.hasNext()) {
      arr[idx++] = itr.next();
    }
    if (!itr.hasNext()) {
      if (idx == len) return arr;
      // otherwise have to trim
      return Arrays.copyOf(arr, idx, Object[].class);
    }
    // otherwise, have to grow
    int newcap = ((arr.length/2)+1)*3;
    if (newcap < arr.length) {
      // overflow
      if (arr.length < Integer.MAX_VALUE) {
        newcap = Integer.MAX_VALUE;
      }
      else {
        throw new OutOfMemoryError("required array size too large");
      }
    }
    arr = Arrays.copyOf(arr, newcap, Object[].class);
    len = newcap;
  }
}

代码示例来源:origin: openimaj/openimaj

bv.setData( Arrays.copyOfRange( mfccs[0], 1, mfccs[0].length ) );

代码示例来源:origin: net.flexmojos.oss/flexmojos-maven-plugin

@SuppressWarnings( "unchecked" )
public static File[] getFiles( Artifact... dependencies )
{
  if ( dependencies == null )
  {
    return null;
  }
  final Set<File> filesSet = getFilesSet(Arrays.asList(dependencies));
  return filesSet.toArray(new File[filesSet.size()]);
}

代码示例来源:origin: org.scala-lang/scala-actors

public static Object[] collectionToArray(Collection c) {
  // guess the array size; expect to possibly be different
  int len = c.size();
  Object[] arr = new Object[len];
  Iterator itr = c.iterator();
  int idx = 0;
  while (true) {
    while (idx < len && itr.hasNext()) {
      arr[idx++] = itr.next();
    }
    if (!itr.hasNext()) {
      if (idx == len) return arr;
      // otherwise have to trim
      return Arrays.copyOf(arr, idx, Object[].class);
    }
    // otherwise, have to grow
    int newcap = ((arr.length/2)+1)*3;
    if (newcap < arr.length) {
      // overflow
      if (arr.length < Integer.MAX_VALUE) {
        newcap = Integer.MAX_VALUE;
      }
      else {
        throw new OutOfMemoryError("required array size too large");
      }
    }
    arr = Arrays.copyOf(arr, newcap, Object[].class);
    len = newcap;
  }
}

代码示例来源:origin: org.openimaj/sandbox

bv.setData( Arrays.copyOfRange( mfccs[0], 1, mfccs[0].length ) );

相关文章