Class MutableMultiLabelInfo

java.lang.Object
org.tribuo.multilabel.MultiLabelInfo
org.tribuo.multilabel.MutableMultiLabelInfo
All Implemented Interfaces:
Serializable, MutableOutputInfo<MultiLabel>, OutputInfo<MultiLabel>

public class MutableMultiLabelInfo extends MultiLabelInfo implements MutableOutputInfo<MultiLabel>
A MutableOutputInfo for working with multi-label tasks.
See Also:
  • Constructor Details

    • MutableMultiLabelInfo

      public MutableMultiLabelInfo(MultiLabelInfo info)
      Construct a MutableMultiLabelInfo with it's state copied from another MultiLabelInfo.
      Parameters:
      info - The info to copy.
  • Method Details

    • observe

      public void observe(MultiLabel output)
      Throws IllegalStateException if the MultiLabel contains a Label which has a "," in it.

      Such labels are disallowed. There should be an exception thrown when one is constructed too.

      Specified by:
      observe in interface MutableOutputInfo<MultiLabel>
      Parameters:
      output - The observed output.
    • clear

      public void clear()
      Description copied from interface: MutableOutputInfo
      Clears the OutputInfo, removing all things it's observed.
      Specified by:
      clear in interface MutableOutputInfo<MultiLabel>
    • copy

      public MutableMultiLabelInfo copy()
      Description copied from interface: OutputInfo
      Generates a copy of this OutputInfo, including it's mutability.
      Specified by:
      copy in interface OutputInfo<MultiLabel>
      Specified by:
      copy in class MultiLabelInfo
      Returns:
      A copy of the OutputInfo.
    • toReadableString

      public String toReadableString()
      Description copied from interface: OutputInfo
      Generates a String form of this OutputInfo.

      This String can contain newlines, tabs and other formatting.

      Specified by:
      toReadableString in interface OutputInfo<MultiLabel>
      Returns:
      A formatted String representing this OutputInfo.
    • toString

      public String toString()
      Overrides:
      toString in class Object