org.babyfish.collection.ArrayList.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(8.1k)|赞(0)|评价(0)|浏览(171)

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

ArrayList.<init>介绍

暂无

代码示例

代码示例来源:origin: babyfish-ct/babyfish

@Override
  protected XList<E> createDefaultBase(
      UnifiedComparator<? super E> unifiedComparator) {
    return new ArrayList<E>(unifiedComparator);
  }
}

代码示例来源:origin: babyfish-ct/babyfish

public CoalesceExpression(XCriteriaBuilder criteriaBuilder) {
  super(criteriaBuilder);
  this.values = new ArrayList<>();
}

代码示例来源:origin: babyfish-ct/babyfish

public SearchedCaseExpression(XCriteriaBuilder criteriaBuilder) {
  super(criteriaBuilder);
  this.whenClauses = new ArrayList<>();
}

代码示例来源:origin: babyfish-ct/babyfish

protected static MethodNode createMethodNode(
    int access, String name, String desc, String signature, List<String> exceptions) {
  MethodNode methodNode = new MethodNode(Opcodes.ASM5);
  methodNode.access = access;
  methodNode.name = name;
  methodNode.desc = desc;
  methodNode.signature = signature;
  methodNode.exceptions = exceptions != null ? new ArrayList<String>() : new ArrayList<String>();
  methodNode.localVariables = new ArrayList<LocalVariableNode>();
  methodNode.tryCatchBlocks = new ArrayList<TryCatchBlockNode>();
  return methodNode;
}

代码示例来源:origin: babyfish-ct/babyfish

private static List<Column> sort(List<Column> columns) {
  List<Column> list = new ArrayList<>(columns);
  Collections.sort(list, new Comparator<Column>() {
    @Override
    public int compare(Column c1, Column c2) {
      return DbIdentifiers.laxIdentifier(c1.name).compareTo(
          DbIdentifiers.laxIdentifier(c2.name)
      );
    }
  });
  return list;
}

代码示例来源:origin: babyfish-ct/babyfish

private static List<Element> getChildElements(Element element, String childElementName) {
  List<Element> elements = new ArrayList<>();
  for (Node childNode = element.getFirstChild(); 
      childNode != null;
      childNode = childNode.getNextSibling()) {
    if (childNode instanceof Element && childNode.getLocalName().equals(childElementName)) {
      elements.add((Element)childNode);
    }
  }
  return elements;
}

代码示例来源:origin: babyfish-ct/babyfish

protected CriteriaUpdateImpl(XCriteriaBuilder criteriaBuilder) {
  super(criteriaBuilder);
  this.commonCriteriaStructure = new CommonCriteriaStructure(this);
  this.assignments = new ArrayList<>();
}

代码示例来源:origin: babyfish-ct/babyfish

public static QueryPath[] compile(String ... queryPaths) {
  List<QueryPath> list = new ArrayList<>();
  if (queryPaths != null) {
    for (String queryPath : queryPaths) {
      if (queryPath != null && !queryPath.isEmpty()) {
        list.addAll(compileViaCache(queryPath));
      }
    }
  }
  if (list.isEmpty()) {
    return EMPTY_QUERY_PATHS;
  }
  return list.toArray(new QueryPath[list.size()]);
}

代码示例来源:origin: babyfish-ct/babyfish

@Override
protected void onFrozen() {
  int size = this.values.size();
  int maxParationSize = this.maxPartitionSize;
  int partitionCount = (int)(((long)size + maxParationSize - 1) / maxParationSize);
  List<Partition<T>> partitions = new ArrayList<>(partitionCount);
  for (int i = 0; i < partitionCount; i++) {
    int from = i * maxParationSize;
    int to = Math.min(from + maxParationSize, size);
    partitions.add(new Partition<T>(this.values.subList(from, to)));
  }
  this.partitions = MACollections.unmodifiable(partitions);
}

代码示例来源:origin: babyfish-ct/babyfish

public ObjectModelMergeEventListener(Iterable<MergeEventListener> listeners) {
  Arguments.mustNotContainSpecialElements(
      "listeners", 
      Arguments.mustNotBeEmpty("listeners", Arguments.mustNotBeNull("listeners", listeners)), 
      ObjectModelMergeEventListener.class
  );
  List<MergeEventListener> list = new ArrayList<>();
  for (MergeEventListener listener : listeners) {
    list.add(listener);
  }
  this.listeners = list.toArray(new MergeEventListener[list.size()]);
}

代码示例来源:origin: babyfish-ct/babyfish

@Override
public void beginRead() {
  this.setInitializing(true);
  this.tempList = new ArrayList<E>(this.unifiedComparator());
}

代码示例来源:origin: babyfish-ct/babyfish

public SimpleCaseExpression(
    XCriteriaBuilder criteriaBuilder,
    Expression<? extends C> expression) {
  super(criteriaBuilder);
  Arguments.mustNotBeNull("expression", expression);
  this.mustUnderSameCriteriaBuilder("expression", expression);
  this.expression = expression;
  this.whenClauses = new ArrayList<WhenClause<C, R>>();
}

