Search in sources :

Example 11 with IonList

use of com.amazon.ion.IonList in project ion-java by amzn.

the class _Private_CurriedValueFactory method newList.

public IonList newList(int[] values) {
    IonList v = myFactory.newList(values);
    handle(v);
    return v;
}
Also used : IonList(com.amazon.ion.IonList)

Example 12 with IonList

use of com.amazon.ion.IonList in project ion-java by amzn.

the class _Private_CurriedValueFactory method newList.

public IonList newList(IonValue... values) throws ContainedValueException, NullPointerException {
    IonList v = myFactory.newList(values);
    handle(v);
    return v;
}
Also used : IonList(com.amazon.ion.IonList)

Example 13 with IonList

use of com.amazon.ion.IonList in project ion-java by amzn.

the class _Private_CurriedValueFactory method newList.

public IonList newList(long[] values) {
    IonList v = myFactory.newList(values);
    handle(v);
    return v;
}
Also used : IonList(com.amazon.ion.IonList)

Example 14 with IonList

use of com.amazon.ion.IonList in project ion-java by amzn.

the class _Private_CurriedValueFactory method newList.

@Deprecated
public IonList newList(Collection<? extends IonValue> values) throws ContainedValueException, NullPointerException {
    IonList v = myFactory.newList(values);
    handle(v);
    return v;
}
Also used : IonList(com.amazon.ion.IonList)

Example 15 with IonList

use of com.amazon.ion.IonList in project ion-java by amzn.

the class PrinterTest method testPrintingList.

@Test
public void testPrintingList() throws Exception {
    IonList value = system().newNullList();
    checkNullRendering("null.list", value);
    value.add(system().newNull());
    checkRendering("[null]", value);
    value.add(int123());
    checkRendering("[null,123]", value);
    value.add(symbolNotEquals());
    value.add(symbolHello());
    value.add(symbol("null"));
    checkRendering("[null,123,'!=',hello,'null']", value);
    value = (IonList) oneValue("[]");
    checkRendering("[]", value);
    value.addTypeAnnotation("an");
    checkRendering("an::[]", value);
}
Also used : IonList(com.amazon.ion.IonList) Test(org.junit.Test) IntTest(com.amazon.ion.IntTest) BlobTest(com.amazon.ion.BlobTest) ClobTest(com.amazon.ion.ClobTest)

Aggregations

IonList (com.amazon.ion.IonList)28 IonStruct (com.amazon.ion.IonStruct)13 Test (org.junit.Test)10 SymbolTable (com.amazon.ion.SymbolTable)5 IonDatagram (com.amazon.ion.IonDatagram)4 IonFloat (com.amazon.ion.IonFloat)3 IonReader (com.amazon.ion.IonReader)3 IonSexp (com.amazon.ion.IonSexp)3 IonString (com.amazon.ion.IonString)3 IonSymbol (com.amazon.ion.IonSymbol)3 IonBlob (com.amazon.ion.IonBlob)2 IonClob (com.amazon.ion.IonClob)2 IonTimestamp (com.amazon.ion.IonTimestamp)2 IonValue (com.amazon.ion.IonValue)2 BlobTest (com.amazon.ion.BlobTest)1 ClobTest (com.amazon.ion.ClobTest)1 IntTest (com.amazon.ion.IntTest)1 IonBool (com.amazon.ion.IonBool)1 IonDecimal (com.amazon.ion.IonDecimal)1 IonException (com.amazon.ion.IonException)1