Interface IWeightsObj<T>
- Type Parameters:
T- the weights type
- All Superinterfaces:
IWeights<T>,Weights<Integer,,T> WeightsObj<Integer,T>
Specific weights of
Object for int graphs.- Author:
- Barak Ugav
-
Method Summary
Modifier and TypeMethodDescriptionget(int element) Get the weight associated with the given element.default TDeprecated.default TgetAsObj(int element) Deprecated.Please useget(int)instead to avoid un/boxing.default TDeprecated.Please useget(int)instead to avoid un/boxing.voidSet the weight associated with the given element.default voidDeprecated.Please useset(int, Object)instead to avoid un/boxing.default voidDeprecated.Please useset(int, Object)instead to avoid un/boxing.default voidDeprecated.Please useset(int, Object)instead to avoid un/boxing.Methods inherited from interface com.jgalgo.graph.WeightsObj
defaultWeight, defaultWeightAsObj
-
Method Details
-
get
Get the weight associated with the given element.- Parameters:
element- an element (edge/vertex.)- Returns:
- the weight associated with the given element.
-
get
Deprecated.Please useget(int)instead to avoid un/boxing.Get the weight associated with the given element.- Specified by:
getin interfaceWeightsObj<Integer,T> - Parameters:
element- an element (edge/vertex).- Returns:
- the weight associated with the given element.
-
getAsObj
-
getAsObj
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
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.Please useset(int, Object)instead to avoid un/boxing.Set the weight associated with the given element.- Specified by:
setin interfaceWeightsObj<Integer,T> - Parameters:
element- an element (edge/vertex).weight- new weight that will be associated with the given element
-
setAsObj
Deprecated.Please useset(int, Object)instead to avoid un/boxing.Set the weight associated with the given id. -
setAsObj
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.
-
get(int)instead to avoid un/boxing.