Class DefaultLocalName

    • Method Detail

      • castOrCopy

        public static DefaultLocalName castOrCopy​(LocalName object)
        Returns a SIS local name implementation with the values of the given arbitrary implementation. This method performs the first applicable action in the following choices:
        • If the given object is null, then this method returns null.
        • Otherwise if the given object is an instance of Member­Name or Type­Name, then this method delegates to cast­Or­Copy(…) method of the corresponding subclass.
        • Otherwise if the given object is already an instance of Default­Local­Name, then it is returned unchanged.
        • Otherwise a new Default­Local­Name instance is created with the same values than the given name.
        Parameters:
        object - the object to get as a SIS implementation, or null if none.
        Returns:
        a SIS implementation containing the values of the given object (may be the given object itself), or null if the argument was null.
      • scope

        public NameSpace scope()
        Returns the scope (name space) in which this name is local. This method returns a non-null value in all cases, even when the scope given to the constructor was null.
        Specified by:
        scope in interface Generic­Name
        Specified by:
        scope in class Abstract­Name
        Returns:
        the scope of this name.
      • compareTo

        public int compareTo​(GenericName name)
        Compares this name with the specified object for order. Returns a negative integer, zero, or a positive integer as this name lexicographically precedes, is equal to, or follows the specified object.
        Specified by:
        compare­To in interface Comparable<Generic­Name>
        Overrides:
        compare­To in class Abstract­Name
        Parameters:
        name - the other name to compare with this name.
        Returns:
        -1 if this name precedes the given one, +1 if it follows, 0 if equals.
      • equals

        public boolean equals​(Object object)
        Compares this local name with the specified object for equality.
        Overrides:
        equals in class Abstract­Name
        Parameters:
        object - the object to compare with this name for equality.
        Returns:
        true if the given object is equal to this name.