Encapsulate multiple values in a single object.
In Scheme and Lisp mainly used to return multiple values from a function.
call_with
public Object call_with(Procedure proc)
throws Throwable
Apply a Procedure with these values as the arguments.
canonicalize
public final Object canonicalize()
If a simple value, return that value.
Also, if no values, return empty.
countValues
public static int countValues(Object value)
getValues
public Object[] getValues()
Get the values encapsulated.
make
public static Values make()
make
public static Object make(Object[] vals)
make
public static Object make(Sequence seq)
make
public static Object make(TreeList list)
make
public static Object make(TreeList list,
int startPosition,
int endPosition)
nextIndex
public static int nextIndex(Object values,
int curIndex)
Helper method called by code using a SeriesTarget.
The compiled code iterates through zero or more values.
Return the index of the next value, or -1 if currently at eof.
A non-Values object is treated as a singleton value,
so in that case there is no next value.
nextValue
public static Object nextValue(Object values,
int curIndex)
Helper method called by code using a SeriesTarget.
The compiled code iterates through zero or more values.
Extract the object referenced by the curIndex.
A non-Values object is treated as a singleton value.
readExternal
public void readExternal(ObjectInput in)
throws IOException,
ClassNotFoundException
readResolve
public Object readResolve()
throws ObjectStreamException
values$V
public static Object values$V(Object[] vals)
writeExternal
public void writeExternal(ObjectOutput out)
throws IOException
writeValues
public static void writeValues(Object value,
Consumer out)