com.jparams.object.builder.provider.SortedSetProvider Maven / Gradle / Ivy
package com.jparams.object.builder.provider;
import java.util.Random;
import java.util.SortedSet;
import java.util.TreeSet;
import com.jparams.object.builder.Context;
import com.jparams.object.builder.type.MemberType;
public class SortedSetProvider implements Provider
{
private final Random random = new Random();
@Override
public boolean supports(final Class> clazz)
{
return clazz.isAssignableFrom(SortedSet.class);
}
@Override
public SortedSet> provide(final Context context)
{
if (context.getPath().getMemberType().getGenerics().isEmpty())
{
context.logWarning("No generics found. Could not populate Set");
return new TreeSet<>();
}
final SortedSet
© 2015 - 2025 Weber Informatics LLC | Privacy Policy