com.guicedee.guicedservlets.services.IGuiceSiteBinder Maven / Gradle / Ivy
package com.guicedee.guicedservlets.services;
import com.guicedee.guicedinjection.interfaces.IDefaultBinder;
import javax.validation.constraints.NotNull;
import java.util.Comparator;
public interface IGuiceSiteBinder
extends Comparable, Comparator, IDefaultBinder
{
@Override
default int compare(IGuiceSiteBinder o1, IGuiceSiteBinder o2)
{
if (o1 == null || o2 == null)
{
return -1;
}
return o1.sortOrder()
.compareTo(o2.sortOrder());
}
default Integer sortOrder()
{
return 100;
}
@Override
default int compareTo(@NotNull IGuiceSiteBinder o)
{
int sort = sortOrder().compareTo(o.sortOrder());
if (sort == 0)
{
return -1;
}
return sort;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy