Class NominalItem

    • Constructor Detail

      • NominalItem

        public NominalItem​(Attribute att,
                           int valueIndex)
                    throws Exception
        Constructs a new NominalItem.
        Parameters:
        att - the attribute that backs the item.
        valueIndex - the index of the value for this item.
        Throws:
        Exception - if the NominalItem can't be constructed.
    • Method Detail

      • getValueIndex

        public int getValueIndex()
        Get the value index for this item.
        Returns:
        the value index.
      • getItemValueAsString

        public String getItemValueAsString()
        Get this item's value as a String.
        Specified by:
        getItemValueAsString in class Item
        Returns:
        this item's value as a String.
      • getComparisonAsString

        public String getComparisonAsString()
        Get this item's comparison operator as a String.
        Specified by:
        getComparisonAsString in class Item
        Returns:
        this item's comparison operator as a String.
      • toString

        public String toString​(boolean freq)
        A string representation of this item, (i.e. ). This default implementation just prints the attribute name and (optionally) frequency information.
        Overrides:
        toString in class Item
        Parameters:
        freq - true if the frequency should be included.
        Returns:
        a string representation of this item.
      • equals

        public boolean equals​(Object compareTo)
        Equals. Just compares attribute and valueIndex.
        Overrides:
        equals in class Item
        Returns:
        true if this NominalItem is equal to the argument.