LightJason - AgentSpeak(L++)
org.lightjason.agentspeak.language.variable.CMutexVariable< T > Class Template Reference

thread-safe variable More...

+ Inheritance diagram for org.lightjason.agentspeak.language.variable.CMutexVariable< T >:
+ Collaboration diagram for org.lightjason.agentspeak.language.variable.CMutexVariable< T >:

Public Member Functions

 CMutexVariable (final String p_functor)
 ctor More...
 
 CMutexVariable (final String p_functor, final T p_value)
 ctor More...
 
 CMutexVariable (final IPath p_functor)
 ctor More...
 
 CMutexVariable ( @Nonnull final IPath p_functor, @Nullable final T p_value)
 ctor More...
 
final synchronized boolean allocated ()
 returns allocated state More...
 
final boolean mutex ()
 flag to check if variable has is concurrency- / thread-safe More...
 
final synchronized< N > N raw ()
 cast to any raw value type More...
 
final synchronized IVariable< T > set (final T p_value)
 
IVariable< T > shallowcopy ( @Nullable final IPath... p_prefix)
 clones the object (shallow-copy) More...
 
IVariable< T > shallowcopysuffix ()
 clones the object (shallow-copy) without full-qualified path, only suffix is used More...
 
final synchronized IVariable< T > thrownotallocated () throws IllegalStateException
 throws an illegal state exception iif the variable is not allocated More...
 
final synchronized IVariable< T > throwvaluenotassignableto ( @Nonnull final Class<?>... p_class) throws IllegalArgumentException
 throws an illegal argument exception iif the value is not assignable to the class More...
 
final synchronized String toString ()
 
final synchronized boolean valueassignableto ( @Nonnull final Class<?>... p_class)
 checkes assignable of the value More...
 
- Public Member Functions inherited from org.lightjason.agentspeak.language.variable.CVariable< T >
 CVariable ( @Nonnull final String p_functor)
 ctor More...
 
 CVariable ( @Nonnull final String p_functor, @Nullable final T p_value)
 ctor More...
 
 CVariable ( @Nonnull final IPath p_functor)
 ctor More...
 
 CVariable ( @Nonnull final IPath p_functor, @Nullable final T p_value)
 ctor More...
 
boolean allocated ()
 returns allocated state More...
 
final boolean any ()
 flag to define a "any variable" More...
 
ITerm deepcopy (final IPath... p_prefix)
 
ITerm deepcopysuffix ()
 
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 int hashCode ()
 
final boolean hasVariable ()
 checks if the literal has variables More...
 
boolean mutex ()
 flag to check if variable has is concurrency- / thread-safe More...
 
IVariable< T > set ( @Nullable final T p_value)
 sets the value More...
 
IVariable< T > shallowcopy (final IPath... p_prefix)
 
IVariable< T > shallowcopysuffix ()
 clones the object (shallow-copy) without full-qualified path, only suffix is used More...
 
final int structurehash ()
 returns a hash value which defines a hash ove rthe structure More...
 
IVariable< T > thrownotallocated () throws IllegalStateException
 throws an illegal state exception iif the variable is not allocated More...
 
IVariable< T > throwvaluenotassignableto ( @Nonnull final Class<?>... p_class) throws IllegalArgumentException
 throws an illegal argument exception iif the value is not assignable to the class More...
 
String toString ()
 
boolean valueassignableto ( @Nonnull final Class<?>... p_class)
 checkes assignable of the value 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 >
deepcopy (@Nullable final IPath... p_prefix)
 clones the object (shallow-copy) More...
 
deepcopysuffix ()
 clones the object (shallow-copy) without full-qualified path, only suffix is used More...
 

Static Private Attributes

static final long serialVersionUID = 9040218112516254186L
 serial id More...
 

Additional Inherited Members

- 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< IStructureHashCOMPARATOR = Comparator.comparingInt( IStructureHash::structurehash )
 comparator More...
 
- Protected Attributes inherited from org.lightjason.agentspeak.language.variable.CVariable< T >
final boolean m_any
 boolean flag, that defines an variable which matchs always More...
 
final IPath m_functor
 variable / functor name More...
 
m_value
 value of the variable More...
 
- Package Functions inherited from org.lightjason.agentspeak.language.variable.CVariable< T >
public< N > N raw ()
 cast to any raw value type More...
 

Detailed Description

Template Parameters
Tdata type

Definition at line 38 of file CMutexVariable.java.

Constructor & Destructor Documentation

◆ CMutexVariable() [1/4]

Parameters
p_functorname

Definition at line 50 of file CMutexVariable.java.

◆ CMutexVariable() [2/4]

