Esempio n. 1
0
        public virtual ESAbstractAssociation <KeyType, ValueType> withKeyAndValue(KeyType newKey, ValueType newValue)
        {
            ESAbstractAssociation <KeyType, ValueType> mutableCopy = (ESAbstractAssociation <KeyType, ValueType>)base.shallowCopy();

            mutableCopy.setKeyAndValue(newKey, newValue);
            if (IsImmutable)
            {
                mutableCopy.beImmutable();
            }
            else if (IsKeyImmutable)
            {
                mutableCopy.keyBeImmutable();
            }
            return(mutableCopy);
        }
Esempio n. 2
0
        public ESAbstractAssociation <KeyType, ValueType> withKey(KeyType newKey)
        {
            ESAbstractAssociation <KeyType, ValueType> mutableCopy = (ESAbstractAssociation <KeyType, ValueType>)base.shallowCopy();

            mutableCopy.Key = newKey;
            if (IsImmutable)
            {
                mutableCopy.beImmutable();
            }
            else if (IsKeyImmutable)
            {
                mutableCopy.keyBeImmutable();
            }
            return(mutableCopy);
        }