将一条路径转为最终结果

@param vertexList
@param offsetEnabled 是否计算offset
@return
768075
protected static List<Term> convert(List<Vertex> vertexList, boolean offsetEnabled)
    {
        assert vertexList != null;
        assert vertexList.size() >= 2 : "这条路径不应当短于2" + vertexList.toString();
        int length = vertexList.size() - 2;
        List<Term> resultList = new ArrayList<Term>(length);
        Iterator<Vertex> iterator = vertexList.iterator();
        iterator.next();
        if (offsetEnabled)
        {
            int offset = 0;
            for (int i = 0; i < length; ++i)
            {
                Vertex vertex = iterator.next();
                Term term = convert(vertex);
                term.offset = offset;
                offset += term.length();
                resultList.add(term);
            }
        }
        else
        {
            for (int i = 0; i < length; ++i)
            {
                Vertex vertex = iterator.next();
                Term term = convert(vertex);
                resultList.add(term);
            }
        }
        return resultList;
    }
650837
@Override
  public void enterVertex(GDLParser.VertexContext vertexContext) {
    String variable = getVariable(vertexContext.header());
    Vertex v;
    if (variable != null && userVertexCache.containsKey(variable)) {
      v = userVertexCache.get(variable);
    } else {
      v = initNewVertex(vertexContext);

      if (variable != null) {
        userVertexCache.put(variable, v);
      } else {
        variable = String.format(ANONYMOUS_VERTEX_VARIABLE, v.getId());
        autoVertexCache.put(variable, v);
      }
      v.setVariable(variable);
      vertices.add(v);
    }
    updateGraphElement(v);
    setLastSeenVertex(v);
    updateLastSeenEdge(v);
  }
700153
def _writeIndexListOffset(xmlWriter, offset):
    
    xmlIndexListOffset = ETREE.Element('indexListOffset')
    xmlIndexListOffset.text = str(offset)

    xmlWriter.write(xmlIndexListOffset, pretty_print=True)
555050
public LayoutScroller.ScrollableList getPageScrollable() {
        return new LayoutScroller.ScrollableList() {

            @Override
            public int getScrollingItemsCount() {
                return  MultiPageWidget.super.getScrollingItemsCount();
            }

            @Override
            public float getViewPortWidth() {
                return  MultiPageWidget.super.getViewPortWidth();
            }

            @Override
            public float getViewPortHeight() {
                return  MultiPageWidget.super.getViewPortHeight();
            }

            @Override
            public float getViewPortDepth() {
                return  MultiPageWidget.super.getViewPortDepth();
            }

            @Override
            public boolean scrollToPosition(int pos, final LayoutScroller.OnScrollListener listener) {
                return  MultiPageWidget.super.scrollToPosition(pos, listener);
            }

            @Override
            public boolean scrollByOffset(float xOffset, float yOffset, float zOffset,
                                          final LayoutScroller.OnScrollListener listener) {
                return  MultiPageWidget.super.scrollByOffset(xOffset, yOffset, zOffset, listener);
            }

            @Override
            public void registerDataSetObserver(DataSetObserver observer) {
                MultiPageWidget.super.registerDataSetObserver(observer);
            }

            @Override
            public void unregisterDataSetObserver(DataSetObserver observer) {
                MultiPageWidget.super.unregisterDataSetObserver(observer);
            }

            @Override
            public int getCurrentPosition() {
                return MultiPageWidget.super.getCurrentPosition();
            }

        };
    }
1083093
public VertexList vertexIds() {
        LongArrayList list = new LongArrayList();
        long previousId = 0;
        for (Long id : Iterables.transform(this,new Function<Entry, Long>() {
            @Nullable
            @Override
            public Long apply(@Nullable Entry entry) {
                return edgeSerializer.readRelation(entry,true,tx).getOtherVertexId();
            }
        })) {
            list.add(id);
            if (id>=previousId && previousId>=0) previousId=id;
            else previousId=-1;
        }
        return new VertexLongList(tx,list,previousId>=0);
    }
918621
@Override
    public int[] vertexColor() {
        int[] result = colors;
        if (result == null) {
            synchronized (this) {
                result = colors;
                if (result == null) {
                    colors = result = buildVertexColor();
                }
            }
        }
        return result;
    }
