Segment.java 552 Bytes
package com.upc.pbe.upcnews;

import java.net.MalformedURLException;
import java.net.URL;

public class Segment {
	
	private String name;
	private float duration;
	private URL url;
	
	public Segment(float dur) {
		name = "";
		duration = dur;
	}
	
	public void setName(String nam) {
		name = nam;
	}
	
	public String getName() {
		return name;
	}
	
	public float getDuration() {
		return duration;
	}
	public void setURL(String url) throws MalformedURLException {
		this.url = new URL(url);
	}
	
	public String getURL() {
		return url.toString();
	}
}