Interface WeightsLong<K>

    • Method Detail

      • get

        long get​(K element)
        Get the weight associated with the given element.
        Parameters:
        element - an element (edge/vertex).
        Returns:
        the weight associated with the given element.
      • getAsObj

        @Deprecated
        default Long getAsObj​(K element)
        Deprecated.
        Description copied from interface: Weights
        Get the weight associated with the given element.

        This method return the weight as an object, and should not be used when its known what type the weights are.

        Specified by:
        getAsObj in interface Weights<K,​Long>
        Parameters:
        element - an element (edge/vertex)
        Returns:
        the weight associated with the given element
      • set

        void set​(K element,
                 long weight)
        Set the weight associated with the given element.
        Parameters:
        element - an element (edge/vertex).
        weight - new weight that will be associated with the given element
      • setAsObj

        @Deprecated
        default void setAsObj​(K element,
                              Long weight)
        Deprecated.
        Description copied from interface: Weights
        Set the weight associated with the given element.

        This method accept the weight as an object, and should not be used when its known what type the weights are.

        Specified by:
        setAsObj in interface Weights<K,​Long>
        Parameters:
        element - an element (edge/vertex)
        weight - new weight that will be associated with the given element
      • defaultWeight

        long defaultWeight()
        Get the default weight of this weights container.

        The default weight is the weight associated with all elements that were not explicitly set using set(Object, long).

        Returns:
        the default weight of this weights container.
      • defaultWeightAsObj

        @Deprecated
        default Long defaultWeightAsObj()
        Deprecated.
        Description copied from interface: Weights
        Get the default weight of this weights container.

        The default weight is the weight associated with all ids that were not explicitly set. This method return the default weight as an object, and should not be used when its known what type the weights are.

        Specified by:
        defaultWeightAsObj in interface Weights<K,​Long>
        Returns:
        the default weight of this weights container
      • weight

        default double weight​(K element)
        Get the weight of an element.

        Implement the WeightFunction interface by using the weights of the container.

        Specified by:
        weight in interface WeightFunction<K>
        Parameters:
        element - an element identifier
        Returns:
        the weight of the element