public static <T> T[] copyOf(final T[] iSource, final int iNewSize) { return (T[]) copyOf(iSource, iNewSize, iSource.getClass()); }
final ConsoleParameter annotation = (ConsoleParameter) paramAnn[annNum]; if (annotation.optional()) commandWords = OArrays.copyOf(commandWords, commandWords.length + 1); break;
final ConsoleParameter annotation = (ConsoleParameter) paramAnn[annNum]; if (annotation.optional()) commandWords = OArrays.copyOf(commandWords, commandWords.length + 1); break;
public static <T> T[] copyOf(final T[] iSource, final int iNewSize) { return (T[]) copyOf(iSource, iNewSize, iSource.getClass()); }
protected void addPolymorphicClusterId(int clusterId) { if (Arrays.binarySearch(polymorphicClusterIds, clusterId) >= 0) return; polymorphicClusterIds = OArrays.copyOf(polymorphicClusterIds, polymorphicClusterIds.length + 1); polymorphicClusterIds[polymorphicClusterIds.length - 1] = clusterId; Arrays.sort(polymorphicClusterIds); addClusterIdToIndexes(clusterId); for (OClassImpl superClass : superClasses) { superClass.addPolymorphicClusterId(clusterId); } }
protected OClass addClusterIdInternal(ODatabaseDocumentInternal database, final int clusterId) { acquireSchemaWriteLock(); try { checkEmbedded(); owner.checkClusterCanBeAdded(clusterId, this); for (int currId : clusterIds) if (currId == clusterId) // ALREADY ADDED return this; clusterIds = OArrays.copyOf(clusterIds, clusterIds.length + 1); clusterIds[clusterIds.length - 1] = clusterId; Arrays.sort(clusterIds); addPolymorphicClusterId(clusterId); if (defaultClusterId == NOT_EXISTENT_CLUSTER_ID) defaultClusterId = clusterId; ((OSchemaEmbedded) owner).addClusterForClass(database, clusterId, this); return this; } finally { releaseSchemaWriteLock(); } }