git://git.nikiroo.be
/
jvcard.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add some comparisons methods, fix the existing checks
[jvcard.git]
/
src
/
be
/
nikiroo
/
jvcard
/
Card.java
diff --git
a/src/be/nikiroo/jvcard/Card.java
b/src/be/nikiroo/jvcard/Card.java
index e714b5633a9b5047d4a08df36463bbda05bab2f4..986f81d17c0932cba2081d7586b0ce115ad25547 100644
(file)
--- a/
src/be/nikiroo/jvcard/Card.java
+++ b/
src/be/nikiroo/jvcard/Card.java
@@
-58,8
+58,7
@@
public class Card extends BaseClass<Contact> {
this.file = file;
switch (format) {
case VCard21:
this.file = file;
switch (format) {
case VCard21:
- this.name = file.getName().replaceAll(
- ".[vV][cC][fF]$", "");
+ this.name = file.getName().replaceAll(".[vV][cC][fF]$", "");
break;
case Abook:
default:
break;
case Abook:
default:
@@
-177,11
+176,11
@@
public class Card extends BaseClass<Contact> {
}
/**
}
/**
- * Return the
input
which was used to open this {@link Card}.
+ * Return the
{@link File}
which was used to open this {@link Card}.
*
* @return the input
*/
*
* @return the input
*/
- public File get
Input
() {
+ public File get
File
() {
return file;
}
return file;
}
@@
-219,6
+218,16
@@
public class Card extends BaseClass<Contact> {
return toString(Format.VCard21);
}
return toString(Format.VCard21);
}
+ @Override
+ public String getId() {
+ return "" + name;
+ }
+
+ @Override
+ public String getState() {
+ return "" + name + format;
+ }
+
/**
* Load the data from the given {@link File} under the given {@link Format}.
*
/**
* Load the data from the given {@link File} under the given {@link Format}.
*