Class AvroSchemaUnion
- All Implemented Interfaces:
Serializable,Cloneable,Iterable<Object>,Collection<Object>,Deque<Object>,List<Object>,Queue<Object>,SequencedCollection<Object>
Unions, as mentioned above, are represented using JSON arrays.
For example, ["null", "string"] declares a schema which may be either a null or string.
Note that when a default value is specified for a record field whose type is a union,
the type of the default value must match the first element of the union.
Thus, for unions containing "null", the "null" is usually listed first,
since the default value of such unions is typically null.
Unions may not contain more than one schema with the same type, except for the named types record, fixed and enum.
For example, unions containing two array types or two map types are not permitted, but two types with different names are permitted.
(Names permit efficient resolution when reading and writing unions.)
Unions may not immediately contain other unions.
- See Also:
-
Field Summary
Fields inherited from class java.util.AbstractList
modCount -
Constructor Summary
ConstructorsConstructorDescriptionAvroSchemaUnion(@NotNull Object... variant) AvroSchemaUnion(@NotNull Object variantA, @NotNull Object variantB) -
Method Summary
Methods inherited from class java.util.LinkedList
add, add, addAll, addAll, addFirst, addLast, clear, clone, contains, descendingIterator, element, get, getFirst, getLast, indexOf, lastIndexOf, listIterator, offer, offerFirst, offerLast, peek, peekFirst, peekLast, poll, pollFirst, pollLast, pop, push, remove, remove, remove, removeFirst, removeFirstOccurrence, removeLast, removeLastOccurrence, reversed, set, size, spliterator, toArray, toArrayMethods inherited from class java.util.AbstractSequentialList
iteratorMethods inherited from class java.util.AbstractList
equals, hashCode, listIterator, removeRange, subListMethods inherited from class java.util.AbstractCollection
containsAll, isEmpty, removeAll, retainAll, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.List
containsAll, equals, hashCode, isEmpty, iterator, listIterator, removeAll, replaceAll, retainAll, sort, subList
-
Constructor Details
-
AvroSchemaUnion
public AvroSchemaUnion() -
AvroSchemaUnion
-
AvroSchemaUnion
-