Class AbstractInstance

  • All Implemented Interfaces:
    Instance

    public abstract class AbstractInstance
    extends java.lang.Object
    implements Instance
    The AbstractInstance class is a base class which can be subclassed to implement the Instance Interface. Most usages of the API will not require for the user to create a subclass of this class.
    Since:
    MicroStrategy Web 7.5.0
    • Constructor Detail

      • AbstractInstance

        protected AbstractInstance​(AbstractCategory _ownerCategory,
                                   java.lang.String _name,
                                   java.lang.String _helpMessage)
    • Method Detail

      • getName

        public java.lang.String getName()
        Description copied from interface: Instance
        Returns the name of the instance, if one exists.
        Specified by:
        getName in interface Instance
        Returns:
        The name of the instance.
      • get

        public Counter get​(int i)
        Description copied from interface: Instance
        Returns the Counter at the given index within the collection.
        Specified by:
        get in interface Instance
        Parameters:
        i - The index of the object to retrieve.
        Returns:
        The Counter object at the given index.
      • getItemByName

        public Counter getItemByName​(java.lang.String name)
        Description copied from interface: Instance
        Returns the Counter in the collection with the given name.
        Specified by:
        getItemByName in interface Instance
        Parameters:
        name - The name of the counter to return. Note: this is the name, not the localized name of the counter.
        Returns:
        The counter in the collection with the given name.
      • size

        public int size()
        Description copied from interface: Instance
        Returns the size of the collection.
        Specified by:
        size in interface Instance
        Returns:
        The number of counters in the collection.
      • isEmpty

        public boolean isEmpty()
        Description copied from interface: Instance
        Returns whether the collection is empty.
        Specified by:
        isEmpty in interface Instance
        Returns:
        True if the collection is empty, false otherwise.
      • elements

        public java.util.Enumeration elements()
        Description copied from interface: Instance
        Returns a java.util.Enumeration containing the objects in this collection.
        Specified by:
        elements in interface Instance
        Returns:
        An enumeration containing the objects in the collection.
      • add

        protected void add​(Counter c)
      • remove

        protected void remove​(Counter c)
      • getOwnerCategory

        public Category getOwnerCategory()
        Description copied from interface: Instance
        Returns the Category to which this counter belongs to.
        Specified by:
        getOwnerCategory in interface Instance
        Returns:
        The category to which this counter belongs to.
      • getHelpMessage

        public java.lang.String getHelpMessage()
        Description copied from interface: Instance
        Returns the help message associated with the instance. The help string is an optional string which describes the instance.
        Specified by:
        getHelpMessage in interface Instance
        Returns:
        The help message associated with the instance.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getLocalizedName

        public java.lang.String getLocalizedName​(java.util.Locale locale)
      • getLocalizedHelpMessage

        public java.lang.String getLocalizedHelpMessage​(java.util.Locale locale)