Class Triple<E,F,G>

java.lang.Object
tools.Triple<E,F,G>
All Implemented Interfaces:
Serializable

public class Triple<E,F,G> extends Object implements Serializable
儲存三個異質型別值的不可變泛型容器,為 Pair 的三元組擴充。

以型別參數 EFG 分別持有 leftmidright 三個公開欄位, 實作 Serializable 以支援序列化。 提供對應的 getter 方法與完整的 equals/hashCode/toString 實作。

在 TWMS v149 中廣泛用於需要同時傳遞三個不同型別資料的場合, 例如 server.quest.MapleQuestAction 的條件清單及怪物掉落記錄等。

See Also:
  • Field Details

    • left

      public E left
    • mid

      public F mid
  • Constructor Details

    • Triple

      public Triple(E left, F mid, G right)
  • Method Details

    • getLeft

      public E getLeft()
    • getMid

      public F getMid()
    • getRight

      public G getRight()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object