All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.hibernate.search.engine.cfg.impl.DefaultedPropertyContextImpl Maven / Gradle / Ivy

There is a newer version: 8.0.0.Alpha1
Show newest version
/*
 * Hibernate Search, full-text search for your domain model
 *
 * License: GNU Lesser General Public License (LGPL), version 2.1 or later
 * See the lgpl.txt file in the root directory or .
 */
package org.hibernate.search.engine.cfg.impl;

import java.util.function.Function;
import java.util.function.Supplier;

import org.hibernate.search.engine.cfg.spi.ConfigurationProperty;
import org.hibernate.search.engine.cfg.spi.DefaultedPropertyContext;

final class DefaultedPropertyContextImpl implements DefaultedPropertyContext {
	private final String key;
	private final Function converter;
	private final Supplier defaultValueSupplier;

	DefaultedPropertyContextImpl(String key, Function converter, Supplier defaultValueSupplier) {
		this.key = key;
		this.converter = converter;
		this.defaultValueSupplier = defaultValueSupplier;
	}

	@Override
	public ConfigurationProperty build() {
		return new DefaultedConfigurationProperty<>( key, converter, defaultValueSupplier );
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy