Home
last modified time | relevance | path

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

1234567

/libcore/json/src/test/java/org/json/
DJSONObjectTest.java40 JSONObject object = new JSONObject(); in testEmptyObject() local
41 assertEquals(0, object.length()); in testEmptyObject()
44 assertNull(object.names()); in testEmptyObject()
47 assertNull(object.toJSONArray(new JSONArray())); in testEmptyObject()
48 assertEquals("{}", object.toString()); in testEmptyObject()
49 assertEquals("{}", object.toString(5)); in testEmptyObject()
51 object.get("foo"); in testEmptyObject()
56 object.getBoolean("foo"); in testEmptyObject()
61 object.getDouble("foo"); in testEmptyObject()
66 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/libart/src/main/java/java/lang/reflect/
DField.java278 public Object get(Object object) throws IllegalAccessException, IllegalArgumentException { in get() argument
279 return get(object, isAccessible()); in get()
282 private native Object get(Object object, boolean accessible) in get() argument
308 public boolean getBoolean(Object object) throws IllegalAccessException, in getBoolean() argument
310 return getBoolean(object, isAccessible()); in getBoolean()
313 private native boolean getBoolean(Object object, boolean accessible) in getBoolean() argument
339 public byte getByte(Object object) throws IllegalAccessException, IllegalArgumentException { in getByte() argument
340 return getByte(object, isAccessible()); in getByte()
343 private native byte getByte(Object object, boolean accessible) in getByte() argument
369 public char getChar(Object object) throws IllegalAccessException, IllegalArgumentException { in getChar() argument
[all …]
/libcore/json/src/main/java/org/json/
DJSONArray.java92 Object object = readFrom.nextValue(); in JSONArray() local
93 if (object instanceof JSONArray) { in JSONArray()
94 values = ((JSONArray) object).values; in JSONArray()
96 throw JSON.typeMismatch(object, "JSONArray"); in JSONArray()
327 Object object = get(index); in getBoolean() local
328 Boolean result = JSON.toBoolean(object); in getBoolean()
330 throw JSON.typeMismatch(index, object, "boolean"); in getBoolean()
348 Object object = opt(index); in optBoolean() local
349 Boolean result = JSON.toBoolean(object); in optBoolean()
361 Object object = get(index); in getDouble() local
[all …]
DJSONObject.java156 Object object = readFrom.nextValue(); in JSONObject() local
157 if (object instanceof JSONObject) { in JSONObject()
158 this.nameValuePairs = ((JSONObject) object).nameValuePairs; in JSONObject()
160 throw JSON.typeMismatch(object, "JSONObject"); in JSONObject()
410 Object object = get(name); in getBoolean() local
411 Boolean result = JSON.toBoolean(object); in getBoolean()
413 throw JSON.typeMismatch(name, object, "boolean"); in getBoolean()
431 Object object = opt(name); in optBoolean() local
432 Boolean result = JSON.toBoolean(object); in optBoolean()
444 Object object = get(name); in getDouble() local
[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.java97 public void add(E object) { in add() argument
100 AbstractList.this.add(pos + 1, object); in add()
140 public void set(E object) { in set() argument
143 AbstractList.this.set(lastPosition, object); in set()
185 public void add(E object) { in add() argument
186 iterator.add(object); in add()
231 public void set(E object) { in set() argument
232 iterator.set(object); in set()
244 public void add(int location, E object) { in add() argument
247 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()
220 public synchronized void addElement(E object) { in addElement() argument
224 elementData[elementCount++] = object; in addElement()
281 public boolean contains(Object object) { in contains() argument
282 return indexOf(object, 0) != -1; in contains()
389 public synchronized boolean equals(Object object) { in equals() argument
390 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()
DMiniEnumSet.java140 public boolean contains(Object object) { in contains() argument
141 if (object == null || !isValidType(object.getClass())) { in contains()
146 Enum<E> element = (Enum<E>) object; in contains()
215 public boolean remove(Object object) { in remove() argument
216 if (object == null || !isValidType(object.getClass())) { in remove()
221 Enum<E> element = (Enum<E>) object; in remove()
234 public boolean equals(Object object) { in equals() argument
235 if (!(object instanceof EnumSet)) { in equals()
236 return super.equals(object); in equals()
238 EnumSet<?> set =(EnumSet<?>) object; in equals()
DIdentityHashMap.java99 public boolean equals(Object object) { in equals() argument
100 if (this == object) { in equals()
103 if (object instanceof Map.Entry) { in equals()
104 Map.Entry<?, ?> entry = (Map.Entry) object; in equals()
122 public V setValue(V object) { in setValue() argument
123 V result = super.setValue(object); in setValue()
124 map.put(key, object); in setValue()
219 public boolean remove(Object object) { in remove() argument
220 if (contains(object)) { in remove()
221 associatedMap.remove(((Map.Entry) object).getKey()); in remove()
[all …]
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
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 …]
DAbstractCollection.java39 public boolean add(E object) { in add() argument
126 public boolean contains(Object object) { in contains() argument
128 if (object != null) { in contains()
130 if (object.equals(it.next())) { in contains()
224 public boolean remove(Object object) { in remove() argument
226 if (object != null) { in remove()
228 if (object.equals(it.next())) { in remove()
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()
278 public void add(int location, E object) { in add() argument
291 Link<E> newLink = new Link<E>(object, previous, link); in add()
309 public boolean add(E object) { in add() argument
310 return addLastImpl(object); in add()
[all …]
DAbstractSet.java48 public boolean equals(Object object) { in equals() argument
49 if (this == object) { in equals()
52 if (object instanceof Set) { in equals()
53 Set<?> s = (Set<?>) object; in equals()
/libcore/luni/src/main/java/java/io/
DObjectOutputStream.java530 protected Object replaceObject(Object object) throws IOException { in replaceObject() argument
532 return object; in replaceObject()
1011 private void writeHierarchy(Object object, ObjectStreamClass classDesc) in writeHierarchy() argument
1013 if (object == null) { in writeHierarchy()
1024 currentObject = object; in writeHierarchy()
1033 method.invoke(object, new Object[] { this }); in writeHierarchy()
1204 private int writeNewClass(Class<?> object, boolean unshared) throws IOException { in writeNewClass() argument
1212 ObjectStreamClass clDesc = ObjectStreamClass.lookupStreamClass(object); in writeNewClass()
1224 objectsWritten.put(object, handle); in writeNewClass()
1332 private int writeNewObject(Object object, Class<?> theClass, ObjectStreamClass clDesc, in writeNewObject() argument
[all …]
/libcore/luni/src/main/java/org/apache/harmony/security/x509/
DTime.java50 public int getIndex(java.lang.Object object) {
52 if (((java.util.Date) object).getTime() < JAN_01_2050) {
59 public Object getObjectToEncode(Object object) {
60 return object;
/libcore/support/src/test/java/org/apache/harmony/testframework/serialization/
DSerializationTest.java269 public static SerializableAssert defineComparator(TestCase test, Object object) in defineComparator() argument
276 Method m = object.getClass().getMethod("equals", new Class[] { Object.class }); in defineComparator()
285 if (object instanceof Throwable) { in defineComparator()
288 if (object instanceof PermissionCollection) { in defineComparator()
303 public static void verifyGolden(TestCase test, Object object) throws Exception { in verifyGolden() argument
304 verifyGolden(test, object, defineComparator(test, object)); in verifyGolden()
319 public static void verifyGolden(TestCase test, Object object, SerializableAssert comparator) in verifyGolden() argument
323 comparator.assertDeserialized((Serializable) object, deserialized); in verifyGolden()
373 public static void verifySelf(Object object) throws Exception { in verifySelf() argument
374 verifySelf(object, defineComparator(null, object)); in verifySelf()
[all …]
/libcore/luni/src/main/java/java/text/
DNumberFormat.java189 public boolean equals(Object object) { in equals() argument
190 if (object == this) { in equals()
193 if (!(object instanceof NumberFormat)) { in equals()
196 NumberFormat obj = (NumberFormat) object; in equals()
294 public StringBuffer format(Object object, StringBuffer buffer, FieldPosition field) { in format() argument
295 if (object instanceof Byte || object instanceof Short || object instanceof Integer || in format()
296 object instanceof Long || in format()
297 (object instanceof BigInteger && ((BigInteger) object).bitLength() < 64)) { in format()
298 long lv = ((Number) object).longValue(); in format()
300 } else if (object instanceof Number) { in format()
[all …]
/libcore/luni/src/test/java/libcore/java/io/
DOldObjectInputStreamGetFieldTest.java71 Support_GetPutFields object = (Support_GetPutFields) ois.readObject(); in test_get() local
77 object.equals(newObject)); in test_get()
99 Support_GetPutFields object = (Support_GetPutFields) ois.readObject(); in test_defaultedLjava_lang_String() local
100 ObjectInputStream.GetField fields = object.getField; in test_defaultedLjava_lang_String()
123 Support_GetPutFields object = (Support_GetPutFields) ois.readObject(); in test_getException() local
124 ObjectInputStream.GetField fields = object.getField; in test_getException()
239 Support_GetPutFields object = (Support_GetPutFields) ois.readObject(); in test_getObjectStreamClass() local
241 object.getField.getObjectStreamClass()); in test_getObjectStreamClass()

1234567