org.lightjason.agentspeak.language.variable.CMutexVariable< T >.CMutexVariable ( final String  p_functor,
final T  p_value 
)
Parameters
p_functorname
p_valuevalue

Definition at line 61 of file CMutexVariable.java.

◆ CMutexVariable() [3/4]

Parameters
p_functorname

Definition at line 71 of file CMutexVariable.java.

◆ CMutexVariable() [4/4]

org.lightjason.agentspeak.language.variable.CMutexVariable< T >.CMutexVariable ( @Nonnull final IPath  p_functor,
@Nullable final T  p_value 
)
Parameters
p_functorname
p_valuevalue

Definition at line 82 of file CMutexVariable.java.

Member Function Documentation

◆ allocated()

final synchronized boolean org.lightjason.agentspeak.language.variable.CMutexVariable< T >.allocated ( )
Returns
boolean flag

Implements org.lightjason.agentspeak.language.IRawStructure< T >.

Definition at line 115 of file CMutexVariable.java.

◆ mutex()

Returns
mutex flag

Implements org.lightjason.agentspeak.language.variable.IVariable< T >.

Definition at line 149 of file CMutexVariable.java.

◆ raw()

final synchronized<N> N org.lightjason.agentspeak.language.variable.CMutexVariable< T >.raw ( )
Template Parameters
rawtype
Returns
any type

Implements org.lightjason.agentspeak.language.ITerm.

Definition at line 95 of file CMutexVariable.java.

Referenced by org.lightjason.agentspeak.language.variable.CRelocateMutexVariable< T >.relocate().

+ Here is the caller graph for this function:

◆ set()

final synchronized IVariable<T> org.lightjason.agentspeak.language.variable.CMutexVariable< T >.set ( final T  p_value)

Definition at line 89 of file CMutexVariable.java.

References org.lightjason.agentspeak.language.variable.IVariable< T >.set().

+ Here is the call graph for this function:

◆ shallowcopy()

IVariable<T> org.lightjason.agentspeak.language.variable.CMutexVariable< T >.shallowcopy ( @Nullable final IPath...  p_prefix)
Parameters
p_prefixadd a path (only one path element is supported) to the functor or returns a shallow-copy
Returns
new instance of the object

Implements org.lightjason.agentspeak.language.IShallowCopy< T >.

Definition at line 134 of file CMutexVariable.java.

References org.lightjason.agentspeak.language.variable.CVariable< T >.m_functor, and org.lightjason.agentspeak.language.variable.CVariable< T >.m_value.

◆ shallowcopysuffix()

Returns
new instance of the object

Implements org.lightjason.agentspeak.language.IShallowCopy< T >.

Definition at line 143 of file CMutexVariable.java.

References org.lightjason.agentspeak.language.variable.CVariable< T >.m_functor, org.lightjason.agentspeak.language.variable.CVariable< T >.m_value, and org.lightjason.agentspeak.common.IPath.suffix().

+ Here is the call graph for this function:

◆ thrownotallocated()

final synchronized IVariable<T> org.lightjason.agentspeak.language.variable.CMutexVariable< T >.thrownotallocated ( ) throws IllegalStateException
Returns
object itself
Exceptions
IllegalStateExceptionon non-allocated

Implements org.lightjason.agentspeak.language.IRawStructure< T >.

Definition at line 102 of file CMutexVariable.java.

◆ throwvaluenotassignableto()

final synchronized IVariable<T> org.lightjason.agentspeak.language.variable.CMutexVariable< T >.throwvaluenotassignableto ( @Nonnull final Class<?>...  p_class) throws IllegalArgumentException
Parameters
p_classassignable class
Returns
object itself
Exceptions
IllegalArgumentExceptionon assignable error

Implements org.lightjason.agentspeak.language.IAssignable< T >.

Definition at line 109 of file CMutexVariable.java.

◆ toString()

final synchronized String org.lightjason.agentspeak.language.variable.CMutexVariable< T >.toString ( )

Definition at line 127 of file CMutexVariable.java.

◆ valueassignableto()

final synchronized boolean org.lightjason.agentspeak.language.variable.CMutexVariable< T >.valueassignableto ( @Nonnull final Class<?>...  p_class)
Parameters
p_classclass
Returns
assignable (on null always true)

Implements org.lightjason.agentspeak.language.IAssignable< T >.

Definition at line 121 of file CMutexVariable.java.

Member Data Documentation

◆ serialVersionUID

final long org.lightjason.agentspeak.language.variable.CMutexVariable< T >.serialVersionUID = 9040218112516254186L
staticprivate

Definition at line 43 of file CMutexVariable.java.