/** * Obtain an array type, that is a type for XDM arrays with a given member type * * @param memberType the type of the members in the array * @return the required array type */ public ItemType getArrayType(SequenceType memberType) { return new ConstructedItemType(new ArrayItemType(memberType.getUnderlyingSequenceType()), processor); }
/** * Obtain an array type, that is a type for XDM arrays with a given member type * * @param memberType the type of the members in the array * @return the required array type */ public ItemType getArrayType(SequenceType memberType) { return new ConstructedItemType(new ArrayItemType(memberType.getUnderlyingSequenceType()), processor); }
/** * Obtain a map type, that is a type for XDM maps with a given key type and value type * @param keyType the type of the keys in the map * @param valueType the type of the values in the map * @return the required map type */ public ItemType getMapType(ItemType keyType, SequenceType valueType) { if (!(keyType.getUnderlyingItemType() instanceof AtomicType)) { throw new IllegalArgumentException("Map key must be atomic"); } return new ConstructedItemType( new MapType((AtomicType)keyType.getUnderlyingItemType(), valueType.getUnderlyingSequenceType()), processor); }
/** * Obtain a map type, that is a type for XDM maps with a given key type and value type * @param keyType the type of the keys in the map * @param valueType the type of the values in the map * @return the required map type */ public ItemType getMapType(ItemType keyType, SequenceType valueType) { if (!(keyType.getUnderlyingItemType() instanceof AtomicType)) { throw new IllegalArgumentException("Map key must be atomic"); } return new ConstructedItemType( new MapType((AtomicType)keyType.getUnderlyingItemType(), valueType.getUnderlyingSequenceType()), processor); }