fj.data.List.append()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(4.9k)|赞(0)|评价(0)|浏览(118)

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

List.append介绍

[英]Appends the given list to this list.
[中]将给定列表追加到此列表。

代码示例

代码示例来源:origin: it.unibz.inf.ontop/ontop-optimization

public List<Function> getAllAtoms() {
  return nonPushableAtoms.append(pushableBoolAtoms);
}

代码示例来源:origin: org.functionaljava/functionaljava

/**
 * Appends the given list to this list.
 *
 * @param as The list to append.
 * @return A new list with the given list appended.
 */
public NonEmptyList<A> append(final List<A> as) {
 return nel(head, tail.append(as));
}

代码示例来源:origin: no.arktekk.unix/unix-common

public FileAttributes tags( List<String> tags )
{
  return new FileAttributes( user, group, mode, this.tags.append( tags ) );
}

代码示例来源:origin: org.functionaljava/functionaljava

/**
 * Creates a DList from a List
 */
public static <A> DList<A> listDList(final List<A> a) {
  return dlist((List<A> tail) -> Trampoline.pure(a.append(tail)));
}

代码示例来源:origin: no.arktekk.unix/unix-common

public FileAttributes addTag( String tag )
{
  return new FileAttributes( user, group, mode, tags.append( single( tag ) ) );
}

代码示例来源:origin: it.unibz.inf.ontop/ontop-optimization

List<Function> nonPushableAtoms = firstNonPushableAtoms.append(secondNonPushableAtoms);
List<Function> pushableAtoms = firstPushableAtoms.append(secondPushableAtoms).append(additionalEqualities);

代码示例来源:origin: org.functionaljava/functionaljava

/**
 * Returns the list of initial segments of this list, shortest first.
 *
 * @return The list of initial segments of this list, shortest first.
 */
public final List<List<A>> inits() {
 List<List<A>> s = single(List.nil());
 if (isNotEmpty())
  s = s.append(tail().inits().map(List.<A>cons().f(head())));
 return s;
}

代码示例来源:origin: org.functionaljava/functionaljava

/**
 * Removes the first element that equals the given object.
 * To remove all matches, use <code>removeAll(e.eq(a))</code>
 *
 * @param a The element to remove
 * @param e An <code>Equals</code> instance for the element's type.
 * @return A new list whose elements do not match the given predicate.
 */
public final List<A> delete(final A a, final Equal<A> e) {
 final P2<List<A>, List<A>> p = span(compose(not, e.eq(a)));
 return p._2().isEmpty() ? p._1() : p._1().append(p._2().tail());
}

代码示例来源:origin: it.unibz.inf.ontop/ontop-optimization

List<Function> nonPushableAtoms = mainAtomsResult.getNonPushableAtoms().append(otherAtomsP2._1());
List<Function> pushableAtoms = mainAtomsResult.getPushableBoolAtoms().append(otherAtomsP2._2());

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

@Override
  public P2<List<Function>, List<Function>> splitLeftJoinSubAtoms(List<Function> ljSubAtoms) {

    // TODO: make it static (performance improvement).
    F<Function, Boolean> isNotDataOrCompositeAtomFct = atom -> !(datalogTools.isDataOrLeftJoinOrJoinAtom(atom));

    /**
     * Left: left of the first data/composite atom (usually empty).
     *
     * The first data/composite atom is thus the first element of the right list.
     */
    P2<List<Function>, List<Function>> firstDataAtomSplit = ljSubAtoms.span(isNotDataOrCompositeAtomFct);
    Function firstDataAtom = firstDataAtomSplit._2().head();

    /**
     * Left: left of the second data/composite atom starting just after the first data/composite atom.
     *
     * Right: right part of the left join (includes the joining conditions, no problem).
     */
    P2<List<Function>, List<Function>> secondDataAtomSplit = firstDataAtomSplit._2().tail().span(
        isNotDataOrCompositeAtomFct);

    List<Function> leftAtoms = firstDataAtomSplit._1().snoc(firstDataAtom).append(secondDataAtomSplit._1());
    List<Function> rightAtoms = secondDataAtomSplit._2();

    return P.p(leftAtoms, rightAtoms);
  }
}

代码示例来源:origin: it.unibz.inf.ontop/ontop-optimization

append(rightNormalizationResults.getAllAtoms()).append(joiningEqualities);

代码示例来源:origin: it.unibz.inf.ontop/ontop-optimization

public static P2<List<Function>, List<Function>> splitLeftJoinSubAtoms(List<Function> ljSubAtoms) {
  // TODO: make it static (performance improvement).
  F<Function, Boolean> isNotDataOrCompositeAtomFct = atom -> !(isDataOrLeftJoinOrJoinAtom(atom));
  /**
   * Left: left of the first data/composite atom (usually empty).
   *
   * The first data/composite atom is thus the first element of the right list.
   */
  P2<List<Function>, List<Function>> firstDataAtomSplit = ljSubAtoms.span(isNotDataOrCompositeAtomFct);
  Function firstDataAtom = firstDataAtomSplit._2().head();
  /**
   * Left: left of the second data/composite atom starting just after the first data/composite atom.
   *
   * Right: right part of the left join (includes the joining conditions, no problem).
   */
  P2<List<Function>, List<Function>> secondDataAtomSplit = firstDataAtomSplit._2().tail().span(
      isNotDataOrCompositeAtomFct);
  List<Function> leftAtoms = firstDataAtomSplit._1().snoc(firstDataAtom).append(secondDataAtomSplit._1());
  List<Function> rightAtoms = secondDataAtomSplit._2();
  return P.p(leftAtoms, rightAtoms);
}

代码示例来源:origin: it.unibz.inf.ontop/ontop-optimization

List<Function> pushableAtoms = var2varEqualities.append(varConstantEqualities);

相关文章