Home
last modified time | relevance | path

Searched refs:source (Results 1 – 25 of 219) sorted by relevance

123456789

/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/channels/
DSourceChannelTest.java40 private Pipe.SourceChannel source; field in SourceChannelTest
50 source = pipe.source(); in setUp()
60 assertEquals(SelectionKey.OP_READ, source.validOps()); in test_validOps()
69 int count = source.read(ByteBuffer.allocate(10)); in test_read_LByteBuffer_DataAvailable()
79 source.read(nullBuf); in test_read_LByteBuffer_Exception()
93 long count = source.read(readBuf); in test_read_LByteBuffer_SinkClosed()
96 count = source.read(readBuf); in test_read_LByteBuffer_SinkClosed()
100 count = source.read(readBuf); in test_read_LByteBuffer_SinkClosed()
109 source.close(); in test_read_LByteBuffer_SourceClosed()
111 source.read(readBuf); in test_read_LByteBuffer_SourceClosed()
[all …]
/libcore/ojluni/src/main/java/java/text/
DRuleBasedCollator.java359 public CollationElementIterator getCollationElementIterator(String source) { in getCollationElementIterator() argument
361 if (source == null) { in getCollationElementIterator()
364 return new CollationElementIterator(collAsICU().getCollationElementIterator(source)); in getCollationElementIterator()
376 CharacterIterator source) { in getCollationElementIterator() argument
378 if (source == null) { in getCollationElementIterator()
381 return new CollationElementIterator(collAsICU().getCollationElementIterator(source)); in getCollationElementIterator()
392 public synchronized int compare(String source, String target) in compare() argument
394 if (source == null || target == null) { in compare()
398 return icuColl.compare(source, target); in compare()
406 public synchronized CollationKey getCollationKey(String source) in getCollationKey() argument
[all …]
DCollationKey.java120 return source; in getSourceString()
142 protected CollationKey(String source) { in CollationKey() argument
143 if (source==null){ in CollationKey()
146 this.source = source; in CollationKey()
149 private final String source; field in CollationKey
/libcore/ojluni/src/test/java/lang/String/
DLiteralReplace.java49 public void testExpected(String source, String target, in testExpected() argument
52 String canonical = canonicalReplace(source, target, replacement); in testExpected()
56 test0(source, target, replacement, expected); in testExpected()
60 public void testCanonical(String source, String target, in testCanonical() argument
63 String canonical = canonicalReplace(source, target, replacement); in testCanonical()
64 test0(source, target, replacement, canonical); in testCanonical()
67 private void test0(String source, String target, String replacement, in test0() argument
70 String result = source.replace(target, replacement); in test0()
78 public void testNPE(String source, String target, String replacement) { in testNPE() argument
79 source.replace(target, replacement); in testNPE()
[all …]
DSplit.java103 String source = "";
104 String[] result = source.split("e", 0);
107 if (!result[0].equals(source))
184 …private void testSplit_fastPath_(String source, Random r, boolean doEscape, int cpFrom, int cpTo) {
201 int off = r.nextInt(source.length());
204 source,
205 regex + source,
206 source + regex,
207 source.substring(0, 3)
208 + regex + source.substring(3, 9)
[all …]
/libcore/luni/src/test/java/libcore/javax/xml/transform/dom/
DDOMSourceTest.java35 DOMSource source = new DOMSource(); in constructor() local
36 assertNotNull(source); in constructor()
37 assertNull(source.getNode()); in constructor()
38 assertNull(source.getSystemId()); in constructor()
44 DOMSource source = new DOMSource(node, "systemId"); in constructorWithNodeAndString() local
45 assertEquals(node, source.getNode()); in constructorWithNodeAndString()
46 assertEquals("systemId", source.getSystemId()); in constructorWithNodeAndString()
51 DOMSource source = new DOMSource(); in setSystemId() local
52 assertNull(source.getSystemId()); in setSystemId()
54 source.setSystemId("systemId"); in setSystemId()
[all …]
/libcore/ojluni/src/test/java/util/stream/boottest/java/util/stream/
DSliceSpliteratorTest.java44 Collection<T> source; field in SliceSpliteratorTest.UnorderedContentAsserter
46 UnorderedContentAsserter(Collection<T> source) { in UnorderedContentAsserter() argument
47 this.source = source; in UnorderedContentAsserter()
57 assertTrue(source.containsAll(actual)); in assertContents()
74 … final Collection<Integer> source = IntStream.range(0, size).boxed().collect(toList()); in sliceSpliteratorDataProvider()
77 … Spliterator<Integer> s = Arrays.spliterator(source.stream().toArray(Integer[]::new)); in sliceSpliteratorDataProvider()
87 … final Collection<Integer> source = IntStream.range(0, size).boxed().collect(toList()); in sliceSpliteratorDataProvider()
90 … Spliterator.OfInt s = Arrays.spliterator(source.stream().mapToInt(i->i).toArray()); in sliceSpliteratorDataProvider()
100 … final Collection<Long> source = LongStream.range(0, size).boxed().collect(toList()); in sliceSpliteratorDataProvider()
103 … Spliterator.OfLong s = Arrays.spliterator(source.stream().mapToLong(i->i).toArray()); in sliceSpliteratorDataProvider()
[all …]
/libcore/luni/src/test/java/libcore/javax/xml/transform/sax/
DSAXSourceTest.java46 private SAXSource source; field in SAXSourceTest
50 source = new SAXSource(); in setUp()
55 source = new SAXSource(); in constructor()
56 assertNull(source.getInputSource()); in constructor()
57 assertNull(source.getXMLReader()); in constructor()
64 source = new SAXSource(reader, is); in constructor_withXMLReaderAndInputSource()
65 assertEquals(reader, source.getXMLReader()); in constructor_withXMLReaderAndInputSource()
66 assertEquals(is, source.getInputSource()); in constructor_withXMLReaderAndInputSource()
72 source.setInputSource(is); in setInputSource()
73 assertEquals(is, source.getInputSource()); in setInputSource()
[all …]
/libcore/ojluni/src/main/java/jdk/random/
DL128X1024MixRandom.java298 public SplittableGenerator split(SplittableGenerator source, long brine) { in split() argument
300 return new L128X1024MixRandom(source.nextLong(), brine << 1, in split()
301 source.nextLong(), source.nextLong(), in split()
302 source.nextLong(), source.nextLong(), in split()
303 source.nextLong(), source.nextLong(), in split()
304 source.nextLong(), source.nextLong(), in split()
305 source.nextLong(), source.nextLong(), in split()
306 source.nextLong(), source.nextLong(), in split()
307 source.nextLong(), source.nextLong(), in split()
308 source.nextLong(), source.nextLong(), in split()
[all …]
DL64X1024MixRandom.java285 public SplittableGenerator split(SplittableGenerator source, long brine) { in split() argument
287 return new L64X1024MixRandom(brine << 1, source.nextLong(), in split()
288 source.nextLong(), source.nextLong(), in split()
289 source.nextLong(), source.nextLong(), in split()
290 source.nextLong(), source.nextLong(), in split()
291 source.nextLong(), source.nextLong(), in split()
292 source.nextLong(), source.nextLong(), in split()
293 source.nextLong(), source.nextLong(), in split()
294 source.nextLong(), source.nextLong(), in split()
295 source.nextLong(), source.nextLong()); in split()
/libcore/ojluni/src/main/java/sun/nio/fs/
DUnixCopyFile.java127 private static void copyDirectory(UnixPath source, in copyDirectory() argument
179 sfd = open(source, O_RDONLY, 0); in copyDirectory()
182 x.rethrowAsIOException(source); in copyDirectory()
185 source.getFileSystem().copyNonPosixAttributes(sfd, dfd); in copyDirectory()
219 private static void copyFile(UnixPath source, in copyFile() argument
228 fi = open(source, O_RDONLY, 0); in copyFile()
230 x.rethrowAsIOException(source); in copyFile()
253 x.rethrowAsIOException(source, target); in copyFile()
267 source.getFileSystem().copyNonPosixAttributes(fi, fo); in copyFile()
303 private static void copyLink(UnixPath source, in copyLink() argument
[all …]
/libcore/ojluni/src/test/java/util/Collections/
DFindSubList.java42 List source = new ArrayList(3 * N); in main() local
54 index[i] = source.size(); in main()
55 source.addAll(t); in main()
56 source.add("*"); in main()
61 source, in main()
62 new LinkedList(source), in main()
63 new Vector(source), in main()
64 Arrays.asList(source.toArray()) in main()
82 Collections.reverse(source); in main()
83 int srcSize = source.size(); in main()
[all …]
/libcore/ojluni/src/main/java/java/util/
DEventObject.java47 protected transient Object source; field in EventObject
55 public EventObject(Object source) { in EventObject() argument
56 if (source == null) in EventObject()
59 this.source = source; in EventObject()
68 return source; in getSource()
77 return getClass().getName() + "[source=" + source + "]"; in toString()
DScanner.java335 private Readable source; field in Scanner
539 private Scanner(Readable source, Pattern pattern) { in Scanner() argument
540 assert source != null : "source should not be null"; in Scanner()
542 this.source = source; in Scanner()
559 public Scanner(Readable source) { in Scanner() argument
560 this(Objects.requireNonNull(source, "source"), WHITESPACE_PATTERN); in Scanner()
571 public Scanner(InputStream source) { in Scanner() argument
572 this(new InputStreamReader(source), WHITESPACE_PATTERN); in Scanner()
586 public Scanner(InputStream source, String charsetName) { in Scanner() argument
587 this(source, toCharset(charsetName)); in Scanner()
[all …]
DSplittableRandom.java236 public java.util.SplittableRandom split(SplittableGenerator source) { in split() argument
237 return new SplittableRandom(source.nextLong(), mixGamma(source.nextLong())); in split()
307 public SplittableRandom split(SplittableGenerator source) { in split() argument
308 return new SplittableRandom(source.nextLong(), mixGamma(source.nextLong())); in split()
359 public Stream<SplittableGenerator> splits(SplittableGenerator source) { in splits() argument
360 return proxy.splits(Long.MAX_VALUE, source); in splits()
371 public Stream<SplittableGenerator> splits(long streamSize, SplittableGenerator source) { in splits() argument
372 return proxy.splits(streamSize, source); in splits()
/libcore/ojluni/src/main/java/sun/nio/ch/
DMembershipKeyImpl.java45 private final InetAddress source; field in MembershipKeyImpl
58 InetAddress source) in MembershipKeyImpl() argument
63 this.source = source; in MembershipKeyImpl()
77 InetAddress source, in Type4() argument
82 super(ch, group, interf, source); in Type4()
96 int source() { in source() method in MembershipKeyImpl.Type4
112 InetAddress source, in Type6() argument
117 super(ch, group, interf, source); in Type6()
131 byte[] source() { in source() method in MembershipKeyImpl.Type6
167 return source; in sourceAddress()
[all …]
/libcore/ojluni/src/test/java/text/Collator/
DMonkeyTest.java79 String source = "-abcdefghijklmnopqrstuvwxyz#&^$@"; in TestCollationKey() local
81 int s = checkValue(r.nextInt() % source.length()); in TestCollationKey()
82 int t = checkValue(r.nextInt() % source.length()); in TestCollationKey()
83 int slen = checkValue((r.nextInt() - source.length()) % source.length()); in TestCollationKey()
84 int tlen = checkValue((r.nextInt() - source.length()) % source.length()); in TestCollationKey()
85 String subs = source.substring((s > slen ? slen : s), (s >= slen ? s : slen)); in TestCollationKey()
86 String subt = source.substring((t > tlen ? tlen : t), (t >= tlen ? t : tlen)); in TestCollationKey()
122 String source = "-abcdefghijklmnopqrstuvwxyz#&^$@"; in TestCompare() local
124 int s = checkValue(r.nextInt() % source.length()); in TestCompare()
125 int t = checkValue(r.nextInt() % source.length()); in TestCompare()
[all …]
DCollatorTest.java103 String[] source, String[] target, int[] result) { in doTest() argument
104 if (source.length != target.length) { in doTest()
106 source.length + ", target = " + target.length); in doTest()
110 if (source.length != result.length) { in doTest()
112 source.length + ", result = " + result.length); in doTest()
118 for (int i = 0; i < source.length ; i++) { in doTest()
119 doTest(col, source[i], target[i], result[i]); in doTest()
124 String source, String target, int result) { in doTest() argument
132 int compareResult = col.compare(source, target); in doTest()
133 CollationKey sortKey1 = col.getCollationKey(source); in doTest()
[all …]
/libcore/ojluni/src/test/java/nio/channels/Selector/
DSelectWithConsumer.java127 Pipe.SourceChannel source = p.source(); in testReadable() local
128 source.configureBlocking(false); in testReadable()
129 SelectionKey key = source.register(sel, SelectionKey.OP_READ); in testReadable()
147 Pipe.SourceChannel source = p.source(); in testWritable() local
193 Pipe.SourceChannel source = p.source(); in testTwoChannels() local
195 source.configureBlocking(false); in testTwoChannels()
197 SelectionKey key1 = source.register(sel, SelectionKey.OP_READ); in testTwoChannels()
250 Pipe.SourceChannel source = p.source(); in testRepeatedSelect1() local
252 source.configureBlocking(false); in testRepeatedSelect1()
253 SelectionKey key = source.register(sel, SelectionKey.OP_READ); in testRepeatedSelect1()
[all …]
/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/
DMatchOpTest.java98 …private <T> void assertPredicates(List<T> source, Kind kind, Predicate<T>[] predicates, boolean...… in assertPredicates() argument
101 boolean match = this.<T>kinds().get(kind).apply(predicates[i]).apply(source.stream()); in assertPredicates()
135 final Supplier<Iterator<Integer>> source; in testInfinite() field in MatchOpTest.CycleIterator
138 CycleIterator(Supplier<Iterator<Integer>> source) { in testInfinite() argument
139 this.source = source; in testInfinite()
145 i = source.get(); in testInfinite()
153 i = source.get(); in testInfinite()
159 Supplier<Iterator<Integer>> source = () -> Arrays.asList(1, 2, 3, 4).iterator(); in testInfinite() local
160 … -> StreamSupport.stream(Spliterators.spliteratorUnknownSize(new CycleIterator(source), 0), false); in testInfinite()
183 …private void assertIntPredicates(Supplier<IntStream> source, Kind kind, IntPredicate[] predicates,… in assertIntPredicates() argument
[all …]
/libcore/ojluni/src/test/java/util/Collection/testlibrary/
DExtendsAbstractSet.java49 public ExtendsAbstractSet(Collection<E> source) { in ExtendsAbstractSet() argument
51 addAll(source); in ExtendsAbstractSet()
68 Iterator<E> source = set.iterator(); in iterator()
71 return source.hasNext(); in iterator()
75 return source.next(); in iterator()
79 source.remove(); in iterator()
DExtendsAbstractCollection.java48 public ExtendsAbstractCollection(Collection<E> source) { in ExtendsAbstractCollection() argument
50 coll.addAll(source); in ExtendsAbstractCollection()
67 Iterator<E> source = coll.iterator(); in iterator()
70 return source.hasNext(); in iterator()
74 return source.next(); in iterator()
78 source.remove(); in iterator()
DExtendsAbstractList.java53 public ExtendsAbstractList(Collection<E> source) { in ExtendsAbstractList() argument
55 addAll(source); in ExtendsAbstractList()
84 Iterator<E> source = list.iterator(); in iterator()
87 return source.hasNext(); in iterator()
91 return source.next(); in iterator()
95 source.remove(); in iterator()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/
DRuleBasedCollatorTest.java35 String source = null; in test_getCollationKeyLjava_lang_String() local
38 CollationKey ck = rbc.getCollationKey(source); in test_getCollationKeyLjava_lang_String()
84 String source = "abc"; in testGetCollationKey() local
85 CollationKey key1 = coll.getCollationKey(source); in testGetCollationKey()
86 assertEquals(source, key1.getSourceString()); in testGetCollationKey()
91 assertTrue(coll.compare(source, source2) > 0); in testGetCollationKey()
104 String source = "cha"; in testGetCollationElementIteratorString() local
105 CollationElementIterator iterator = coll.getCollationElementIterator(source); in testGetCollationElementIteratorString()
110 while (offset != source.length()) { in testGetCollationElementIteratorString()
121 String source = "\u00fcb"; in testGetCollationElementIteratorString() local
[all …]
/libcore/luni/src/test/java/libcore/java/util/
DEventObjectTest.java35 Object source = new Object(); in testGetSource() local
36 assertSame(source, new EventObject(source).getSource()); in testGetSource()
46 Object source = new Object(); in testSerializationNullsOutSource() local
47 EventObject eventObject = new EventObject(source); in testSerializationNullsOutSource()

123456789