Class Combo

java.lang.Object
jme3utilities.ui.Combo

public class Combo extends Object
Represent a Hotkey combined with positive and/or negative signals. Immutable.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Combo(int universalCode, String signalName, boolean positiveFlag)
    Instantiate a Combo with the specified universal code and a single signal.
    Combo(Hotkey hotkey, String[] names, boolean[] flags)
    Instantiate a Combo with the specified Hotkey, signal names, and positive flags.
    Combo(Hotkey hotkey, String signalName, boolean positiveFlag)
    Instantiate a Combo with the specified Hotkey and a single signal.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    equals(Object otherObject)
    Test for exact equivalence with another Object.
    int
    Generate the hash code for this instance.
    Represent this instance as a String, using the US name of the hotkey.
    Represent this instance as a String, using the local name of the hotkey.

    Methods inherited from class java.lang.Object

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

    • Combo

      public Combo(int universalCode, String signalName, boolean positiveFlag)
      Instantiate a Combo with the specified universal code and a single signal.
      Parameters:
      universalCode - the code that will trigger the Combo (≥0)
      signalName - the name of the signal to be tested (not null, not empty)
      positiveFlag - true→signal required, false→signal prohibited
    • Combo

      public Combo(Hotkey hotkey, String signalName, boolean positiveFlag)
      Instantiate a Combo with the specified Hotkey and a single signal.
      Parameters:
      hotkey - the Hotkey that will trigger the Combo (not null)
      signalName - the name of the signal to be tested (not null, not empty)
      positiveFlag - true→signal required, false→signal prohibited
    • Combo

      public Combo(Hotkey hotkey, String[] names, boolean[] flags)
      Instantiate a Combo with the specified Hotkey, signal names, and positive flags.
      Parameters:
      hotkey - the Hotkey that will trigger this Combo (not null)
      names - the names of all signals to be tested (not null, not empty, no duplicates)
      flags - for each signal tested: true→required, false→prohibited (not null)
  • Method Details

    • toStringLocal

      public String toStringLocal()
      Represent this instance as a String, using the local name of the hotkey.
      Returns:
      a descriptive string of text (not null, not empty)
    • equals

      public boolean equals(Object otherObject)
      Test for exact equivalence with another Object.
      Overrides:
      equals in class Object
      Parameters:
      otherObject - the object to compare to (may be null, unaffected)
      Returns:
      true if the objects are equivalent, otherwise false
    • hashCode

      public int hashCode()
      Generate the hash code for this instance.
      Overrides:
      hashCode in class Object
      Returns:
      the value to use for hashing
    • toString

      public String toString()
      Represent this instance as a String, using the US name of the hotkey.
      Overrides:
      toString in class Object
      Returns:
      a descriptive string of text (not null, not empty)