java.lang.Object
org.variantsync.boosting.datastructure.Feature
All Implemented Interfaces:
Serializable, Comparable<Feature>

public class Feature extends Object implements Comparable<Feature>, Serializable
Represents a feature with a name. This class implements the Comparable interface to allow for comparison of Feature objects based on their names.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs a new Feature object with the given name.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Compares this Feature object with the specified Feature object for order.
    boolean
    Compares this Feature object with the specified object for equality.
    Returns the name of the feature.
    int
    Returns a hash code value for the Feature object.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Feature

      public Feature(String name)
      Constructs a new Feature object with the given name.
      Parameters:
      name - the name of the feature
  • Method Details

    • getName

      public String getName()
      Returns the name of the feature.
      Returns:
      the name of the feature
    • equals

      public boolean equals(Object o)
      Compares this Feature object with the specified object for equality.
      Overrides:
      equals in class Object
      Parameters:
      o - the object to compare with
      Returns:
      true if the objects are equal, false otherwise
    • hashCode

      public int hashCode()
      Returns a hash code value for the Feature object.
      Overrides:
      hashCode in class Object
      Returns:
      the hash code value for the object
    • compareTo

      public int compareTo(Feature other)
      Compares this Feature object with the specified Feature object for order.
      Specified by:
      compareTo in interface Comparable<Feature>
      Parameters:
      other - the Feature object to compare with
      Returns:
      a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object