24 package org.lightjason.agentspeak.language.fuzzy;
29 import javax.annotation.Nonnull;
30 import javax.annotation.Nullable;
31 import java.util.Arrays;
32 import java.util.Objects;
66 m_value = p_value.value();
67 m_fuzzy = p_value.fuzzy();
78 if ( !( ( p_fuzzy >= 0 ) && ( p_fuzzy <= 1 ) ) )
97 if ( !( ( p_value >= 0 ) && ( p_value <= 1 ) ) )
126 return Objects.isNull( m_value ) || Arrays.stream( p_class ).anyMatch( i -> i.isAssignableFrom( m_value.getClass() ) );
CFuzzyValueMutable( @Nonnull final IFuzzyValue< T > p_value)
ctor
final T value()
returns the result
CFuzzyValueMutable( @Nonnull final T p_value)
ctor
final IFuzzyValueMutable< T > value( @Nullable final T p_value)
illegal argument exception
interface for a mutable fuzzy value
final T throwvaluenotassignableto( @Nonnull final Class<?>... p_class)
throws an illegal argument exception iif the value is not assignable to the class ...
final double fuzzy()
returns the fuzziness
static< T > String languagestring(final T p_source, final String p_label, final Object... p_parameter)
returns the language depend string on any object
static< N > IFuzzyValueMutable< N > from( @Nonnull final N p_value, final double p_fuzzy)
factory
final IFuzzyValue< T > immutable()
returns an immutable instance of the object
double m_fuzzy
fuzzy value
final boolean valueassignableto( @Nonnull final Class<?>... p_class)
checkes assignable of the value
result for an immutable fuzzy value
final IFuzzyValueMutable< T > fuzzy(final double p_value)
sets the weight
static< N > IFuzzyValueMutable< N > from( @Nonnull final N p_value)
factory
class for any helper calls
CFuzzyValueMutable( @Nonnull final T p_value, final double p_fuzzy)
ctor