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
/*
 * SPDX-License-Identifier: Apache-2.0
 * Copyright Red Hat Inc. and Hibernate Authors
 */
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