001
002/*
003 * Copyright (C) 2010 Archie L. Cobbs. All rights reserved.
004 *
005 * $Id$
006 */
007
008package org.dellroad.jibxbindings.pidf.held;
009
010import java.net.URI;
011import java.util.ArrayList;
012import java.util.Date;
013import java.util.List;
014
015/**
016 * The {@code <held:locationUriSet>} XML element.
017 */
018public class LocationUriSet implements Cloneable {
019
020    private Date expires;
021    private List<URI> locationURIs = new ArrayList<URI>();
022
023    public Date getExpires() {
024        return this.expires;
025    }
026    public void setExpires(Date expires) {
027        this.expires = expires;
028    }
029
030    public List<URI> getLocationURIs() {
031        return this.locationURIs;
032    }
033    public void setLocationURIs(List<URI> locationURIs) {
034        this.locationURIs = locationURIs;
035    }
036
037// Cloneable
038
039    @Override
040    public LocationUriSet clone() {
041        final LocationUriSet clone;
042        try {
043            clone = (LocationUriSet)super.clone();
044        } catch (CloneNotSupportedException e) {
045            throw new RuntimeException(e);
046        }
047        clone.locationURIs = this.locationURIs != null ? new ArrayList<>(this.locationURIs) : null;
048        return clone;
049    }
050}
051