Ejemplo n.º 1
0
        /// <summary>
        /// Copy constructor.<br>
        /// Initializes the components list with a deep copy of the source components list. </summary>
        /// <param name="source"> a field instance to copy
        /// @since 7.7 </param>
        public static Field130 newInstance(Field130 source)
        {
            Field130 cp = new Field130();

            cp.Components = new List <>(source.Components);
            return(cp);
        }
Ejemplo n.º 2
0
        public static Field130 fromJson(string json)
        {
            Field130   field      = new Field130();
            JsonParser parser     = new JsonParser();
            JsonObject jsonObject = (JsonObject)parser.parse(json);

            if (jsonObject.get("headingCode") != null)
            {
                field.setComponent1(jsonObject.get("headingCode").AsString);
            }
            if (jsonObject.get("headingText") != null)
            {
                field.Component2 = jsonObject.get("headingText").AsString;
            }
            if (jsonObject.get("headingCode2") != null)
            {
                field.setComponent3(jsonObject.get("headingCode2").AsString);
            }
            if (jsonObject.get("headingText2") != null)
            {
                field.Component4 = jsonObject.get("headingText2").AsString;
            }
            return(field);
        }
Ejemplo n.º 3
0
        public virtual IList <string> getLinesBetween(int start, int end, int offset)
        {
            Field130 cp = newInstance(this);

            return(SwiftParseUtils.getLines(getLine(cp, start, end, offset)));
        }
Ejemplo n.º 4
0
        public virtual IList <string> getLines(int offset)
        {
            Field130 cp = newInstance(this);

            return(SwiftParseUtils.getLines(getLine(cp, null, null, offset)));
        }
Ejemplo n.º 5
0
        public virtual string getLine(int line, int offset)
        {
            Field130 cp = newInstance(this);

            return(getLine(cp, line, null, offset));
        }