Class Quadra<F,S,T,Fo>

java.lang.Object
tools.Quadra<F,S,T,Fo>
All Implemented Interfaces:
Serializable

public class Quadra<F,S,T,Fo> extends Object implements Serializable
儲存四個異質型別值的不可變泛型容器,為 PairTriple 的四元組擴充。

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

在 TWMS v149 中作為輕量值持有物件,用於需要同時傳遞四個不同型別資料而不值得獨立建立類別的場合。

See Also:
  • Field Details

    • first

      public F first
    • second

      public S second
    • third

      public T third
    • forth

      public Fo forth
  • Constructor Details

    • Quadra

      public Quadra(F first, S second, T third, Fo forth)
  • Method Details

    • getFirst

      public F getFirst()
    • getSecond

      public S getSecond()
    • getThird

      public T getThird()
    • getForth

      public Fo getForth()
    • 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