KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > update > internal > core > Volume


1 /*******************************************************************************
2  * Copyright (c) 2000, 2005 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.update.internal.core;
12
13 import java.io.File JavaDoc;
14
15 import org.eclipse.update.configuration.IVolume;
16 import org.eclipse.update.core.model.ModelObject;
17
18 /**
19  * Default implementation of a IVolume
20  */

21 public class Volume extends ModelObject implements IVolume {
22
23     private long size;
24     private int type;
25     private String JavaDoc label;
26     private File JavaDoc root;
27
28     /**
29      * Constructor for Volume.
30      */

31     public Volume(File JavaDoc root,String JavaDoc label,int type,long size) {
32         super();
33         this.root = root;
34         this.label = label;
35         this.type = type;
36         this.size = size;
37     }
38
39     /**
40      * @see IVolume#getFreeSpace()
41      */

42     public long getFreeSpace() {
43         return size;
44     }
45
46     /**
47      * @see IVolume#getLabel()
48      */

49     public String JavaDoc getLabel() {
50         return label;
51     }
52
53     /**
54      * @see IVolume#getType()
55      */

56     public int getType() {
57         return type;
58     }
59
60     /**
61      * @see IVolume#getFile()
62      */

63     public File JavaDoc getFile() {
64         return root;
65     }
66
67     public Object JavaDoc getAdapter(Class JavaDoc arg0) {
68         return null;
69     }
70
71 }
72
Popular Tags