Package com.jgalgo.graph
Interface IWeightsObj<T>
-
- Type Parameters:
T
- the weights type
- All Superinterfaces:
IWeights<T>
,Weights<Integer,T>
,WeightsObj<Integer,T>
public interface IWeightsObj<T> extends IWeights<T>, WeightsObj<Integer,T>
Specific weights ofObject
for int graphs.- Author:
- Barak Ugav
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description T
get(int element)
Get the weight associated with the given element.default T
get(Integer element)
Deprecated.Please useget(int)
instead to avoid un/boxing.default T
getAsObj(int element)
Deprecated.Please useget(int)
instead to avoid un/boxing.default T
getAsObj(Integer element)
Deprecated.Please useget(int)
instead to avoid un/boxing.void
set(int element, T weight)
Set the weight associated with the given element.default void
set(Integer element, T weight)
Deprecated.Please useset(int, Object)
instead to avoid un/boxing.default void
setAsObj(int element, T weight)
Deprecated.Please useset(int, Object)
instead to avoid un/boxing.default void
setAsObj(Integer element, T weight)
Deprecated.Please useset(int, Object)
instead to avoid un/boxing.-
Methods inherited from interface com.jgalgo.graph.WeightsObj
defaultWeight, defaultWeightAsObj
-
-
-
-
Method Detail
-
get
T get(int element)
Get the weight associated with the given element.- Parameters:
element
- an element (edge/vertex.)- Returns:
- the weight associated with the given element.
-
get
@Deprecated default T get(Integer element)
Deprecated.Please useget(int)
instead to avoid un/boxing.Get the weight associated with the given element.- Specified by:
get
in interfaceWeightsObj<Integer,T>
- Parameters:
element
- an element (edge/vertex).- Returns:
- the weight associated with the given element.
-
getAsObj
@Deprecated default T getAsObj(int element)
Deprecated.Please useget(int)
instead to avoid un/boxing.Get the weight associated with the given id.
-
getAsObj
@Deprecated default T getAsObj(Integer element)
Deprecated.Please useget(int)
instead to avoid un/boxing.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.
-
set
void set(int element, T 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
-
set
@Deprecated default void set(Integer element, T weight)
Deprecated.Please useset(int, Object)
instead to avoid un/boxing.Set the weight associated with the given element.- Specified by:
set
in interfaceWeightsObj<Integer,T>
- Parameters:
element
- an element (edge/vertex).weight
- new weight that will be associated with the given element
-
setAsObj
@Deprecated default void setAsObj(int element, T weight)
Deprecated.Please useset(int, Object)
instead to avoid un/boxing.Set the weight associated with the given id.
-
setAsObj
@Deprecated default void setAsObj(Integer element, T weight)
Deprecated.Please useset(int, Object)
instead to avoid un/boxing.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.
-
-