LightJason - AgentSpeak(L++)
|
default generic literal class for agent beliefs a literal consists of a functor, an optional list of values e.g. More...
Classes | |
class | CParser |
literal parser More... | |
Public Member Functions | |
CLiteral (final boolean p_at, final boolean p_negated, @Nonnull final IPath p_functor, @Nonnull final Collection< ITerm > p_values) | |
ctor More... | |
final ILiteral | allocate ( @Nonnull final IContext p_context) |
allocate all variables with the current context More... | |
final int | compareTo ( @Nonnull final ILiteral p_literal) |
final synchronized ITerm | deepcopy ( @Nullable final IPath... p_prefix) |
final synchronized ITerm | deepcopysuffix () |
final boolean | emptyValues () |
check for empty values More... | |
final boolean | equals (final Object p_object) |
final IPath | fqnfunctor () |
returns the full-qualified functor with path and name More... | |
final String | functor () |
returns the functor without path More... | |
final IPath | functorpath () |
returns the path of the functor More... | |
final boolean | hasAt () |
returns if the literal has an @ prefix More... | |
final int | hashCode () |
final boolean | hasVariable () |
checks if the literal has variables More... | |
final boolean | negated () |
getter of the literal for the negation More... | |
final Stream< ITerm > | orderedvalues ( @Nullable final IPath... p_path) |
returns a stream over the ordered values in sequential ordering More... | |
final< T > T | raw () |
cast to any raw value type More... | |
final ILiteral | shallowcopy ( @Nullable final IPath... p_prefix) |
final ILiteral | shallowcopysuffix () |
final int | structurehash () |
returns a hash value which defines a hash ove rthe structure More... | |
final String | toString () |
final ILiteral | unify ( @Nonnull final IContext p_context) |
unifies variables if exists More... | |
final Stream< ITerm > | values ( @Nullable final IPath... p_path) |
Public Member Functions inherited from org.lightjason.agentspeak.language.ILiteral | |
Stream< ITerm > | values (final IPath... p_path) |
returns a stream over value items More... | |
Public Member Functions inherited from org.lightjason.agentspeak.language.ITerm | |
default< T extends ITerm > T | term () |
casts the object to a term-type More... | |
Public Member Functions inherited from org.lightjason.agentspeak.language.IDeepCopy< ITerm > | |
T | deepcopy (@Nullable final IPath... p_prefix) |
clones the object (shallow-copy) More... | |
T | deepcopysuffix () |
clones the object (shallow-copy) without full-qualified path, only suffix is used More... | |
Public Member Functions inherited from org.lightjason.agentspeak.language.IShallowCopy< ILiteral > | |
T | shallowcopy (@Nullable final IPath... p_prefix) |
clones the object (shallow-copy) More... | |
T | shallowcopysuffix () |
clones the object (shallow-copy) without full-qualified path, only suffix is used More... | |
Static Public Member Functions | |
static ILiteral | from ( @Nonnull final String p_functor, @Nullable final ITerm... p_values) |
factory More... | |
static ILiteral | from ( @Nonnull final String p_functor, @Nonnull final Collection< ITerm > p_values) |
factory More... | |
static ILiteral | from ( @Nonnull final String p_functor, @Nonnull final Stream< ITerm > p_values) |
stream factory More... | |
static ILiteral | from ( @Nonnull final IPath p_functor, @Nullable final ITerm... p_values) |
factory More... | |
static ILiteral | from ( @Nonnull final IPath p_functor, @Nonnull final Stream< ITerm > p_values) |
factory More... | |
static ILiteral | from (final boolean p_at, final boolean p_negated, @Nonnull final IPath p_functor, @Nullable final ITerm... p_values) |
factory More... | |
static ILiteral | from (final boolean p_at, final boolean p_negated, @Nonnull final IPath p_functor, @Nonnull final Stream< ITerm > p_values) |
factory More... | |
static ILiteral | parse ( @Nonnull final String p_literal) throws Exception |
factory More... | |
Private Attributes | |
final boolean | m_at |
@ prefix is set More... | |
final IPath | m_functor |
literals functor More... | |
final int | m_hash |
hash code More... | |
final boolean | m_negated |
negated option More... | |
final List< ITerm > | m_orderedvalues |
literal values as list More... | |
final int | m_structurehash |
hash of the structure More... | |
final ImmutableMultimap< IPath, ITerm > | m_values |
literal values More... | |
Static Private Attributes | |
static final String | AT = "@" |
at symbol More... | |
static final String | NEGATION = "~" |
negation symbol More... | |
static final long | serialVersionUID = -3253396471300120109L |
serial id More... | |
Additional Inherited Members | |
Public Attributes inherited from org.lightjason.agentspeak.language.ILiteral | |
ILiteral | EMPTY |
empty literal More... | |
Public Attributes inherited from org.lightjason.agentspeak.language.ITerm | |
ITerm | EMPTY |
empty term More... | |
long | serialVersionUID = -3640918490398129717L |
serial id More... | |
Public Attributes inherited from org.lightjason.agentspeak.language.IStructureHash | |
Comparator< IStructureHash > | COMPARATOR = Comparator.comparingInt( IStructureHash::structurehash ) |
comparator More... | |
velocity(50)
Definition at line 64 of file CLiteral.java.
org.lightjason.agentspeak.language.CLiteral.CLiteral | ( | final boolean | p_at, |
final boolean | p_negated, | ||
@Nonnull final IPath | p_functor, | ||
@Nonnull final Collection< ITerm > | p_values | ||
) |
p_at | @ prefix is set |
p_negated | negated flag |
p_functor | functor of the literal |
p_values | initial list of values |
Definition at line 117 of file CLiteral.java.
Referenced by org.lightjason.agentspeak.language.CLiteral.allocate(), org.lightjason.agentspeak.language.CLiteral.deepcopy(), org.lightjason.agentspeak.language.CLiteral.deepcopysuffix(), org.lightjason.agentspeak.language.CLiteral.from(), org.lightjason.agentspeak.language.CLiteral.shallowcopy(), org.lightjason.agentspeak.language.CLiteral.shallowcopysuffix(), and org.lightjason.agentspeak.language.CLiteral.unify().
final ILiteral org.lightjason.agentspeak.language.CLiteral.allocate | ( | @Nonnull final IContext | p_context | ) |
p_context | current execution context |
Implements org.lightjason.agentspeak.language.ILiteral.
Definition at line 350 of file CLiteral.java.
References org.lightjason.agentspeak.language.CLiteral.CLiteral(), org.lightjason.agentspeak.language.CRawTerm< T >.EMPTY, and org.lightjason.agentspeak.common.IPath.stream().
final int org.lightjason.agentspeak.language.CLiteral.compareTo | ( | @Nonnull final ILiteral | p_literal | ) |
Definition at line 449 of file CLiteral.java.
References org.lightjason.agentspeak.language.CLiteral.hashCode().
final synchronized ITerm org.lightjason.agentspeak.language.CLiteral.deepcopy | ( | @Nullable final IPath... | p_prefix | ) |
Definition at line 456 of file CLiteral.java.
References org.lightjason.agentspeak.language.CLiteral.CLiteral(), org.lightjason.agentspeak.language.CLiteral.m_at, org.lightjason.agentspeak.language.CLiteral.m_functor, org.lightjason.agentspeak.language.CLiteral.m_negated, and org.lightjason.agentspeak.language.CLiteral.m_values.
final synchronized ITerm org.lightjason.agentspeak.language.CLiteral.deepcopysuffix | ( | ) |
Definition at line 475 of file CLiteral.java.
References org.lightjason.agentspeak.language.CLiteral.CLiteral(), org.lightjason.agentspeak.common.CPath.from(), org.lightjason.agentspeak.language.CLiteral.m_at, org.lightjason.agentspeak.language.CLiteral.m_functor, org.lightjason.agentspeak.language.CLiteral.m_negated, org.lightjason.agentspeak.language.CLiteral.m_values, and org.lightjason.agentspeak.common.IPath.suffix().
final boolean org.lightjason.agentspeak.language.CLiteral.emptyValues | ( | ) |
Implements org.lightjason.agentspeak.language.ILiteral.
Definition at line 295 of file CLiteral.java.
final boolean org.lightjason.agentspeak.language.CLiteral.equals | ( | final Object | p_object | ) |
Definition at line 410 of file CLiteral.java.
References org.lightjason.agentspeak.language.CLiteral.hashCode().
final IPath org.lightjason.agentspeak.language.CLiteral.fqnfunctor | ( | ) |
Implements org.lightjason.agentspeak.language.ITerm.
Definition at line 390 of file CLiteral.java.
References org.lightjason.agentspeak.language.CLiteral.m_functor.
|
static |
p_functor | functor string |
p_values | value term |
Definition at line 161 of file CLiteral.java.
Referenced by org.lightjason.agentspeak.agent.IBaseAgent< CMethodBindingBlacklist >.active(), org.lightjason.agentspeak.action.builtin.TestCActionAgent.addplan(), org.lightjason.agentspeak.action.builtin.web.IBaseWeb.baseliteral(), org.lightjason.agentspeak.beliefbase.TestCPropertyBeliefbase.belieflist(), org.lightjason.agentspeak.action.builtin.TestCActionAgent.belieflist(), org.lightjason.agentspeak.action.builtin.TestCActionAgent.clearbeliefbase(), org.lightjason.agentspeak.action.builtin.TestCActionGenericType.createliteral(), org.lightjason.agentspeak.action.builtin.web.rest.CXMLObject.execute(), org.lightjason.agentspeak.action.builtin.web.rest.CJsonObject.execute(), org.lightjason.agentspeak.action.builtin.web.rest.CJsonList.execute(), org.lightjason.agentspeak.action.builtin.generic.type.CCreateLiteral.execute(), org.lightjason.agentspeak.action.builtin.web.graphql.IBaseGraphQL.execute(), org.lightjason.agentspeak.action.builtin.web.IBaseWeb.flatmap(), org.lightjason.agentspeak.language.CLiteral.from(), org.lightjason.agentspeak.language.variable.CVariableEvaluate.fromString(), org.lightjason.agentspeak.action.builtin.TestCActionAgent.getplan(), org.lightjason.agentspeak.consistency.TestCMetric.initialize(), org.lightjason.agentspeak.action.builtin.TestCActionStorage.initialize(), org.lightjason.agentspeak.action.builtin.TestCActionAgent.initialize(), org.lightjason.agentspeak.language.TestCTermVariablesConstant.literal(), org.lightjason.agentspeak.beliefbase.storage.CClassStorage< M >.literal(), org.lightjason.agentspeak.beliefbase.view.CViewMap.CWrapperBeliefbase.literal(), org.lightjason.agentspeak.agent.TestCUnifier.literalvaluesequentialtraversing(), org.lightjason.agentspeak.agent.TestCUnifier.literalvaluetraversing(), org.lightjason.agentspeak.action.builtin.TestCActionGenericType.parseliteral(), org.lightjason.agentspeak.action.builtin.TestCActionAgent.planlist(), org.lightjason.agentspeak.action.builtin.TestCActionWebGraphQL.queryliteral(), org.lightjason.agentspeak.action.builtin.TestCActionWebGraphQL.querymanual(), org.lightjason.agentspeak.action.builtin.TestCActionAgent.removeplan(), org.lightjason.agentspeak.beliefbase.TestCViewMap.stream(), org.lightjason.agentspeak.beliefbase.view.CViewMap.CWrapperBeliefbase.streamLiteral(), org.lightjason.agentspeak.consistency.TestCMetric.symmetricweightinequality(), org.lightjason.agentspeak.beliefbase.TestCView.testManual(), org.lightjason.agentspeak.beliefbase.TestCView.testTree(), org.lightjason.agentspeak.beliefbase.view.CViewMap.CWrapperBeliefbase.toterm(), org.lightjason.agentspeak.grammar.CASTVisitorAgent.visitInitial_goal(), and org.lightjason.agentspeak.consistency.TestCMetric.weightinequality().
|
static |
p_functor | functor string |
p_values | value term |
Definition at line 178 of file CLiteral.java.
References org.lightjason.agentspeak.language.CLiteral.CLiteral(), and org.lightjason.agentspeak.common.CPath.from().
|
static |
p_functor | functor |
p_values | value stream |
Definition at line 193 of file CLiteral.java.
References org.lightjason.agentspeak.language.CLiteral.from().
|
static |
p_functor | functor path |
p_values | values |
Definition at line 205 of file CLiteral.java.
References org.lightjason.agentspeak.language.CLiteral.from().
|
static |
p_functor | functor path |
p_values | values |
Definition at line 217 of file CLiteral.java.
References org.lightjason.agentspeak.language.CLiteral.from().
|
static |
p_at | at |
p_negated | negation |
p_functor | functor path |
p_values | vales |
Definition at line 231 of file CLiteral.java.
References org.lightjason.agentspeak.language.CLiteral.from().
|
static |
p_at | at |
p_negated | negation |
p_functor | functor path |
p_values | vales |
Definition at line 245 of file CLiteral.java.
References org.lightjason.agentspeak.language.CLiteral.CLiteral().
final String org.lightjason.agentspeak.language.CLiteral.functor | ( | ) |
Implements org.lightjason.agentspeak.language.ITerm.
Definition at line 376 of file CLiteral.java.
References org.lightjason.agentspeak.common.IPath.suffix().
final IPath org.lightjason.agentspeak.language.CLiteral.functorpath | ( | ) |
Implements org.lightjason.agentspeak.language.ITerm.
Definition at line 383 of file CLiteral.java.
References org.lightjason.agentspeak.common.IPath.size(), and org.lightjason.agentspeak.common.IPath.subpath().
final boolean org.lightjason.agentspeak.language.CLiteral.hasAt | ( | ) |
Implements org.lightjason.agentspeak.language.ILiteral.
Definition at line 313 of file CLiteral.java.
References org.lightjason.agentspeak.language.CLiteral.m_at.
final int org.lightjason.agentspeak.language.CLiteral.hashCode | ( | ) |
Definition at line 404 of file CLiteral.java.
References org.lightjason.agentspeak.language.CLiteral.m_hash.
Referenced by org.lightjason.agentspeak.language.CLiteral.compareTo(), and org.lightjason.agentspeak.language.CLiteral.equals().
final boolean org.lightjason.agentspeak.language.CLiteral.hasVariable | ( | ) |
Implements org.lightjason.agentspeak.language.ITerm.
Definition at line 319 of file CLiteral.java.
References org.lightjason.agentspeak.language.ITerm.hasVariable().
final boolean org.lightjason.agentspeak.language.CLiteral.negated | ( | ) |
Implements org.lightjason.agentspeak.language.ILiteral.
Definition at line 307 of file CLiteral.java.
References org.lightjason.agentspeak.language.CLiteral.m_negated.
final Stream<ITerm> org.lightjason.agentspeak.language.CLiteral.orderedvalues | ( | @Nullable final IPath... | p_path | ) |
Implements org.lightjason.agentspeak.language.ILiteral.
Definition at line 279 of file CLiteral.java.
References org.lightjason.agentspeak.language.CLiteral.raw().
|
static |
p_literal | literal string |
Exception | parsing and stream exception |
Definition at line 259 of file CLiteral.java.
References org.lightjason.agentspeak.language.CLiteral.CParser.parse().
Referenced by org.lightjason.agentspeak.agent.TestCUnifier.literalvaluesequentialtraversing(), org.lightjason.agentspeak.agent.TestCUnifier.literalvaluetraversing(), org.lightjason.agentspeak.action.builtin.generic.type.CParseLiteral.parse(), org.lightjason.agentspeak.action.builtin.agent.CGetPlan.query(), org.lightjason.agentspeak.action.builtin.agent.CRemovePlan.remove(), and org.lightjason.agentspeak.agent.TestCUnifier.structurehash().
final<T> T org.lightjason.agentspeak.language.CLiteral.raw | ( | ) |
raw | type |
Implements org.lightjason.agentspeak.language.ITerm.
Definition at line 398 of file CLiteral.java.
Referenced by org.lightjason.agentspeak.language.CLiteral.orderedvalues().
final ILiteral org.lightjason.agentspeak.language.CLiteral.shallowcopy | ( | @Nullable final IPath... | p_prefix | ) |
Definition at line 417 of file CLiteral.java.
References org.lightjason.agentspeak.language.CLiteral.CLiteral(), org.lightjason.agentspeak.language.CLiteral.m_at, org.lightjason.agentspeak.language.CLiteral.m_functor, org.lightjason.agentspeak.language.CLiteral.m_negated, and org.lightjason.agentspeak.language.CLiteral.m_values.
final ILiteral org.lightjason.agentspeak.language.CLiteral.shallowcopysuffix | ( | ) |
Definition at line 434 of file CLiteral.java.
References org.lightjason.agentspeak.language.CLiteral.CLiteral(), org.lightjason.agentspeak.common.CPath.from(), org.lightjason.agentspeak.language.CLiteral.m_at, org.lightjason.agentspeak.language.CLiteral.m_functor, org.lightjason.agentspeak.language.CLiteral.m_negated, org.lightjason.agentspeak.language.CLiteral.m_values, and org.lightjason.agentspeak.common.IPath.suffix().
final int org.lightjason.agentspeak.language.CLiteral.structurehash | ( | ) |
Implements org.lightjason.agentspeak.language.IStructureHash.
Definition at line 301 of file CLiteral.java.
References org.lightjason.agentspeak.language.CLiteral.m_structurehash.
final String org.lightjason.agentspeak.language.CLiteral.toString | ( | ) |
Definition at line 443 of file CLiteral.java.
References org.lightjason.agentspeak.language.CLiteral.AT, org.lightjason.agentspeak.language.CLiteral.m_at, org.lightjason.agentspeak.language.CLiteral.m_functor, org.lightjason.agentspeak.language.CLiteral.m_negated, org.lightjason.agentspeak.language.CLiteral.m_orderedvalues, and org.lightjason.agentspeak.language.CLiteral.NEGATION.
final ILiteral org.lightjason.agentspeak.language.CLiteral.unify | ( | @Nonnull final IContext | p_context | ) |
p_context | current execution context |
Implements org.lightjason.agentspeak.language.ILiteral.
Definition at line 326 of file CLiteral.java.
References org.lightjason.agentspeak.language.CLiteral.CLiteral(), org.lightjason.agentspeak.language.CRawTerm< T >.from(), and org.lightjason.agentspeak.common.IPath.stream().
final Stream<ITerm> org.lightjason.agentspeak.language.CLiteral.values | ( | @Nullable final IPath... | p_path | ) |
Definition at line 266 of file CLiteral.java.
|
staticprivate |
Definition at line 77 of file CLiteral.java.
Referenced by org.lightjason.agentspeak.language.CLiteral.toString().
|
private |
Definition at line 97 of file CLiteral.java.
Referenced by org.lightjason.agentspeak.language.CLiteral.deepcopy(), org.lightjason.agentspeak.language.CLiteral.deepcopysuffix(), org.lightjason.agentspeak.language.CLiteral.hasAt(), org.lightjason.agentspeak.language.CLiteral.shallowcopy(), org.lightjason.agentspeak.language.CLiteral.shallowcopysuffix(), and org.lightjason.agentspeak.language.CLiteral.toString().
|
private |
Definition at line 89 of file CLiteral.java.
Referenced by org.lightjason.agentspeak.language.CLiteral.deepcopy(), org.lightjason.agentspeak.language.CLiteral.deepcopysuffix(), org.lightjason.agentspeak.language.CLiteral.fqnfunctor(), org.lightjason.agentspeak.language.CLiteral.shallowcopy(), org.lightjason.agentspeak.language.CLiteral.shallowcopysuffix(), and org.lightjason.agentspeak.language.CLiteral.toString().
|
private |
Definition at line 101 of file CLiteral.java.
Referenced by org.lightjason.agentspeak.language.CLiteral.hashCode().
|
private |
Definition at line 93 of file CLiteral.java.
Referenced by org.lightjason.agentspeak.language.CLiteral.deepcopy(), org.lightjason.agentspeak.language.CLiteral.deepcopysuffix(), org.lightjason.agentspeak.language.CLiteral.negated(), org.lightjason.agentspeak.language.CLiteral.shallowcopy(), org.lightjason.agentspeak.language.CLiteral.shallowcopysuffix(), and org.lightjason.agentspeak.language.CLiteral.toString().
|
private |
Definition at line 85 of file CLiteral.java.
Referenced by org.lightjason.agentspeak.language.CLiteral.toString().
|
private |
Definition at line 105 of file CLiteral.java.
Referenced by org.lightjason.agentspeak.language.CLiteral.structurehash().
Definition at line 81 of file CLiteral.java.
Referenced by org.lightjason.agentspeak.language.CLiteral.deepcopy(), org.lightjason.agentspeak.language.CLiteral.deepcopysuffix(), org.lightjason.agentspeak.language.CLiteral.shallowcopy(), and org.lightjason.agentspeak.language.CLiteral.shallowcopysuffix().
|
staticprivate |
Definition at line 73 of file CLiteral.java.
Referenced by org.lightjason.agentspeak.language.CLiteral.toString().
|
staticprivate |
Definition at line 69 of file CLiteral.java.