Blame view

src/com/upc/pbe/upcnews/Segment.java 552 Bytes
Imanol-Mikel Barba Sabariego authored
1
2
3
4
5
package com.upc.pbe.upcnews;

import java.net.MalformedURLException;
import java.net.URL;
Imanol-Mikel Barba Sabariego authored
6
7
public class Segment {
Imanol-Mikel Barba Sabariego authored
8
	private String name;
Imanol-Mikel Barba Sabariego authored
9
	private float duration;
Imanol-Mikel Barba Sabariego authored
10
11
	private URL url;
Imanol-Mikel Barba Sabariego authored
12
	public Segment(float dur) {
Imanol-Mikel Barba Sabariego authored
13
14
15
16
		name = "";
		duration = dur;
	}
Imanol-Mikel Barba Sabariego authored
17
	public void setName(String nam) {
Imanol-Mikel Barba Sabariego authored
18
19
20
		name = nam;
	}
Imanol-Mikel Barba Sabariego authored
21
	public String getName() {
Imanol-Mikel Barba Sabariego authored
22
23
24
		return name;
	}
Imanol-Mikel Barba Sabariego authored
25
	public float getDuration() {
Imanol-Mikel Barba Sabariego authored
26
27
		return duration;
	}
Imanol-Mikel Barba Sabariego authored
28
	public void setURL(String url) throws MalformedURLException {
Imanol-Mikel Barba Sabariego authored
29
30
31
		this.url = new URL(url);
	}
Imanol-Mikel Barba Sabariego authored
32
	public String getURL() {
Imanol-Mikel Barba Sabariego authored
33
		return url.toString();
Imanol-Mikel Barba Sabariego authored
34
35
	}
}