Lines Matching refs:value

62     convertValueToList(CharSequence value, String[] options, int defaultValue)
64 if (null != value) {
66 if (value.equals(options[i]))
75 convertValueToBoolean(CharSequence value, boolean defaultValue)
79 if (null == value)
82 if (value.equals("1")
83 || value.equals("true")
84 || value.equals("TRUE"))
101 int value;
136 public static int convertValueToUnsignedInt(String value, int defaultValue) {
137 if (null == value) {
141 return parseUnsignedIntAttribute(value);
145 String value = charSeq.toString();
149 int len = value.length();
152 if ('0' == value.charAt(index)) {
157 char c = value.charAt(index + 1);
166 } else if ('#' == value.charAt(index)) {
171 return (int) Long.parseLong(value.substring(index), base);
439 out.attribute(null, "value", Integer.toString(val[i]));
478 out.attribute(null, "value", Long.toString(val[i]));
517 out.attribute(null, "value", Double.toString(val[i]));
556 out.attribute(null, "value", val[i]);
595 out.attribute(null, "value", Boolean.toString(val[i]));
603 * Flatten an object's value into an XmlSerializer. The value can later
606 * Currently supported value types are: null, String, Integer, Long,
610 * @param name Name attribute to include with this value's tag, or null
624 * Flatten an object's value into an XmlSerializer. The value can later
627 * Currently supported value types are: null, String, Integer, Long,
631 * @param name Name attribute to include with this value's tag, or null
710 throw new RuntimeException("writeValueXml: unable to write value " + v);
717 out.attribute(null, "value", v.toString());
1037 parser.getAttributeValue(null, "value"));
1040 "Need value attribute in item");
1043 "Not a number in value attribute in item");
1103 array[i] = Long.parseLong(parser.getAttributeValue(null, "value"));
1105 throw new XmlPullParserException("Need value attribute in item");
1107 throw new XmlPullParserException("Not a number in value attribute in item");
1163 array[i] = Double.parseDouble(parser.getAttributeValue(null, "value"));
1165 throw new XmlPullParserException("Need value attribute in item");
1167 throw new XmlPullParserException("Not a number in value attribute in item");
1223 array[i] = parser.getAttributeValue(null, "value");
1225 throw new XmlPullParserException("Need value attribute in item");
1227 throw new XmlPullParserException("Not a number in value attribute in item");
1283 array[i] = Boolean.valueOf(parser.getAttributeValue(null, "value"));
1285 throw new XmlPullParserException("Need value attribute in item");
1287 throw new XmlPullParserException("Not a number in value attribute in item");
1312 * tag that defines the value.
1316 * of the value's tag.
1318 * @return Object The newly generated value object.
1351 //System.out.println("Reading this value tag: " + tagName + ", name=" + valueName);
1358 String value = "";
1364 //System.out.println("Returning value for " + valueName + ": " + value);
1365 return value;
1370 value += parser.getText();
1383 //System.out.println("Returning value for " + valueName + ": " + res);
1388 //System.out.println("Returning value for " + valueName + ": " + res);
1393 //System.out.println("Returning value for " + valueName + ": " + res);
1398 //System.out.println("Returning value for " + valueName + ": " + res);
1403 //System.out.println("Returning value for " + valueName + ": " + res);
1411 //System.out.println("Returning value for " + valueName + ": " + res);
1417 //System.out.println("Returning value for " + valueName + ": " + res);
1423 //System.out.println("Returning value for " + valueName + ": " + res);
1439 //System.out.println("Returning value for " + valueName + ": " + res);
1461 return Integer.parseInt(parser.getAttributeValue(null, "value"));
1463 return Long.valueOf(parser.getAttributeValue(null, "value"));
1465 return new Float(parser.getAttributeValue(null, "value"));
1467 return new Double(parser.getAttributeValue(null, "value"));
1469 return Boolean.valueOf(parser.getAttributeValue(null, "value"));
1474 throw new XmlPullParserException("Need value attribute in <" + tagName + ">");
1477 "Not a number in value attribute in <" + tagName + ">");
1524 final String value = in.getAttributeValue(null, name);
1526 return Integer.parseInt(value);
1533 final String value = in.getAttributeValue(null, name);
1535 return Integer.parseInt(value);
1537 throw new ProtocolException("problem parsing " + name + "=" + value + " as int");
1541 public static void writeIntAttribute(XmlSerializer out, String name, int value)
1543 out.attribute(null, name, Integer.toString(value));
1547 final String value = in.getAttributeValue(null, name);
1549 return Long.parseLong(value);
1556 final String value = in.getAttributeValue(null, name);
1558 return Long.parseLong(value);
1560 throw new ProtocolException("problem parsing " + name + "=" + value + " as long");
1564 public static void writeLongAttribute(XmlSerializer out, String name, long value)
1566 out.attribute(null, name, Long.toString(value));
1570 final String value = in.getAttributeValue(null, name);
1572 return Float.parseFloat(value);
1574 throw new ProtocolException("problem parsing " + name + "=" + value + " as long");
1578 public static void writeFloatAttribute(XmlSerializer out, String name, float value)
1580 out.attribute(null, name, Float.toString(value));
1584 final String value = in.getAttributeValue(null, name);
1585 return Boolean.parseBoolean(value);
1590 final String value = in.getAttributeValue(null, name);
1591 if (value == null) {
1594 return Boolean.parseBoolean(value);
1598 public static void writeBooleanAttribute(XmlSerializer out, String name, boolean value)
1600 out.attribute(null, name, Boolean.toString(value));
1604 final String value = in.getAttributeValue(null, name);
1605 return (value != null) ? Uri.parse(value) : null;
1608 public static void writeUriAttribute(XmlSerializer out, String name, Uri value)
1610 if (value != null) {
1611 out.attribute(null, name, value.toString());
1619 public static void writeStringAttribute(XmlSerializer out, String name, String value)
1621 if (value != null) {
1622 out.attribute(null, name, value);
1627 final String value = in.getAttributeValue(null, name);
1628 if (value != null) {
1629 return Base64.decode(value, Base64.DEFAULT);
1635 public static void writeByteArrayAttribute(XmlSerializer out, String name, byte[] value)
1637 if (value != null) {
1638 out.attribute(null, name, Base64.encodeToString(value, Base64.DEFAULT));
1643 final byte[] value = readByteArrayAttribute(in, name);
1644 if (value != null) {
1645 return BitmapFactory.decodeByteArray(value, 0, value.length);
1652 public static void writeBitmapAttribute(XmlSerializer out, String name, Bitmap value)
1654 if (value != null) {
1656 value.compress(CompressFormat.PNG, 90, os);