本文整理汇总了Java中java.util.function.UnaryOperator.identity方法的典型用法代码示例。如果您正苦于以下问题:Java UnaryOperator.identity方法的具体用法?Java UnaryOperator.identity怎么用?Java UnaryOperator.identity使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类java.util.function.UnaryOperator
的用法示例。
在下文中一共展示了UnaryOperator.identity方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: filter
import java.util.function.UnaryOperator; //导入方法依赖的package包/类
/**
* Returns a new settings object that contains all setting of the current one filtered by the given settings key predicate.
*/
public Settings filter(Predicate<String> predicate) {
return new Settings(new FilteredMap(this.settings, predicate, null), secureSettings == null ? null :
new PrefixedSecureSettings(secureSettings, UnaryOperator.identity(), predicate));
}
示例2: DefaultMaskCharacter
import java.util.function.UnaryOperator; //导入方法依赖的package包/类
public DefaultMaskCharacter(final Predicate<Character> pAllowed, final char pDefaultValue)
{
this(pAllowed, UnaryOperator.identity(), pDefaultValue);
}
示例3: PrometheusMetricsTestCase
import java.util.function.UnaryOperator; //导入方法依赖的package包/类
protected PrometheusMetricsTestCase() {
this(UnaryOperator.identity(), CollectorRegistry.defaultRegistry);
}
示例4: getCustomMetaDataUpgrader
import java.util.function.UnaryOperator; //导入方法依赖的package包/类
/**
* Provides a function to modify global custom meta data on startup.
* <p>
* Plugins should return the input custom map via {@link UnaryOperator#identity()} if no upgrade is required.
* @return Never {@code null}. The same or upgraded {@code MetaData.Custom} map.
* @throws IllegalStateException if the node should not start because at least one {@code MetaData.Custom}
* is unsupported
*/
public UnaryOperator<Map<String, MetaData.Custom>> getCustomMetaDataUpgrader() {
return UnaryOperator.identity();
}