/*
(non-Javadoc)

@see com.thedeanda.lorem.Lorem#getParagraphs(int, int)
501734
@Override
	public String getParagraphs(int min, int max) {
		int count = getCount(min, max);
		StringBuilder sb = new StringBuilder();
		for (int j = 0; j < count; j++) {
			int sentences = random.nextInt(5) + 2; // 2 to 6
			for (int i = 0; i < sentences; i++) {
				String first = getWords(1, 1, false);
				first = first.substring(0, 1).toUpperCase()
						+ first.substring(1);
				sb.append(first);

				sb.append(getWords(2, 20, false));
				sb.append(".  ");
			}
			sb.append("\n");
		}
		return sb.toString().trim();
	}
659204
public static <V> Set<V> getOutgoingVertices(DirectedGraph<V, DefaultEdge> graph, V source) {
        Set<DefaultEdge> edges = graph.outgoingEdgesOf(source);
        Set<V> targets = new LinkedHashSet<V>();
        for (DefaultEdge edge : edges) {
            targets.add(graph.getEdgeTarget(edge));
        }
        return targets;
    }
1015584
public List<ParameterType<ConstructorType<T>>> getAllParameter()
   {
      List<ParameterType<ConstructorType<T>>> list = new ArrayList<ParameterType<ConstructorType<T>>>();
      List<Node> nodeList = childNode.get("parameter");
      for(Node node: nodeList)
      {
         ParameterType<ConstructorType<T>>  type = new ParameterTypeImpl<ConstructorType<T>>(this, "parameter", childNode, node);
         list.add(type);
      }
      return list;
   }
337009
private Stream<Quad> fetchAllFromGraph(final String fromGraphName, final IRI toGraphName) {
        final Query q = new Query();
        q.setQuerySelectType();
        q.addResultVar(SUBJECT);
        q.addResultVar(PREDICATE);
        q.addResultVar(OBJECT);

        final ElementPathBlock epb = new ElementPathBlock();
        epb.addTriple(create(SUBJECT, PREDICATE, OBJECT));

        final ElementGroup elg = new ElementGroup();
        elg.addElement(new ElementNamedGraph(createURI(fromGraphName), epb));

        q.setQueryPattern(elg);

        final Stream.Builder<Quad> builder = builder();
        rdfConnection.querySelect(q, qs -> builder.accept(rdf.createQuad(toGraphName,
                        getSubject(qs), getPredicate(qs), getObject(qs))));
        return builder.build();
    }
514877
@Override
    public INDArray[] executeGraph(SameDiff sd) {
        return executeGraph(sd, ExecutorConfiguration.builder().outputMode(OutputMode.IMPLICIT).executionMode(ExecutionMode.SEQUENTIAL).profilingMode(OpExecutioner.ProfilingMode.DISABLED).build());
    }
512822
public static ParagraphVectors readParagraphVectors(InputStream stream) throws IOException {
        File tmpFile = DL4JFileUtils.createTempFile("restore", "paravec");
        try {
            FileUtils.copyInputStreamToFile(stream, tmpFile);
            return readParagraphVectors(tmpFile);
        } finally {
            tmpFile.delete();
        }
    }
401685
@SuppressWarnings("unchecked")
    private Set<Integer> getPredecessors(Graph g, Integer vertex) {
        // The DirectedGraph cast seems to change the return type of the set
        // from Set<Integer> to just Set
        if (g instanceof DirectedGraph) {
            DirectedGraph<?> dg = (DirectedGraph)g;
            return dg.predecessors(vertex);
        }
        else {
            return g.getNeighbors(vertex);
        }
    }
398236
public static String makeParagraphs (String text)
    {
        if (text == null) {
            return text;
        }
        // handle both line ending formats
        text = text.replace("\n\n", "\n<p>\n");
        text = text.replace("\r\n\r\n", "\r\n<p>\r\n");
        return text;
    }
59608
public Object getVertex(final Point2D point2D) {
        final GraphElementAccessor<?, ?> pickSupport = _visualizationViewer.getPickSupport();

        @SuppressWarnings("rawtypes") final Layout graphLayout = _visualizationViewer.getModel().getGraphLayout();

        @SuppressWarnings("unchecked") final Object vertex = pickSupport.getVertex(graphLayout, point2D.getX(), point2D.getY());

        return vertex;
    }
1307281
public ReadOnlyStyledDocumentBuilder<PS, SEG, S> addParagraph(List<SEG> segments, StyleSpans<S> styles) {
        return addParagraph(segments, styles, null);
    }
1262445
Map<String, AtlasVertex> findVertices(List<String> typeNames) throws RepositoryException {
        LOG.debug("Finding vertices for {}", typeNames.toString());
        Map<String, AtlasVertex> foundVertices = graphHelper.getVerticesForPropertyValues(Constants.TYPENAME_PROPERTY_KEY, typeNames);
        return foundVertices;

    }
422184
public List<Integer> getIntegerList(final String param) {
    return getList(param, new StringToInteger(),
        new AlwaysValid<Integer>(), "integer");
  }
124201
int getNumberOfAllTextParagraphs() {
    try {
      if (xPCursor == null) {
        return 0;
      }
      xPCursor.gotoStart(false);
      int nPara = 1;
      while (xPCursor.gotoNextParagraph(false)) nPara++;
      return nPara;
    } catch (Throwable t) {
      MessageHandler.printException(t);     // all Exceptions thrown by UnoRuntime.queryInterface are caught
      return 0;              // Return 0 as method failed
    }
  }
559956
@SuppressWarnings("rawtypes")
	public Class[] getParamtersTypes() {
		final Class[] types = new Class[this.paramters.length];
		for (int i = 0; i < types.length; i++) {
			types[i] = this.paramters[i].getClass();
		}
		return types;
	}
241963
public int getCount(G g) {
        Set<T> typeCounts = g.edgeTypes();
        LinkedList<Map.Entry<G,Integer>> graphs = typesToGraphs.get(typeCounts);
        if (graphs == null) 
            return 0;
        
        for (Map.Entry<G,Integer> e : graphs) {
            if (isoTest.areIsomorphic(g, e.getKey())) 
                return e.getValue();
        }
        return 0;
    }
968007
public java.util.List<ParameterValue> getParameterValues() {
        if (parameterValues == null) {
            parameterValues = new com.amazonaws.internal.SdkInternalList<ParameterValue>();
        }
        return parameterValues;
    }
536975
@NotNull
    public List<Integer> getIndexes(String name) {
        List<Integer> indexes = parametersMapping.get(name);
        if (indexes == null) {
            throw new IllegalArgumentException("Parameter not found: " + name);
        }
        return indexes;
    }