Пример #1
0
		/// <summary> Produces a shallow copy of this attribute.
		/// 
		/// </summary>
		/// <returns> a copy of this attribute with the same index
		/// </returns>
		//@ also ensures \result instanceof Attribute;
		public virtual System.Object copy()
		{
			
			Attribute copy = new Attribute(m_Name);
			
			copy.m_Index = m_Index;
			copy.m_Type = m_Type;
			copy.m_Values = m_Values;
			copy.m_Hashtable = m_Hashtable;
			copy.m_DateFormat = m_DateFormat;
			copy.setMetadata(m_Metadata);
			
			return copy;
		}
Пример #2
0
		/// <summary> Produces a shallow copy of this attribute with a new name.
		/// 
		/// </summary>
		/// <param name="newName">the name of the new attribute
		/// </param>
		/// <returns> a copy of this attribute with the same index
		/// </returns>
		//@ requires newName != null;
		//@ ensures \result.m_Name  == newName;
		//@ ensures \result.m_Index == m_Index;
		//@ ensures \result.m_Type  == m_Type;
		internal Attribute copy(System.String newName)
		{
			
			Attribute copy = new Attribute(newName);
			
			copy.m_Index = m_Index;
			copy.m_DateFormat = m_DateFormat;
			copy.m_Type = m_Type;
			copy.m_Values = m_Values;
			copy.m_Hashtable = m_Hashtable;
			copy.setMetadata(m_Metadata);
			
			return copy;
		}