- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 19 for setCopy (0.26 sec)
-
internal/event/targetidset.go
func (set TargetIDSet) IsEmpty() bool { return len(set) != 0 } // Clone - returns copy of this set. func (set TargetIDSet) Clone() TargetIDSet { setCopy := NewTargetIDSet() for k, v := range set { setCopy[k] = v } return setCopy } // add - adds TargetID to the set. func (set TargetIDSet) add(targetID TargetID) { set[targetID] = struct{}{} }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Jan 18 07:03:17 UTC 2024 - 1.9K bytes - Viewed (0) -
internal/config/lambda/event/targetidset.go
func (set TargetIDSet) IsEmpty() bool { return len(set) != 0 } // Clone - returns copy of this set. func (set TargetIDSet) Clone() TargetIDSet { setCopy := NewTargetIDSet() for k, v := range set { setCopy[k] = v } return setCopy } // add - adds TargetID to the set. func (set TargetIDSet) add(targetID TargetID) { set[targetID] = struct{}{} }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Jan 18 07:03:17 UTC 2024 - 1.9K bytes - Viewed (0) -
mockwebserver-deprecated/src/main/kotlin/okhttp3/mockwebserver/MockResponse.kt
apply { headersBuilder.removeAll(name) } fun getBody(): Buffer? = body?.clone() fun setBody(body: Buffer) = apply { setHeader("Content-Length", body.size) this.body = body.clone() // Defensive copy. } fun setBody(body: String): MockResponse = setBody(Buffer().writeUtf8(body)) fun setChunkedBody( body: Buffer, maxChunkSize: Int, ) = apply {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 7.2K bytes - Viewed (0) -
samples/static-server/src/main/java/okhttp3/sample/SampleServer.java
.setStatus("HTTP/1.1 404") .addHeader("content-type: text/plain; charset=utf-8") .setBody("NOT FOUND: " + path); } catch (IOException e) { return new MockResponse() .setStatus("HTTP/1.1 500") .addHeader("content-type: text/plain; charset=utf-8") .setBody("SERVER ERROR: " + e); } } private MockResponse directoryToResponse(String basePath, File directory) {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Wed Jan 02 02:50:44 UTC 2019 - 4.7K bytes - Viewed (0) -
mockwebserver/README.md
// instance for every unit test. MockWebServer server = new MockWebServer(); // Schedule some responses. server.enqueue(new MockResponse().setBody("hello, world!")); server.enqueue(new MockResponse().setBody("sup, bra?")); server.enqueue(new MockResponse().setBody("yo dog")); // Start the server. server.start(); // Ask the server for its URL. You'll need this to make HTTP requests.
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Dec 17 15:34:10 UTC 2023 - 5K bytes - Viewed (0) -
mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/MockWebServerTest.kt
server.enqueue( MockResponse() .setResponseCode(HttpURLConnection.HTTP_MOVED_TEMP) .addHeader("Location: " + server.url("/new-path")) .setBody("This page has moved!"), ) server.enqueue(MockResponse().setBody("This is the new location!")) val connection = server.url("/").toUrl().openConnection() val inputStream = connection.getInputStream()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 21.9K bytes - Viewed (0) -
samples/slack/src/main/java/okhttp3/slack/OAuthSessionFactory.java
return new MockResponse() .setResponseCode(404) .setBody("unexpected request"); } try { OAuthSession session = slackApi.exchangeCode(code, redirectUrl()); listener.sessionGranted(session); } catch (IOException e) { return new MockResponse() .setResponseCode(400) .setBody("code exchange failed: " + e.getMessage()); } synchronized (this) {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Thu Aug 12 07:26:27 UTC 2021 - 3.8K bytes - Viewed (0) -
fess-crawler/src/test/java/org/codelibs/fess/crawler/entity/TestEntity.java
Registered: Sun Nov 10 03:50:12 UTC 2024 - Last Modified: Thu Feb 22 01:36:27 UTC 2024 - 1.2K bytes - Viewed (0) -
guava/src/com/google/common/collect/LinkedListMultimap.java
* to call getCopy and removeAllNodes only with a true K, then we could check containsKey first. * But that check wouldn't eliminate the warnings.) */ @SuppressWarnings({"unchecked", "nullness"}) K castKey = (K) key; List<V> oldValues = getCopy(castKey); removeAllNodes(castKey); return oldValues; } @Override
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 13 14:11:58 UTC 2023 - 27.5K bytes - Viewed (0) -
samples/unixdomainsockets/src/main/java/okhttp3/unixdomainsockets/ClientAndServer.java
server.setServerSocketFactory(new UnixDomainServerSocketFactory(socketFile)); server.setProtocols(Collections.singletonList(Protocol.H2_PRIOR_KNOWLEDGE)); server.enqueue(new MockResponse().setBody("hello")); server.start(); OkHttpClient client = new OkHttpClient.Builder() .socketFactory(new UnixDomainSocketFactory(socketFile)) .protocols(Collections.singletonList(Protocol.H2_PRIOR_KNOWLEDGE))
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Dec 24 03:46:30 UTC 2018 - 2.1K bytes - Viewed (0)