Class InstanceType

java.lang.Object
com.aquima.interactions.profile.model.InstanceType
All Implemented Interfaces:
Serializable

public class InstanceType extends Object implements Serializable
This class is used to identify the type of an instance.
Since:
5.0
Author:
O. Kerpershoek
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    This member defines the bit mask for constant instances.
    static final int
    This member defines the bit mask for normal instances.
    static final int
    This member defines the bit mask for singleton instances.
    static final int
    This member defines the bit mask for static instances.
  • Constructor Summary

    Constructors
    Constructor
    Description
    InstanceType(int mask)
    Constructs the instance type class with the bit-mask defining the type.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    This method returns a boolean indicating if the type denotates a constant instance.
    boolean
    This method returns a boolean indicating if the type denotates a normal instance.
    boolean
    This method returns a boolean indicating if the type denotates a singleton instance.
    boolean
    This method returns a boolean indicating if the type denotates a static instance.
     
    This method determines the type of the instance passed as argument.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • NORMAL

      public static final int NORMAL
      This member defines the bit mask for normal instances.
      See Also:
    • STATIC

      public static final int STATIC
      This member defines the bit mask for static instances.
      See Also:
    • CONSTANT

      public static final int CONSTANT
      This member defines the bit mask for constant instances.
      See Also:
    • SINGLETON

      public static final int SINGLETON
      This member defines the bit mask for singleton instances.
      See Also:
  • Constructor Details

    • InstanceType

      public InstanceType(int mask)
      Constructs the instance type class with the bit-mask defining the type.
      Parameters:
      mask - The bit-mask defining the type.
  • Method Details

    • typeOf

      public static InstanceType typeOf(IEntityInstance instance)
      This method determines the type of the instance passed as argument.
      Parameters:
      instance - The instance whose type should be determined.
      Returns:
      The instance type of the specified instance.
    • isNormal

      public boolean isNormal()
      This method returns a boolean indicating if the type denotates a normal instance.
      Returns:
      a boolean indicating if the type denotates a normal instance.
    • isSingleton

      public boolean isSingleton()
      This method returns a boolean indicating if the type denotates a singleton instance.
      Returns:
      a boolean indicating if the type denotates a singleton instance.
    • isStatic

      public boolean isStatic()
      This method returns a boolean indicating if the type denotates a static instance.
      Returns:
      a boolean indicating if the type denotates a static instance.
    • isConstant

      public boolean isConstant()
      This method returns a boolean indicating if the type denotates a constant instance.
      Returns:
      a boolean indicating if the type denotates a constant instance.
    • toString

      public String toString()
      Overrides:
      toString in class Object