public int getDegree()

in src/main/java/org/apache/commons/graph/model/InMemoryPath.java [188:200]


    public int getDegree( V v )
    {
        v = checkNotNull( v, "Impossible to get the degree of a null vertex" );
        checkArgument( successors.containsKey( v ),
                       "Impossible to get the degree of input vertex; %s not contained in this path", v );

        if ( source.equals( v ) || target.equals( v ) )
        {
            return 1;
        }

        return 2;
    }