代码示例来源:origin: babyfish-ct/babyfish

@Override
protected Collection<MethodNode> getMoreMethodNodes(
    MethodSourceFactory methodSourceFactory) {
  List<MethodNode> methodNodes = new ArrayList<MethodNode>();
  methodNodes.add(this.createCompileForCount(false));
  methodNodes.add(this.createCompileForCount(true));
  methodNodes.add(this.createParseForCount(false, methodSourceFactory));
  methodNodes.add(this.createParseForCount(true, methodSourceFactory));
  return methodNodes;
}

代码示例来源:origin: babyfish-ct/babyfish

private void parseMappingFiles(Element persistenceUnit, PersistenceUnitInfoImpl unitInfo) {
  List<Element> files = getChildElements(persistenceUnit, MAPPING_FILE_NAME);
  List<String> mappingFileNames = new ArrayList<>(files.size());
  for (Element element : files) {
    String value = nullOrTrim(getValue(element).trim());
    if (value != null) {
      mappingFileNames.add(value);
    }
  }
  unitInfo.mappingFileNames = MACollections.unmodifiable(mappingFileNames);
}

代码示例来源:origin: babyfish-ct/babyfish

@Override
public Concat value(Expression<String> value) {
  this.checkState();
  Arguments.mustNotBeNull("value", value);
  this.mustUnderSameCriteriaBuilder("value", value);
  List<Expression<String>> values = this.values;
  if (values == null) {
    this.values = values = new ArrayList<>();
  }
  values.add(value);
  return this;
}

代码示例来源:origin: babyfish-ct/babyfish

private void parseManagedClasses(Element persistenceUnit, PersistenceUnitInfoImpl unitInfo) {
  List<Element> classes = getChildElements(persistenceUnit, MANAGED_CLASS_NAME);
  List<String> managedClassNames = new ArrayList<>(classes.size());
  for (Element element : classes) {
    String value = nullOrTrim(getValue(element));
    if (value != null) {
      managedClassNames.add(value);
    }
  }
  unitInfo.managedClassNames = MACollections.unmodifiable(managedClassNames);
}

代码示例来源:origin: babyfish-ct/babyfish

List<String> getExceptions() {
  if (this.methodNode != null) {
    return MACollections.unmodifiable(this.methodNode.exceptions);
  }
  Class<?>[] exceptionTypes = 
      this.method != null ? 
          this.method.getExceptionTypes() : 
          this.constructor.getExceptionTypes();
  List<String> list = new ArrayList<>(exceptionTypes.length);
  for (Class<?> exceptionType : exceptionTypes) {
    list.add(ASM.getInternalName(exceptionType));
  }
  return MACollections.unmodifiable(list);
}

代码示例来源:origin: babyfish-ct/babyfish

private void parseJarFiles(Element persistenceUnit, PersistenceUnitInfoImpl unitInfo) throws IOException {
  List<Element> jars = getChildElements(persistenceUnit, JAR_FILE_URL);
  List<URL> jarFileUrls = new ArrayList<>();
  URL rootURL = unitInfo.getPersistenceUnitRootUrl();
  for (Element element : jars) {
    String value = nullOrTrim(getValue(element));
    if (value != null) {
      URL url = this.getJarFileUrl(value, rootURL);
      jarFileUrls.add(url);
    }
  }
  unitInfo.jarFileUrls = MACollections.unmodifiable(jarFileUrls);
}

代码示例来源:origin: babyfish-ct/babyfish

public InPredicate(
    XCriteriaBuilder criteriaBuilder, 
    Expression<? extends T> expression) {
  super(criteriaBuilder);
  Arguments.mustNotBeNull("expression", expression);
  this.mustUnderSameCriteriaBuilder("expression", expression);
  this.expression = expression;
  this.values = new ArrayList<>();
  XEntityManagerFactory entityManagerFactory = criteriaBuilder.getEntityManagerFactory();
  Arguments.mustBeInstanceOfValue("entityManagerFactory", entityManagerFactory, EntityManagerFactoryConfigurable.class);
  this.maxPartitionSize = 
      ((EntityManagerFactoryConfigurable)entityManagerFactory)
      .getInPredicateMaxPartitionSize();
}

代码示例来源:origin: babyfish-ct/babyfish

@Override
public Collection<V> getQueuedOrphans(String entityName) {
  XMap<K, V> map = this.getQueuedOrphans();
  if (!map.isEmpty()) {
    XCollection<V> removals = new ArrayList<V>(map.valueUnifiedComparator(), map.size());
    for (V value : map.values()) {
      removals.add(value);
    }
    return getOrphans(removals, MACollections.<V>emptySet(), entityName, this.getSession());
  }
  else {
    return MACollections.<V>emptySet();
  }
}

相关文章

ArrayList类方法