Package io.micronaut.jaxrs.runtime.core
Class Weighted<T>
java.lang.Object
io.micronaut.jaxrs.runtime.core.Weighted<T>
- Type Parameters:
T
- The object type
- All Implemented Interfaces:
Comparable<Weighted<T>>
Used to compare objects be weighted value.
- Since:
- 1.0
- Author:
- graemerocher
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
Weighted
Constructor that takes parameters.- Parameters:
object
- The objectparameters
- An optional map of parameters. If a "q" variable is found try to use it to weigh.
-
Weighted
Default constructor.- Parameters:
object
- The objectweight
- The weight
-
Weighted
Construct with the default weight.- Parameters:
object
- The Object
-
-
Method Details
-
getObject
- Returns:
- The object
-
getWeight
public float getWeight()- Returns:
- The weight
-
compareTo
- Specified by:
compareTo
in interfaceComparable<T>
-
parseParameters
Parse the parameters that come after the semicolon.- Parameters:
str
- The string- Returns:
- The parameters
-