Class BucketComparator
- java.lang.Object
-
- com.activeviam.risk.core.ordering.BucketComparator
-
- All Implemented Interfaces:
ITenorAndMaturityDefaultValueAware
,com.quartetfs.fwk.ordering.IComparator<String>
,com.quartetfs.fwk.types.IExtendedPluginValue
,Serializable
,Comparator<String>
@QuartetExtendedPluginValue(intf=com.quartetfs.fwk.ordering.IComparator.class, key="BUCKET_COMPARATOR") public class BucketComparator extends Object implements ITenorAndMaturityDefaultValueAware, com.quartetfs.fwk.ordering.IComparator<String>
Comparator for "Bucket" cube levels. N/A bucket is always first, uppercase before lowercase, D - W - M - Y ordering.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
PLUGIN_KEY
-
Fields inherited from interface com.activeviam.risk.core.services.ITenorAndMaturityDefaultValueAware
PROPERTY_NAME
-
-
Constructor Summary
Constructors Constructor Description BucketComparator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(String bucketA, String bucketB)
Compares two buckets for order.String
getType()
void
setTenorAndMaturityDefaultValue(String tenorAndMaturityDefaultValue)
Set the default value for tenors and maturities-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
-
-
-
Field Detail
-
PLUGIN_KEY
public static final String PLUGIN_KEY
- See Also:
- Constant Field Values
-
-
Method Detail
-
getType
public String getType()
- Specified by:
getType
in interfacecom.quartetfs.fwk.types.IExtendedPluginValue
-
compare
public int compare(String bucketA, String bucketB)
Compares two buckets for order.- Specified by:
compare
in interfaceComparator<String>
- Parameters:
bucketA
- the first object to be compared.bucketB
- the second object to be compared.- Returns:
- a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
- Throws:
NullPointerException
- if an argument is null and this comparator does not permit null argumentsClassCastException
- if the arguments' types prevent them from being compared by this comparator.
-
setTenorAndMaturityDefaultValue
public void setTenorAndMaturityDefaultValue(String tenorAndMaturityDefaultValue)
Description copied from interface:ITenorAndMaturityDefaultValueAware
Set the default value for tenors and maturities- Specified by:
setTenorAndMaturityDefaultValue
in interfaceITenorAndMaturityDefaultValueAware
- Parameters:
tenorAndMaturityDefaultValue
- the default value string
-
-