Home
last modified time | relevance | path

Searched refs:opt (Results 1 – 25 of 34) sorted by relevance

12

/libcore/ojluni/src/test/java/util/Optional/
DBasicInt.java95 void checkPresent(OptionalInt opt, int expected) { in checkPresent() argument
96 assertFalse(opt.equals(OptionalInt.empty())); in checkPresent()
97 assertFalse(OptionalInt.empty().equals(opt)); in checkPresent()
98 assertTrue(opt.equals(OptionalInt.of(expected))); in checkPresent()
99 assertTrue(OptionalInt.of(expected).equals(opt)); in checkPresent()
100 assertFalse(opt.equals(OptionalInt.of(UNEXPECTED))); in checkPresent()
101 assertFalse(OptionalInt.of(UNEXPECTED).equals(opt)); in checkPresent()
102 assertFalse(opt.equals("unexpected")); in checkPresent()
104 assertTrue(opt.isPresent()); in checkPresent()
107 assertFalse(OptionalInt_isEmpty(opt)); in checkPresent()
[all …]
DBasicLong.java94 void checkPresent(OptionalLong opt, long expected) { in checkPresent() argument
95 assertFalse(opt.equals(OptionalLong.empty())); in checkPresent()
96 assertFalse(OptionalLong.empty().equals(opt)); in checkPresent()
97 assertTrue(opt.equals(OptionalLong.of(expected))); in checkPresent()
98 assertTrue(OptionalLong.of(expected).equals(opt)); in checkPresent()
99 assertFalse(opt.equals(OptionalLong.of(UNEXPECTED))); in checkPresent()
100 assertFalse(OptionalLong.of(UNEXPECTED).equals(opt)); in checkPresent()
101 assertFalse(opt.equals("unexpected")); in checkPresent()
103 assertTrue(opt.isPresent()); in checkPresent()
106 assertFalse(OptionalLong_isEmpty(opt)); in checkPresent()
[all …]
DBasicDouble.java94 void checkPresent(OptionalDouble opt, double expected) { in checkPresent() argument
95 assertFalse(opt.equals(OptionalDouble.empty())); in checkPresent()
96 assertFalse(OptionalDouble.empty().equals(opt)); in checkPresent()
97 assertTrue(opt.equals(OptionalDouble.of(expected))); in checkPresent()
98 assertTrue(OptionalDouble.of(expected).equals(opt)); in checkPresent()
99 assertFalse(opt.equals(OptionalDouble.of(UNEXPECTED))); in checkPresent()
100 assertFalse(OptionalDouble.of(UNEXPECTED).equals(opt)); in checkPresent()
101 assertFalse(opt.equals("unexpected")); in checkPresent()
103 assertTrue(opt.isPresent()); in checkPresent()
106 assertFalse(OptionalDouble_isEmpty(opt)); in checkPresent()
[all …]
DBasic.java98 void checkPresent(Optional<String> opt, String expected) { in checkPresent() argument
99 assertFalse(opt.equals(Optional.empty())); in checkPresent()
100 assertFalse(Optional.empty().equals(opt)); in checkPresent()
101 assertTrue(opt.equals(Optional.of(expected))); in checkPresent()
102 assertTrue(Optional.of(expected).equals(opt)); in checkPresent()
103 assertFalse(opt.equals(Optional.of("unexpected"))); in checkPresent()
104 assertFalse(Optional.of("unexpected").equals(opt)); in checkPresent()
105 assertFalse(opt.equals("unexpected")); in checkPresent()
107 assertTrue(opt.isPresent()); in checkPresent()
110 assertFalse(Optional_isEmpty(opt)); in checkPresent()
[all …]
/libcore/ojluni/src/main/java/sun/security/x509/
DIssuingDistributionPointExtension.java191 DerValue opt = in.getDerValue(); in IssuingDistributionPointExtension() local
193 if (opt.isContextSpecific(TAG_DISTRIBUTION_POINT) && in IssuingDistributionPointExtension()
194 opt.isConstructed()) { in IssuingDistributionPointExtension()
196 new DistributionPointName(opt.data.getDerValue()); in IssuingDistributionPointExtension()
197 } else if (opt.isContextSpecific(TAG_ONLY_USER_CERTS) && in IssuingDistributionPointExtension()
198 !opt.isConstructed()) { in IssuingDistributionPointExtension()
199 opt.resetTag(DerValue.tag_Boolean); in IssuingDistributionPointExtension()
200 hasOnlyUserCerts = opt.getBoolean(); in IssuingDistributionPointExtension()
201 } else if (opt.isContextSpecific(TAG_ONLY_CA_CERTS) && in IssuingDistributionPointExtension()
202 !opt.isConstructed()) { in IssuingDistributionPointExtension()
[all …]
DEDIPartyName.java91 DerValue opt = seq[i]; in EDIPartyName() local
92 if (opt.isContextSpecific(TAG_ASSIGNER) && in EDIPartyName()
93 !opt.isConstructed()) { in EDIPartyName()
97 opt = opt.data.getDerValue(); in EDIPartyName()
98 assigner = opt.getAsString(); in EDIPartyName()
100 if (opt.isContextSpecific(TAG_PARTYNAME) && in EDIPartyName()
101 !opt.isConstructed()) { in EDIPartyName()
105 opt = opt.data.getDerValue(); in EDIPartyName()
106 party = opt.getAsString(); in EDIPartyName()
DGeneralSubtree.java84 DerValue opt = val.data.getDerValue(); in GeneralSubtree() local
86 if (opt.isContextSpecific(TAG_MIN) && !opt.isConstructed()) { in GeneralSubtree()
87 opt.resetTag(DerValue.tag_Integer); in GeneralSubtree()
88 minimum = opt.getInteger(); in GeneralSubtree()
90 } else if (opt.isContextSpecific(TAG_MAX) && !opt.isConstructed()) { in GeneralSubtree()
91 opt.resetTag(DerValue.tag_Integer); in GeneralSubtree()
92 maximum = opt.getInteger(); in GeneralSubtree()
DAuthorityKeyIdentifierExtension.java162 DerValue opt = val.data.getDerValue(); in AuthorityKeyIdentifierExtension() local
167 if (opt.isContextSpecific(TAG_ID) && !opt.isConstructed()) { in AuthorityKeyIdentifierExtension()
171 opt.resetTag(DerValue.tag_OctetString); in AuthorityKeyIdentifierExtension()
172 id = new KeyIdentifier(opt); in AuthorityKeyIdentifierExtension()
174 } else if (opt.isContextSpecific(TAG_NAMES) && in AuthorityKeyIdentifierExtension()
175 opt.isConstructed()) { in AuthorityKeyIdentifierExtension()
179 opt.resetTag(DerValue.tag_Sequence); in AuthorityKeyIdentifierExtension()
180 names = new GeneralNames(opt); in AuthorityKeyIdentifierExtension()
182 } else if (opt.isContextSpecific(TAG_SERIAL_NUM) && in AuthorityKeyIdentifierExtension()
183 !opt.isConstructed()) { in AuthorityKeyIdentifierExtension()
[all …]
DDistributionPoint.java199 DerValue opt = val.data.getDerValue(); in DistributionPoint() local
201 if (opt.isContextSpecific(TAG_DIST_PT) && opt.isConstructed()) { in DistributionPoint()
206 DerValue distPnt = opt.data.getDerValue(); in DistributionPoint()
219 } else if (opt.isContextSpecific(TAG_REASONS) in DistributionPoint()
220 && !opt.isConstructed()) { in DistributionPoint()
225 opt.resetTag(DerValue.tag_BitString); in DistributionPoint()
226 reasonFlags = (opt.getUnalignedBitString()).toBooleanArray(); in DistributionPoint()
227 } else if (opt.isContextSpecific(TAG_ISSUER) in DistributionPoint()
228 && opt.isConstructed()) { in DistributionPoint()
233 opt.resetTag(DerValue.tag_Sequence); in DistributionPoint()
[all …]
DPrivateKeyUsageExtension.java148 DerValue opt = seq[i]; in PrivateKeyUsageExtension() local
150 if (opt.isContextSpecific(TAG_BEFORE) && in PrivateKeyUsageExtension()
151 !opt.isConstructed()) { in PrivateKeyUsageExtension()
156 opt.resetTag(DerValue.tag_GeneralizedTime); in PrivateKeyUsageExtension()
157 str = new DerInputStream(opt.toByteArray()); in PrivateKeyUsageExtension()
160 } else if (opt.isContextSpecific(TAG_AFTER) && in PrivateKeyUsageExtension()
161 !opt.isConstructed()) { in PrivateKeyUsageExtension()
166 opt.resetTag(DerValue.tag_GeneralizedTime); in PrivateKeyUsageExtension()
167 str = new DerInputStream(opt.toByteArray()); in PrivateKeyUsageExtension()
DBasicConstraintsExtension.java138 DerValue opt = val.data.getDerValue(); in BasicConstraintsExtension() local
139 if (opt.tag != DerValue.tag_Boolean) { in BasicConstraintsExtension()
144 this.ca = opt.getBoolean(); in BasicConstraintsExtension()
153 opt = val.data.getDerValue(); in BasicConstraintsExtension()
154 if (opt.tag != DerValue.tag_Integer) { in BasicConstraintsExtension()
157 this.pathLen = opt.getInteger(); in BasicConstraintsExtension()
DPolicyInformation.java109 DerValue opt = val.data.getDerValue(); in PolicyInformation() local
110 if (opt.tag != DerValue.tag_Sequence) in PolicyInformation()
112 if (opt.data.available() == 0) in PolicyInformation()
114 while (opt.data.available() != 0) in PolicyInformation()
116 (opt.data.getDerValue().toByteArray())); in PolicyInformation()
DNameConstraintsExtension.java188 DerValue opt = val.data.getDerValue(); in NameConstraintsExtension() local
190 if (opt.isContextSpecific(TAG_PERMITTED) && opt.isConstructed()) { in NameConstraintsExtension()
195 opt.resetTag(DerValue.tag_Sequence); in NameConstraintsExtension()
196 permitted = new GeneralSubtrees(opt); in NameConstraintsExtension()
198 } else if (opt.isContextSpecific(TAG_EXCLUDED) && in NameConstraintsExtension()
199 opt.isConstructed()) { in NameConstraintsExtension()
204 opt.resetTag(DerValue.tag_Sequence); in NameConstraintsExtension()
205 excluded = new GeneralSubtrees(opt); in NameConstraintsExtension()
/libcore/ojluni/src/main/java/sun/security/provider/certpath/
DX509CertificatePair.java232 DerValue opt = val.data.getDerValue(); in parse() local
233 short tag = (byte) (opt.tag & 0x01f); in parse()
236 if (opt.isContextSpecific() && opt.isConstructed()) { in parse()
241 opt = opt.data.getDerValue(); in parse()
243 (new X509CertImpl(opt.toByteArray())); in parse()
247 if (opt.isContextSpecific() && opt.isConstructed()) { in parse()
252 opt = opt.data.getDerValue(); in parse()
254 (new X509CertImpl(opt.toByteArray())); in parse()
/libcore/ojluni/src/main/native/
DNet.c444 jboolean mayNeedConversion, jint level, jint opt) in Java_sun_nio_ch_Net_getIntOption0() argument
459 (opt == IP_MULTICAST_TTL || opt == IP_MULTICAST_LOOP)) { in Java_sun_nio_ch_Net_getIntOption0()
464 if (level == SOL_SOCKET && opt == SO_LINGER) { in Java_sun_nio_ch_Net_getIntOption0()
470 n = NET_GetSockOpt(fdval(env, fdo), level, opt, arg, (int*)&arglen); in Java_sun_nio_ch_Net_getIntOption0()
472 n = getsockopt(fdval(env, fdo), level, opt, arg, &arglen); in Java_sun_nio_ch_Net_getIntOption0()
482 (opt == IP_MULTICAST_TTL || opt == IP_MULTICAST_LOOP)) in Java_sun_nio_ch_Net_getIntOption0()
487 if (level == SOL_SOCKET && opt == SO_LINGER) in Java_sun_nio_ch_Net_getIntOption0()
496 jint opt, jint arg, jboolean isIPv6) in Java_sun_nio_ch_Net_setIntOption0() argument
511 (opt == IP_MULTICAST_TTL || opt == IP_MULTICAST_LOOP)) { in Java_sun_nio_ch_Net_setIntOption0()
517 if (level == SOL_SOCKET && opt == SO_LINGER) { in Java_sun_nio_ch_Net_setIntOption0()
[all …]
Dnet_util_md.c186 static int findMaxBuf(int fd, int opt, int sotype) { in findMaxBuf() argument
198 if (setsockopt(fd, SOL_SOCKET, opt, &initial_guess, sizeof(int)) == 0) { in findMaxBuf()
200 if (setsockopt(fd, SOL_SOCKET, opt, &initial_guess,sizeof(int)) < 0) { in findMaxBuf()
211 if (setsockopt(fd, SOL_SOCKET, opt, &mid, sizeof(int)) == 0) { in findMaxBuf()
979 NET_GetSockOpt(int fd, int level, int opt, void *result, in NET_GetSockOpt() argument
985 rv = getsockopt(fd, level, opt, result, len); in NET_GetSockOpt()
989 rv = getsockopt(fd, level, opt, result, &socklen); in NET_GetSockOpt()
1004 if ((level == SOL_SOCKET) && ((opt == SO_SNDBUF) in NET_GetSockOpt()
1005 || (opt == SO_RCVBUF))) { in NET_GetSockOpt()
1016 if (level == SOL_SOCKET && opt == SO_LINGER) { in NET_GetSockOpt()
[all …]
/libcore/json/src/main/java/org/json/
DJSONArray.java276 Object value = opt(index); in isNull()
303 public Object opt(int index) { in opt() method in JSONArray
350 Object object = opt(index); in optBoolean()
384 Object object = opt(index); in optDouble()
418 Object object = opt(index); in optInt()
452 Object object = opt(index); in optLong()
485 Object object = opt(index); in optString()
511 Object object = opt(index); in optJSONArray()
536 Object object = opt(index); in optJSONObject()
554 String name = JSON.toString(names.opt(i)); in toJSONObject()
[all …]
DJSONObject.java196 Object value = copyFrom.opt(name); in JSONObject()
407 @Nullable public Object opt(@Nullable String name) { in opt() method in JSONObject
440 Object object = opt(name); in optBoolean()
474 Object object = opt(name); in optDouble()
508 Object object = opt(name); in optInt()
547 Object object = opt(name); in optLong()
580 Object object = opt(name); in optString()
606 Object object = opt(name); in optJSONArray()
631 Object object = opt(name); in optJSONObject()
650 String name = JSON.toString(names.opt(i)); in toJSONArray()
[all …]
/libcore/ojluni/src/main/java/java/nio/file/spi/
DFileSystemProvider.java377 for (OpenOption opt: options) { in newInputStream()
379 if (opt == StandardOpenOption.APPEND || in newInputStream()
380 opt == StandardOpenOption.WRITE) in newInputStream()
381 throw new UnsupportedOperationException("'" + opt + "' not allowed"); in newInputStream()
427 for (OpenOption opt: options) { in newOutputStream()
428 if (opt == StandardOpenOption.READ) in newOutputStream()
430 opts.add(opt); in newOutputStream()
/libcore/ojluni/src/main/java/java/net/
DPlainDatagramSocketImpl.java90 protected void socketSetOption(int opt, Object val) throws SocketException { in socketSetOption() argument
92 socketSetOption0(opt, val); in socketSetOption()
214 protected void socketSetOption0(int opt, Object val) throws SocketException { in socketSetOption0() argument
219 IoBridge.setSocketOption(fd, opt, val); in socketSetOption0()
222 protected Object socketGetOption(int opt) throws SocketException { in socketGetOption() argument
227 return IoBridge.getSocketOption(fd, opt); in socketGetOption()
DAbstractPlainSocketImpl.java234 public void setOption(int opt, Object val) throws SocketException { in setOption() argument
305 if (opt == SO_TIMEOUT) { in setOption()
308 socketSetOption(opt, val); in setOption()
310 public Object getOption(int opt) throws SocketException { in getOption() argument
314 if (opt == SO_TIMEOUT) { in getOption()
369 return socketGetOption(opt); in getOption()
786 abstract Object socketGetOption(int opt) throws SocketException; in socketGetOption() argument
DPlainSocketImpl.java116 protected void socketSetOption(int opt, Object val) throws SocketException { in socketSetOption() argument
118 socketSetOption0(opt, val); in socketSetOption()
296 Object socketGetOption(int opt) throws SocketException { in socketGetOption() argument
297 return IoBridge.getSocketOption(fd, opt); in socketGetOption()
/libcore/ojluni/src/main/java/sun/nio/fs/
DUnixMountEntry.java69 for (String opt: Util.split(optionsAsString, ',')) { in hasOption()
70 if (opt.equals(requested)) in hasOption()
/libcore/json/src/test/java/libcore/org/json/
DSelfUseTest.java56 @Override public Object opt(String name) {
58 return super.opt(name);
91 @Override public Object opt(int index) {
93 return super.opt(index);
DJSONArrayTest.java55 assertNull(array.opt(0)); in testEmptyArray()
167 assertEquals(JSONObject.NULL, array.opt(0)); in testNulls()
168 assertEquals(null, array.opt(1)); in testNulls()
169 assertEquals(null, array.opt(2)); in testNulls()
170 assertEquals(null, array.opt(3)); in testNulls()
231 assertEquals(Double.MIN_VALUE, array.opt(0)); in testNumbers()
269 assertEquals("true", array.opt(0)); in testStrings()
522 assertEquals(null, array.opt(3)); in testAccessOutOfBounds()
523 assertEquals(null, array.opt(-3)); in testAccessOutOfBounds()

12