24 package org.lightjason.agentspeak.language.fuzzy;
29 import javax.annotation.Nonnull;
30 import javax.annotation.Nullable;
31 import java.text.MessageFormat;
32 import java.util.Arrays;
33 import java.util.Objects;
57 this( p_value.value(), p_value.fuzzy() );
76 public CFuzzyValue( @Nonnull
final T p_value,
final double p_fuzzy )
78 if ( !( ( p_fuzzy >= 0 ) && ( p_fuzzy <= 1 ) ) )
101 return Objects.isNull( m_value ) || Arrays.stream( p_class ).anyMatch( i -> i.isAssignableFrom( m_value.getClass() ) );
117 return MessageFormat.format(
"{0}({1})", m_value, m_fuzzy );
static< N > IFuzzyValue< N > from( @Nonnull final N p_value, final double p_fuzzy)
factory
illegal argument exception
static< N > IFuzzyValue< N > from( @Nonnull final N p_value)
factory
static< T > String languagestring(final T p_source, final String p_label, final Object... p_parameter)
returns the language depend string on any object
final boolean valueassignableto( @Nonnull final Class<?>... p_class)
checkes assignable of the value
final double m_fuzzy
fuzzy value
CFuzzyValue( @Nonnull final IFuzzyValue< T > p_value)
ctor
final T value()
returns the result
result for an immutable fuzzy value
final T throwvaluenotassignableto( @Nonnull final Class<?>... p_class)
throws an illegal argument exception iif the value is not assignable to the class ...
class for any helper calls
CFuzzyValue( @Nonnull final T p_value, final double p_fuzzy)
ctor
final double fuzzy()
returns the fuzziness
CFuzzyValue( @Nonnull final T p_value)
ctor