Package lombok

Examples of lombok.val.toArray()


      {
        set.add(item);
        list.add(item);
      }

    return list.toArray();
  }

  /**
   * Returns the element at the given position in the provided sequence.
   *
 
View Full Code Here


      }
      catch(ClassCastException e)
      {}
    }

    return result.toArray();
  }

  /**
   * Orders a sequence by a specified key.
   *
 
View Full Code Here

    val result = new ReifiedArrayList<TResult>(DEFAULT_LIST_SIZE, keySelector.getParameterType1());
    for (List<TResult> list : dict.values())
      result.addAll(list);

    return result.toArray();
  }

  /**
   * Orders a sequence by a specified key.
   *
 
View Full Code Here

    // get all secondary dictionaries
    for (TreeMap<TKey2, List<TResult>> tree : dict.values())
      for (List<TResult> list : tree.values())
        result.addAll(list);

    return result.toArray();
  }

  /**
   * Partitions the given values based on a predicate. Matching values are first, non-matching second.
   *
 
View Full Code Here

      if (predicate.evaluate(item))
        matching.add(item);
      else
        nonMatching.add(item);

    return new Pair<T[], T[]>(matching.toArray(), nonMatching.toArray());
  }

  /**
   * Returns a range from the provided sequence. Inclusiveness is [start, finish) i.e. as in a For loop.
   *
 
View Full Code Here

    val result = new ReifiedArrayList<File>(64, File.class);
    for (File fi : files)
      if (!matchesAnyAttribute(fi, fileAttributes))
        result.add(fi);

    return result.toArray();
  }

  /**
   * Filters out files/directories which do not have the specified attributes.
   *
 
View Full Code Here

    val result = new ReifiedArrayList<File>(64, File.class);
    for (File fi : files)
      if (matchesAnyAttribute(fi, fileAttributes))
        result.add(fi);

    return result.toArray();
  }

  // Shortcuts
  /**
   * On Win32/Linux, creates a shortcut to a file or folder (use overloaded version for linking to an application). On OSX, creates a
View Full Code Here

    val result = new ReifiedArrayList<File>(64, File.class);
    for (File fi : files)
      if (!matchesAnyAttribute(fi, fileAttributes))
        result.add(fi);

    return result.toArray();
  }

  /**
   * Filters out files/directories which do not have the specified attributes.
   *
 
View Full Code Here

    val result = new ReifiedArrayList<File>(64, File.class);
    for (File fi : files)
      if (matchesAnyAttribute(fi, fileAttributes))
        result.add(fi);

    return result.toArray();
  }

  // Shortcuts
  /**
   * On Win32/Linux, creates a shortcut to a file or folder (use overloaded version for linking to an application). On OSX, creates a
View Full Code Here

    val result = new ReifiedArrayList<LongEntry<V>>(size, LongEntry.class);
    for (int i = 0; i < table.length; i++)
      if (table[i] != null)
        result.addAll(table[i].entries);

    return result.toArray();
  }

  /**
   * {@inheritDoc}
   *
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.