Refresh data on "Back", allow configuration of View + border
[jvcard.git] / src / be / nikiroo / jvcard / Data.java
index 5c09a13419c1177167f4b2b1cb7bcea1fab68dbb..63362332004fede408a44ee37d2fc3460fa0a64d 100644 (file)
@@ -146,6 +146,21 @@ public class Data extends BaseClass<TypeInfo> {
                return b64 >= 0;
        }
 
+       /**
+        * Check if this {@link Data} has the "preferred" flag.
+        * 
+        * @return TRUE if it has
+        */
+       public boolean isPreferred() {
+               for (TypeInfo type : this) {
+                       if (type.getName().equals("TYPE") && type.getValue().equals("pref")) {
+                               return true;
+                       }
+               }
+
+               return false;
+       }
+
        @Override
        public String getId() {
                return "" + name;