Documentation of 'org.python.indexer.types.NUnionType' Java class
NUnionType
org.python.indexer.types

Class NUnionType



  • public class NUnionType
    extends NType
    A union type is a set of several other types. During a union operation, destructuring happens and unknown types are unified.
    • Constructor Detail

      • NUnionType

        public NUnionType()
      • NUnionType

        public NUnionType(NType... initialTypes)
    • Method Detail

      • setTypes

        public void setTypes(java.util.Set<NType> types)
      • getTypes

        public java.util.Set<NType> getTypes()
      • addType

        public void addType(NType t)
      • contains

        public boolean contains(NType t)
      • firstKnownAlternate

        public NType firstKnownAlternate()
        Returns the first alternate whose type is not unknown.
        Returns:
        the first non-unknown alternate, or null if none found
      • firstKnownNonNullAlternate

        public NType firstKnownNonNullAlternate()
        Returns the first alternate whose type is not unknown and is not Indexer#idx.builtins.None.
        Returns:
        the first non-unknown, non-None alternate, or null if none found
      • printKids

        public void printKids(org.python.indexer.types.NType.CyclicTypeRecorder ctr,
                              java.lang.StringBuilder sb)
        Description copied from class: NType
        Internal method to support printing in the presence of type-graph cycles.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.