1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.common.util.metainf.model;
17
18 import org.kuali.common.util.Assert;
19
20 public class MetaInfResource implements Comparable<MetaInfResource> {
21
22 public static final long UNKNOWN_SIZE = -1;
23 public static final long UNKNOWN_LINECOUNT = -1;
24
25 private final String location;
26 private final long size;
27 private final long lineCount;
28
29 public MetaInfResource(String location) {
30 this(location, UNKNOWN_SIZE, UNKNOWN_LINECOUNT);
31 }
32
33 public MetaInfResource(String location, long size, long lineCount) {
34 Assert.noBlanks(location);
35 this.location = location;
36 this.size = size;
37 this.lineCount = lineCount;
38 }
39
40 @Override
41 public int compareTo(MetaInfResource other) {
42 return location.compareTo(other.getLocation());
43 }
44
45 public String getLocation() {
46 return location;
47 }
48
49 public long getSize() {
50 return size;
51 }
52
53 public long getLineCount() {
54 return lineCount;
55 }
56
57 }