1349658
public float getBitangentZ(int vertex) {
        if (!hasTangentsAndBitangents()) {
            throw new IllegalStateException("mesh has no bitangents");
        }
        
        checkVertexIndexBounds(vertex);
        
        return m_bitangents.getFloat((vertex * 3 + 2) * SIZEOF_FLOAT);
    }
250867
public static <T> Query<T> queryWithPage(ExpressionList<T> expressionList, Pageable pageable) {
        Assert.notNull(expressionList, "expressionList must not null");
        Assert.notNull(pageable, "pageable must not null");
        return expressionList.setMaxRows(pageable.getPageSize())
                .setFirstRow((int) pageable.getOffset())
                .setOrder(Converters.convertToEbeanOrderBy(pageable.getSort()));
    }
38403
Segment getSegment(int vertex) {
		if (m_segments != null) {
			int vindex = getVertexIndex(vertex);
			return m_segments.get(vindex);
		}
		return null;
	}
541476
synchronized List<PageWrapper> getPagesSortedByOffset() {
        return this.pageByOffset
                .values().stream()
                .sorted(Comparator.comparingLong(PageWrapper::getOffset))
                .collect(Collectors.toList());
    }
426608
public void addEdge(VertexT from, VertexT to) {
    Preconditions.checkArgument(vertices.containsKey(from) && vertices.containsKey(to));
    adjacencyList.put(from, to);
    vertices.put(to, vertices.get(to) + 1);
  }
370761
int getAbsoluteOffset(int index) throws JMFUninitializedAccessException {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) JmfTr.entry(this, tc, "getAbsoluteOffset", new Object[]{Integer.valueOf(index)});

    MessageMap.Remap remap = map.fields[index];

    if (remap == null) {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) JmfTr.exit(this, tc, "getAbsoluteOffset", "JMFUninitializedAccessException");
      throw new JMFUninitializedAccessException(schema.getPathName(fields[index]) + " Schema: " + schema.getName());
    }

    int varOffset = remap.offsetIndex;
    varOffset = (varOffset < 0) ? 0 : oTable[varOffset];

    int result = dataOffset + varOffset + remap.fixedIncr;

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) JmfTr.exit(this, tc, "getAbsoluteOffset", Integer.valueOf(result));
    return result;
  }
98087
public static <T extends View> ArrayList<T> removeInvisibleViews(Iterable<T> viewList) {
		ArrayList<T> tmpViewList = new ArrayList<T>();
		for (T view : viewList) {
			if (view != null && view.isShown()) {
				tmpViewList.add(view);
			}
		}
		return tmpViewList;
	}
321898
protected ReadOnlyListWrapper<Point2ifx> innerPointsProperty() {
		if (this.coords == null) {
			this.coords = new ReadOnlyListWrapper<>(this, MathFXAttributeNames.COORDINATES,
					FXCollections.observableList(new ArrayList<>()));
		}
		return this.coords;
	}
1228190
public static NodeList toNodeList(Object o) throws PageException {
	// print.ln("nodeList:"+o);
	if (o instanceof NodeList) {
	    return (NodeList) o;
	}
	else if (o instanceof ObjectWrap) {
	    return toNodeList(((ObjectWrap) o).getEmbededObject());
	}
	throw new CasterException(o, "NodeList");
    }
1248330
protected List<Vertex> toVertexList(List<Term> wordList, boolean appendStart)
    {
        ArrayList<Vertex> vertexList = new ArrayList<Vertex>(wordList.size() + 2);
        if (appendStart) vertexList.add(Vertex.newB());
        for (Term word : wordList)
        {
            CoreDictionary.Attribute attribute = guessAttribute(word);
            Vertex vertex = new Vertex(word.word, attribute);
            vertexList.add(vertex);
        }
        if (appendStart) vertexList.add(Vertex.newE());
        return vertexList;
    }
1337934
Map<String, Vertex> getVertexCache(boolean includeUserDefined, boolean includeAutoGenerated) {
    return getCache(userVertexCache, autoVertexCache, includeUserDefined, includeAutoGenerated);
  }