Package org.pkl.core
Class Pair<F,S>
- java.lang.Object
-
- org.pkl.core.Pair<F,S>
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Iterable<java.lang.Object>,Value
public final class Pair<F,S> extends java.lang.Object implements Value, java.lang.Iterable<java.lang.Object>
Java representation of apkl.base#Pairvalue.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> Taccept(ValueConverter<T> converter)Invokes the given converters's convert method for thisValue.voidaccept(ValueVisitor visitor)Invokes the given visitor's visit method for thisValue.booleanequals(@Nullable java.lang.Object obj)PClassInfo<?>getClassInfo()Returns information about the Pkl class associated with thisValue.FgetFirst()Returns the first element of this pair.SgetSecond()Returns the second element of this pair.inthashCode()java.util.Iterator<java.lang.Object>iterator()java.lang.StringtoString()
-
-
-
Method Detail
-
getFirst
public F getFirst()
Returns the first element of this pair.
-
getSecond
public S getSecond()
Returns the second element of this pair.
-
iterator
public java.util.Iterator<java.lang.Object> iterator()
- Specified by:
iteratorin interfacejava.lang.Iterable<F>
-
accept
public void accept(ValueVisitor visitor)
Description copied from interface:ValueInvokes the given visitor's visit method for thisValue.
-
accept
public <T> T accept(ValueConverter<T> converter)
Description copied from interface:ValueInvokes the given converters's convert method for thisValue.
-
getClassInfo
public PClassInfo<?> getClassInfo()
Description copied from interface:ValueReturns information about the Pkl class associated with thisValue.- Specified by:
getClassInfoin interfaceValue
-
equals
public boolean equals(@Nullable java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-