Home
last modified time | relevance | path

Searched refs:object (Results 1 – 25 of 185) sorted by relevance

12345678

/libcore/json/src/test/java/org/json/
DJSONObjectTest.java37 JSONObject object = new JSONObject(); in testEmptyObject() local
38 assertEquals(0, object.length()); in testEmptyObject()
41 assertNull(object.names()); in testEmptyObject()
44 assertNull(object.toJSONArray(new JSONArray())); in testEmptyObject()
45 assertEquals("{}", object.toString()); in testEmptyObject()
46 assertEquals("{}", object.toString(5)); in testEmptyObject()
48 object.get("foo"); in testEmptyObject()
53 object.getBoolean("foo"); in testEmptyObject()
58 object.getDouble("foo"); in testEmptyObject()
63 object.getInt("foo"); in testEmptyObject()
[all …]
DJSONStringerTest.java41 stringer.object(); in testEmptyObject()
77 stringer.object(); in testKeyValue()
156 new JSONStringer().object().endArray(); in testMismatchedScopes()
161 new JSONStringer().object().key("a").key("a"); in testMismatchedScopes()
166 new JSONStringer().object().value(false); in testMismatchedScopes()
174 new JSONStringer().object().key(null); in testNullKey()
182 stringer.object(); in testRepeatedKey()
192 stringer.object(); in testEmptyKey()
222 new JSONStringer().object().key(original).value(false).endObject().toString()); in assertEscapedAllWays()
224 new JSONStringer().object().key("a").value(original).endObject().toString()); in assertEscapedAllWays()
[all …]
DParsingTest.java164 assertParsed(object("foo", 5), "{\"foo\": 5}"); in testParsingObjects()
165 assertParsed(object("foo", 5), "{foo: 5}"); in testParsingObjects()
166 assertParsed(object("foo", 5, "bar", "baz"), "{\"foo\": 5, \"bar\": \"baz\"}"); in testParsingObjects()
167 assertParsed(object("foo", 5, "bar", "baz"), "{\"foo\": 5; \"bar\": \"baz\"}"); in testParsingObjects()
168 assertParsed(object("foo", 5, "bar", "baz"), "{\"foo\"= 5; \"bar\"= \"baz\"}"); in testParsingObjects()
169 assertParsed(object("foo", 5, "bar", "baz"), "{\"foo\"=> 5; \"bar\"=> \"baz\"}"); in testParsingObjects()
170 assertParsed(object("foo", object(), "bar", array()), "{\"foo\"=> {}; \"bar\"=> []}"); in testParsingObjects()
171 assertParsed(object("foo", object("foo", array(5, 6))), "{\"foo\": {\"foo\": [5, 6]}}"); in testParsingObjects()
172 … assertParsed(object("foo", object("foo", array(5, 6))), "{\"foo\":\n\t{\t \"foo\":[5,\r6]}}"); in testParsingObjects()
224 private JSONObject object(Object... keyValuePairs) throws JSONException { in object() method in ParsingTest
[all …]
DSelfUseTest.java42 private final JSONObject object = new JSONObject() { field in SelfUseTest
125 object.putOpt("foo", "bar"); in testObjectPut()
130 object.accumulate("foo", "bar"); in testObjectAccumulate()
135 object.put("foo", "true"); in testObjectGetBoolean()
136 object.getBoolean("foo"); in testObjectGetBoolean()
141 object.optBoolean("foo"); in testObjectOptType()
144 object.optDouble("foo"); in testObjectOptType()
147 object.optInt("foo"); in testObjectOptType()
150 object.optLong("foo"); in testObjectOptType()
153 object.optString("foo"); in testObjectOptType()
[all …]
/libcore/json/src/main/java/org/json/
DJSONArray.java87 Object object = readFrom.nextValue(); in JSONArray() local
88 if (object instanceof JSONArray) { in JSONArray()
89 values = ((JSONArray) object).values; in JSONArray()
91 throw JSON.typeMismatch(object, "JSONArray"); in JSONArray()
286 Object object = get(index); in getBoolean() local
287 Boolean result = JSON.toBoolean(object); in getBoolean()
289 throw JSON.typeMismatch(index, object, "boolean"); in getBoolean()
307 Object object = opt(index); in optBoolean() local
308 Boolean result = JSON.toBoolean(object); in optBoolean()
320 Object object = get(index); in getDouble() local
[all …]
DJSONObject.java154 Object object = readFrom.nextValue(); in JSONObject() local
155 if (object instanceof JSONObject) { in JSONObject()
156 this.nameValuePairs = ((JSONObject) object).nameValuePairs; in JSONObject()
158 throw JSON.typeMismatch(object, "JSONObject"); in JSONObject()
375 Object object = get(name); in getBoolean() local
376 Boolean result = JSON.toBoolean(object); in getBoolean()
378 throw JSON.typeMismatch(name, object, "boolean"); in getBoolean()
396 Object object = opt(name); in optBoolean() local
397 Boolean result = JSON.toBoolean(object); in optBoolean()
409 Object object = get(name); in getDouble() local
[all …]
/libcore/luni/src/main/java/java/lang/reflect/
DField.java205 public boolean equals(Object object) { in equals() argument
206 return object instanceof Field && toString().equals(object.toString()); in equals()
236 public Object get(Object object) throws IllegalAccessException, IllegalArgumentException { in get() argument
237 return getField(object, declaringClass, type, slot, flag); in get()
263 public boolean getBoolean(Object object) throws IllegalAccessException, in getBoolean() argument
265 return getZField(object, declaringClass, type, slot, flag, TYPE_BOOLEAN); in getBoolean()
291 public byte getByte(Object object) throws IllegalAccessException, IllegalArgumentException { in getByte() argument
292 return getBField(object, declaringClass, type, slot, flag, TYPE_BYTE); in getByte()
318 public char getChar(Object object) throws IllegalAccessException, IllegalArgumentException { in getChar() argument
319 return getCField(object, declaringClass, type, slot, flag, TYPE_CHAR); in getChar()
[all …]
/libcore/luni/src/main/java/java/security/
DGuardedObject.java31 private final Object object; field in GuardedObject
45 public GuardedObject(Object object, Guard guard) { in GuardedObject() argument
46 this.object = object; in GuardedObject()
61 guard.checkGuard(object); in getObject()
63 return object; in getObject()
72 guard.checkGuard(object); in writeObject()
/libcore/luni/src/main/java/java/util/
DList.java50 public void add(int location, E object); in add() argument
66 public boolean add(E object); in add() argument
128 public boolean contains(Object object); in contains() argument
153 public boolean equals(Object object); in equals() argument
183 public int indexOf(Object object); in indexOf() argument
212 public int lastIndexOf(Object object); in lastIndexOf() argument
261 public boolean remove(Object object); in remove() argument
306 public E set(int location, E object); in set() argument
DAbstractList.java101 public void add(E object) { in add() argument
104 AbstractList.this.add(pos + 1, object); in add()
144 public void set(E object) { in set() argument
147 AbstractList.this.set(lastPosition, object); in set()
190 public void add(E object) { in add() argument
191 iterator.add(object); in add()
236 public void set(E object) { in set() argument
237 iterator.set(object); in set()
250 public void add(int location, E object) { in add() argument
253 fullList.add(location + offset, object); in add()
[all …]
DVector.java139 public void add(int location, E object) { in add() argument
140 insertElementAt(object, location); in add()
151 public synchronized boolean add(E object) { in add() argument
155 elementData[elementCount++] = object; in add()
221 public synchronized void addElement(E object) { in addElement() argument
225 elementData[elementCount++] = object; in addElement()
282 public boolean contains(Object object) { in contains() argument
283 return indexOf(object, 0) != -1; in contains()
390 public synchronized boolean equals(Object object) { in equals() argument
391 if (this == object) { in equals()
[all …]
DMapEntry.java51 public boolean equals(Object object) { in equals() argument
52 if (this == object) { in equals()
55 if (object instanceof Map.Entry) { in equals()
56 Map.Entry<?, ?> entry = (Map.Entry<?, ?>) object; in equals()
79 public V setValue(V object) { in setValue() argument
81 value = object; in setValue()
DCollection.java83 public boolean add(E object); in add() argument
137 public boolean contains(Object object); in contains() argument
171 public boolean equals(Object object); in equals() argument
220 public boolean remove(Object object); in remove() argument
DSet.java42 public boolean add(E object); in add() argument
78 public boolean contains(Object object); in contains() argument
102 public boolean equals(Object object); in equals() argument
141 public boolean remove(Object object); in remove() argument
DMiniEnumSet.java147 public boolean contains(Object object) { in contains() argument
148 if (object == null || !isValidType(object.getClass())) { in contains()
153 Enum<E> element = (Enum<E>) object; in contains()
222 public boolean remove(Object object) { in remove() argument
223 if (object == null || !isValidType(object.getClass())) { in remove()
228 Enum<E> element = (Enum<E>) object; in remove()
241 public boolean equals(Object object) { in equals() argument
242 if (!(object instanceof EnumSet)) { in equals()
243 return super.equals(object); in equals()
245 EnumSet<?> set =(EnumSet<?>) object; in equals()
DAbstractMap.java80 public V setValue(V object) { in setValue() argument
84 @Override public boolean equals(Object object) { in equals() argument
85 if (this == object) { in equals()
88 if (object instanceof Map.Entry) { in equals()
89 Map.Entry<?, ?> entry = (Map.Entry<?, ?>) object; in equals()
141 public V setValue(V object) { in setValue() argument
143 value = object; in setValue()
147 @Override public boolean equals(Object object) { in equals() argument
148 if (this == object) { in equals()
151 if (object instanceof Map.Entry) { in equals()
[all …]
DIdentityHashMap.java96 public boolean equals(Object object) { in equals() argument
97 if (this == object) { in equals()
100 if (object instanceof Map.Entry) { in equals()
101 Map.Entry<?, ?> entry = (Map.Entry) object; in equals()
209 public boolean remove(Object object) { in remove() argument
210 if (contains(object)) { in remove()
211 associatedMap.remove(((Map.Entry) object).getKey()); in remove()
218 public boolean contains(Object object) { in contains() argument
219 if (object instanceof Map.Entry) { in contains()
221 .getEntry(((Map.Entry) object).getKey()); in contains()
[all …]
DLinkedList.java67 LinkIterator(LinkedList<ET> object, int location) { in LinkIterator() argument
68 list = object; in LinkIterator()
89 public void add(ET object) { in add() argument
92 Link<ET> newLink = new Link<ET>(object, link, next); in add()
171 public void set(ET object) { in set() argument
174 lastLink.data = object; in set()
279 public void add(int location, E object) { in add() argument
292 Link<E> newLink = new Link<E>(object, previous, link); in add()
310 public boolean add(E object) { in add() argument
311 return addLastImpl(object); in add()
[all …]
DAbstractSet.java49 public boolean equals(Object object) { in equals() argument
50 if (this == object) { in equals()
53 if (object instanceof Set) { in equals()
54 Set<?> s = (Set<?>) object; in equals()
/libcore/luni/src/main/java/org/apache/harmony/security/asn1/
DInformationObjectSet.java54 public void put(int[] oid, Object object) { in put() argument
72 list[i] = new Entry(oid, object); in put()
82 return list[i].object; in get()
100 public Object object; field in InformationObjectSet.Entry
102 public Entry(int[] oid, Object object) { in Entry() argument
104 this.object = object; in Entry()
/libcore/luni/src/main/java/java/io/
DObjectOutputStream.java649 protected Object replaceObject(Object object) throws IOException { in replaceObject() argument
651 return object; in replaceObject()
1194 private void writeHierarchy(Object object, ObjectStreamClass classDesc) in writeHierarchy() argument
1197 if (object == null) { in writeHierarchy()
1205 writeHierarchy(object, classDesc.getSuperclass()); in writeHierarchy()
1210 currentObject = object; in writeHierarchy()
1219 method.invoke(object, new Object[] { this }); in writeHierarchy()
1392 private Integer writeNewClass(Class<?> object, boolean unshared) in writeNewClass() argument
1401 ObjectStreamClass clDesc = ObjectStreamClass.lookupStreamClass(object); in writeNewClass()
1406 writeEnumDesc(object, clDesc, unshared); in writeNewClass()
[all …]
/libcore/luni/src/main/java/java/lang/
DByte.java107 public int compareTo(Byte object) { in compareTo() argument
108 return value > object.value ? 1 : (value < object.value ? -1 : 0); in compareTo()
148 public boolean equals(Object object) { in equals() argument
149 return (object == this) || (object instanceof Byte) in equals()
150 && (value == ((Byte) object).value); in equals()
DShort.java106 public int compareTo(Short object) { in compareTo() argument
107 return value > object.value ? 1 : (value < object.value ? -1 : 0); in compareTo()
148 public boolean equals(Object object) { in equals() argument
149 return (object instanceof Short) in equals()
150 && (value == ((Short) object).value); in equals()
/libcore/luni/src/main/java/org/apache/harmony/security/x509/
DTime.java51 public int getIndex(java.lang.Object object) {
53 if (((java.util.Date) object).getTime() < JAN_01_2050) {
60 public Object getObjectToEncode(Object object) {
61 return object;
/libcore/support/src/test/java/org/apache/harmony/testframework/serialization/
DSerializationTest.java326 Object object) throws Exception { in defineComparator() argument
332 Method m = object.getClass().getMethod("equals", in defineComparator()
343 if (object instanceof java.lang.Throwable) { in defineComparator()
345 } else if (object instanceof java.security.PermissionCollection) { in defineComparator()
363 public static void verifyGolden(TestCase test, Object object) in verifyGolden() argument
366 verifyGolden(test, object, defineComparator(test, object)); in verifyGolden()
384 public static void verifyGolden(TestCase test, Object object, in verifyGolden() argument
391 comparator.assertDeserialized((Serializable) object, deserialized); in verifyGolden()
451 public static void verifySelf(Object object) in verifySelf() argument
454 verifySelf(object, defineComparator(null, object)); in verifySelf()
[all …]

12345678