24 package org.lightjason.agentspeak.language.instantiable.plan.trigger;
30 import javax.annotation.Nonnull;
31 import java.text.MessageFormat;
70 @SuppressWarnings(
"unchecked" )
74 m_literal = p_literal;
75 m_variables =
CCommon.variablefrequency( p_literal ).size();
76 m_hashcode = m_event.hashCode() ^ m_literal.hashCode();
77 m_structurehash = m_event.hashCode() ^ m_literal.
structurehash();
89 return new CTrigger( p_event, p_literal );
99 public final boolean equals(
final Object p_object )
101 return ( p_object instanceof
ITrigger ) && ( this.
hashCode() == p_object.hashCode() );
107 return MessageFormat.format(
"{0}{1}", m_event, m_literal );
151 return p_other.toString().compareTo( this.
toString() );
final EType m_event
event type
T shallowcopysuffix()
clones the object (shallow-copy) without full-qualified path, only suffix is used ...
CTrigger( @Nonnull final EType p_event, @Nonnull final ILiteral p_literal)
ctor
final int structurehash()
returns a hash value which defines a hash ove rthe structure
common structure for execution definition
static ITrigger from( @Nonnull final EType p_event, @Nonnull final ILiteral p_literal)
creates a trigger event^
final int compareTo( @Nonnull final ITrigger p_other)
final ILiteral literal()
returns the literal of the event
int structurehash()
returns a hash value which defines a hash ove rthe structure
final int variablesize()
returns variable number
final int m_variables
variable number
final int m_structurehash
content hashcode
final int m_hashcode
hashcode
class for any helper calls
T shallowcopy( @Nullable final IPath... p_prefix)
clones the object (shallow-copy)
final boolean equals(final Object p_object)
final ITrigger shallowcopy(final IPath... p_prefix)
static final long serialVersionUID
serial id
final ITrigger shallowcopysuffix()
clones the object (shallow-copy) without full-qualified path, only suffix is used ...
final EType type()
returns the type of the event
final ILiteral m_literal
literal with unified variables