public boolean allowsNameSiblings ( Name primaryType , Set < Name > mixinTypes ) { if ( isUnorderedCollection ( primaryType , mixinTypes ) ) { // regardless of the actual types, if at least one of them is an unordered collection, SNS are not allowed return false ; } if ( nodeTypeNamesThatAllowSameNameSiblings . contains ( primaryType ) ) return true ; if ( mixinTypes != null && ! mixinTypes . isEmpty ( ) ) { for ( Name mixinType : mixinTypes ) { if ( nodeTypeNamesThatAllowSameNameSiblings . contains ( mixinType ) ) return true ; } } return false ; }
Determine if either the primary type or any of the mixin types allows SNS .