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

com.memority.toolkit.rule.api.NormalizeRule Maven / Gradle / Ivy

Go to download

This artifact provides the API classes that are necessary to implement the contracts of Memority configuration Rules.

There is a newer version: 3.43.1
Show newest version
/*
 * Copyright (c) 2016-2023 Memority. All Rights Reserved.
 *
 * This file is part of Memority Toolkit API , a Memority project.
 *
 * This file is released under the Memority Public Artifacts End-User License Agreement,
 * see 
 * Unauthorized copying of this file, via any medium is strictly prohibited.
 */
package com.memority.toolkit.rule.api;

import com.memority.toolkit.rule.api.context.Context;

/**
 * A normalize Rule is used to normalize an input Object value. It returns the input value, normalized.
 *
 * 

The input value is available as a method argument and at the {@link #KEY_VALUE} key in the * passed context.

* * @see Context */ public interface NormalizeRule extends Rule { /** * The input value is exposed through this key as {@value #KEY_VALUE} */ String KEY_VALUE = "VALUE"; @Override default RuleType getRuleType() { return RuleType.NORMALIZE; } /** * Run the Normalize Rule, transforming the given value, and return the normalized value. * * @param value the value to normalize, maybe null * @param context the execution context * @return the normalized value, maybe null */ Object normalize(Object value, final Context context); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy