org.javers.core.metamodel.type.KeyValueType Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of javers-core Show documentation
Show all versions of javers-core Show documentation
JaVers - object auditing and diff framework for Java
package org.javers.core.metamodel.type;
import org.javers.common.collections.Maps;
import org.javers.common.validation.Validate;
import java.lang.reflect.Type;
import java.util.*;
import java.util.stream.Stream;
/**
* @author bartosz.walacik
*/
public abstract class KeyValueType extends EnumerableType {
public KeyValueType(Type baseJavaType, int expectedArgs) {
super(baseJavaType, expectedArgs);
}
/**
* never returns null
*/
public Type getKeyType() {
return getConcreteClassTypeArguments().get(0);
}
/**
* never returns null
*/
public Type getValueType() {
return getConcreteClassTypeArguments().get(1);
}
@Override
public List filterToList(Object source, Class filter) {
return super.filterToList(source, filter);
}
@Override
protected Stream