Package weka.associations

# Class BinaryItem

java.lang.Object
weka.associations.Item
weka.associations.NominalItem
weka.associations.BinaryItem

All Implemented Interfaces:
  `Serializable`, `Comparable<Item>`

public class BinaryItem extends NominalItem implements Serializable
Class that encapsulates an item whose backing Attribute is binary or unary.

Version:
  $Revision; $
Author:
  Mark Hall (mhall{[at]}pentaho{[dot]}com)
See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `BinaryItem(Attribute att, int valueIndex)`
  Constructor.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `equals(Object compareTo)`
  Equals.
  `int`
  `hashCode()`

  ### Methods inherited from class weka.associations.NominalItem

  `getComparisonAsString, getItemValueAsString, getValueIndex, toString`

  ### Methods inherited from class weka.associations.Item

  `compareTo, decreaseFrequency, decreaseFrequency, getAttribute, getFrequency, increaseFrequency, increaseFrequency, toString`

  ### Methods inherited from class java.lang.Object

  `getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### BinaryItem

    public BinaryItem(Attribute att, int valueIndex) throws Exception
    Constructor.
    Parameters:
      `att` - the attribute that backs this item.
      `valueIndex` - the index of the value for this item.
    Throws:
      `Exception` - if the backing attribute is not binary or unary.

- ## Method Details

  - ### equals

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

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Item`