001 002/* 003 * Copyright (C) 2010 Archie L. Cobbs. All rights reserved. 004 * 005 * $Id$ 006 */ 007 008package org.dellroad.jibxbindings.pidf.lo.ecd; 009 010import java.util.ArrayList; 011import java.util.Arrays; 012import java.util.List; 013 014import org.dellroad.jibxbindings.pidf.LangContent; 015 016/** 017 * The {@code <pi:EmergencyCallData.Comment>} element. 018 */ 019public class Comment extends AbstractDataProviderReferencing { 020 021 private List<LangContent> comments = new ArrayList<>(); 022 023 public Comment() { 024 } 025 026 public Comment(String dataProviderReference, LangContent... comments) { 027 super(dataProviderReference); 028 this.comments.addAll(Arrays.asList(comments)); 029 } 030 031 public List<LangContent> getComments() { 032 return this.comments; 033 } 034 public void setComments(List<LangContent> comments) { 035 this.comments = comments; 036 } 037 038// Cloneable 039 040 @Override 041 public Comment clone() { 042 final Comment clone = (Comment)super.clone(); 043 if (this.comments != null) { 044 clone.comments = new ArrayList<>(this.comments.size()); 045 for (LangContent comment : this.comments) 046 clone.comments.add(comment.clone()); 047 } 048 return clone; 049 } 050} 051