24 package org.lightjason.agentspeak.language.instantiable.plan.trigger;
33 import javax.annotation.Nonnull;
34 import javax.annotation.Nullable;
35 import java.io.Serializable;
36 import java.util.Arrays;
37 import java.util.Collections;
39 import java.util.Objects;
40 import java.util.stream.Collectors;
60 private static final long serialVersionUID = -4216254162765675258L;
83 public final int compareTo( @Nonnull
final ITrigger p_trigger )
85 return Integer.compare( p_trigger.hashCode(), this.hashCode() );
107 public final int hashCode()
113 public final boolean equals(
final Object p_object )
115 return ( p_object instanceof
ITrigger ) && ( this.hashCode() == p_object.hashCode() );
156 private static final Map<String, EType> ELEMENTS = Collections.unmodifiableMap(
157 Arrays.stream(
EType.values() )
197 public static EType from( @Nonnull
final String p_sequence )
199 final EType l_type = ELEMENTS.get( p_sequence.trim() );
200 if ( Objects.isNull( l_type ) )
T shallowcopysuffix()
clones the object (shallow-copy) without full-qualified path, only suffix is used ...
structure hash definition
interface to create shallow-copy of objects
illegal argument exception
final String m_name
text name of the enum
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 String sequence()
returns the trigger sequence
ITrigger EMPTY
empty trigger
int structurehash()
returns a hash value which defines a hash ove rthe structure
EType type()
returns the type of the event
class for any helper calls
T shallowcopy( @Nullable final IPath... p_prefix)
clones the object (shallow-copy)
static EType from( @Nonnull final String p_sequence)
returns a trigger type by the char sequence
ILiteral literal()
returns the literal of the event
EType(final String p_name)
ctor
int variablesize()
returns variable number
ILiteral EMPTY
empty literal