signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class XmlNodeHelper { /** * 读取xml文件为dom4j的Docment文档 . * @ param xmlPath 定位xml文件的路径 , 如 : com / blinkfox / test . xml * @ return 返回dom4j文档 */ public static Document getDocument ( String xmlPath ) { } }
try { InputStream is = Thread . currentThread ( ) . getContextClassLoader ( ) . getResourceAsStream ( xmlPath ) ; return new SAXReader ( ) . read ( is ) ; } catch ( Exception e ) { throw new XmlParseException ( "读取或解析xml文件失败,xmlPath是:" + xmlPath , e ) ; }
public class BinderExtension { /** * / * @ Override */ public < S , T > void registerBinding ( ConverterKey < S , T > key , Binding < S , T > converter ) { } }
BINDING . registerBinding ( key , converter ) ;
public class V1InstanceCreator { /** * Create a new project entity with a name , parent project , begin date , and * optional schedule with specified attributes . * @ param name name of project . * @ param parentProject parent project for created project . * @ param beginDate start date of created project . *...
Project project = new Project ( instance ) ; project . setName ( name ) ; project . setParentProject ( parentProject ) ; project . setBeginDate ( beginDate ) ; project . setSchedule ( schedule ) ; addAttributes ( project , attributes ) ; project . save ( ) ; return project ;
public class RTMPConnection { /** * Returns whether or not a given stream id is valid . * @ param streamId * stream id * @ return true if its valid , false if its invalid */ public boolean isValidStreamId ( Number streamId ) { } }
double d = streamId . doubleValue ( ) ; if ( log . isTraceEnabled ( ) ) { log . trace ( "Checking validation for streamId {}; reservedStreams: {}; streams: {}, connection: {}" , new Object [ ] { d , reservedStreams , streams , sessionId } ) ; } if ( d <= 0 || ! reservedStreams . contains ( d ) ) { log . warn ( "Stream ...
public class ClientCacheHelper { /** * Gets the cache configuration from the server . * @ param client the client instance which will send the operation to server * @ param cacheName full cache name with prefixes * @ param simpleCacheName pure cache name without any prefix * @ param < K > type of the key of the...
ClientMessage request = CacheGetConfigCodec . encodeRequest ( cacheName , simpleCacheName ) ; try { int partitionId = client . getClientPartitionService ( ) . getPartitionId ( cacheName ) ; ClientInvocation clientInvocation = new ClientInvocation ( client , request , cacheName , partitionId ) ; Future < ClientMessage >...
public class AddTagsToVaultRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( AddTagsToVaultRequest addTagsToVaultRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( addTagsToVaultRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( addTagsToVaultRequest . getAccountId ( ) , ACCOUNTID_BINDING ) ; protocolMarshaller . marshall ( addTagsToVaultRequest . getVaultName ( ) , VAULTNAME_BINDING ) ; p...
public class CursorUtils { /** * Add each item of this { @ link android . database . Cursor } to the { @ code collection } parameter . * Closes the cursor once completed . * @ return the same collection as the parameter . * @ see # consumeToArrayList ( com . venmo . cursor . IterableCursor ) * @ see # consumeTo...
try { for ( T t : cursor ) { collection . add ( t ) ; } } finally { cursor . close ( ) ; } return collection ;
public class CreateRouteResponseRequest { /** * The route response parameters . * @ param responseParameters * The route response parameters . * @ return Returns a reference to this object so that method calls can be chained together . */ public CreateRouteResponseRequest withResponseParameters ( java . util . Ma...
setResponseParameters ( responseParameters ) ; return this ;
public class AbstractSaga { /** * Requests a timeout event to be sent back to this saga . */ protected TimeoutId requestTimeout ( final long delay , final TimeUnit unit ) { } }
return requestTimeout ( delay , unit , null , null ) ;
public class AccountsInner { /** * Lists the Data Lake Store firewall rules within the specified Data Lake Store account . * @ param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account . * @ param accountName The name of the Data Lake Store account from which to get the ...
return listFirewallRulesSinglePageAsync ( resourceGroupName , accountName ) . concatMap ( new Func1 < ServiceResponse < Page < FirewallRuleInner > > , Observable < ServiceResponse < Page < FirewallRuleInner > > > > ( ) { @ Override public Observable < ServiceResponse < Page < FirewallRuleInner > > > call ( ServiceRespo...
public class CmsPublish { /** * Publishes the given list of resources . < p > * @ param resources list of resources to publish * @ throws CmsException if something goes wrong */ public void publishResources ( List < CmsResource > resources ) throws CmsException { } }
CmsObject cms = m_cms ; I_CmsReport report = new CmsWorkplaceReport ( cms . getRequestContext ( ) . getLocale ( ) , cms . getRequestContext ( ) . getSiteRoot ( ) , null ) ; CmsPublishManager publishManager = OpenCms . getPublishManager ( ) ; CmsPublishList publishList = publishManager . getPublishListAll ( m_cms , reso...
public class Configuration { /** * Get an configuration value as int value * @ param pKey the configuration key * @ return the value set or , if not , the default value */ public int getAsInt ( ConfigKey pKey ) { } }
int ret ; try { ret = Integer . parseInt ( get ( pKey ) ) ; } catch ( NumberFormatException exp ) { ret = Integer . parseInt ( pKey . getDefaultValue ( ) ) ; } return ret ;
public class SchemaStoreItemStream { /** * the message store . We build the index of any currently stored items . */ public void eventRestored ( ) throws SevereMessageStoreException { } }
super . eventRestored ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "eventRestored" ) ; try { NonLockingCursor cursor = newNonLockingItemCursor ( null ) ; AbstractItem item = cursor . next ( ) ; while ( item != null ) { if ( item instanceof SchemaStoreItem ...
public class AbstractMetric { /** * Ranks the set of items by associated score . * @ param userItems map with scores for each item * @ return the ranked list */ protected List < I > rankItems ( final Map < I , Double > userItems ) { } }
List < I > sortedItems = new ArrayList < > ( ) ; if ( userItems == null ) { return sortedItems ; } Map < Double , Set < I > > itemsByRank = new HashMap < > ( ) ; for ( Map . Entry < I , Double > e : userItems . entrySet ( ) ) { I item = e . getKey ( ) ; double pref = e . getValue ( ) ; if ( Double . isNaN ( pref ) ) { ...
public class FileUtil { /** * Check file existence * @ param filePath * @ return * Return < code > true < / code > if the file is exist , otherwise return < code > false < / code > */ public static boolean exist ( String filePath ) { } }
File f = new File ( filePath ) ; if ( ! f . isFile ( ) ) { return false ; } return true ;
public class BasicStreamReader { /** * Method that checks that input following is of form * ' [ S ] * ' = ' [ S ] * ' ( as per XML specs , production # 25 ) . * Will push back non - white space characters as necessary , in * case no equals char is encountered . */ protected final char skipEquals ( String name , S...
char c = getNextInCurrAfterWS ( eofMsg ) ; if ( c != '=' ) { throwUnexpectedChar ( c , " in xml declaration; expected '=' to follow pseudo-attribute '" + name + "'" ) ; } // trailing space ? return getNextInCurrAfterWS ( eofMsg ) ;
public class AVIMConversationEventHandler { /** * 聊天室成员被移出黑名单通知处理函数 * @ param client 聊天客户端 * @ param conversation 对话 * @ param members 成员列表 * @ param operator 操作者 id */ public void onMemberUnblocked ( AVIMClient client , AVIMConversation conversation , List < String > members , String operator ) { } }
LOGGER . d ( "Notification --- " + operator + " unblocked members: " + StringUtil . join ( ", " , members ) ) ;
public class MoleculePropertyCalculator { /** * intern method to calculate the molecular formular for a list of molecules * @ param molecules * @ return * @ throws BuilderMoleculeException * @ throws CTKException * @ throws ChemistryException if the Chemistry Engine can not be initialized */ private static St...
Map < String , Integer > atomNumberMap = new TreeMap < String , Integer > ( ) ; for ( AbstractMolecule molecule : molecules ) { LOG . info ( molecule . getMolecule ( ) . toString ( ) ) ; atomNumberMap = generateAtomNumberMap ( molecule , atomNumberMap ) ; } LOG . info ( "GET map" ) ; StringBuilder sb = new StringBuilde...
public class CareWebShellEx { /** * Registers the plugin with the specified id and path . If a tree path is absent , the plugin is * associated with the tab itself . * @ param path Format is & lt ; tab name & gt ; \ & lt ; tree node path & gt ; * @ param id Unique id of plugin * @ return Container created for t...
return registerFromId ( path , id , null ) ;
public class HttpMessageConvertingResponseWriter { /** * Return the more specific of the acceptable and the producible media types with the q - value of the former . */ protected MediaType getMostSpecificMediaType ( MediaType acceptType , MediaType produceType ) { } }
produceType = produceType . copyQualityValue ( acceptType ) ; return MediaType . SPECIFICITY_COMPARATOR . compare ( acceptType , produceType ) <= 0 ? acceptType : produceType ;
public class DBInstance { /** * Not supported * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setDomainMemberships ( java . util . Collection ) } or { @ link # withDomainMemberships ( java . util . Collection ) } if * you want to override the existing value...
if ( this . domainMemberships == null ) { setDomainMemberships ( new java . util . ArrayList < DomainMembership > ( domainMemberships . length ) ) ; } for ( DomainMembership ele : domainMemberships ) { this . domainMemberships . add ( ele ) ; } return this ;
public class Descriptor { /** * Filename of the form " < ksname > - < cfname > - [ tmp - ] [ < version > - ] < gen > - < component > " * @ param directory The directory of the SSTable files * @ param name The name of the SSTable file * @ return A Descriptor for the SSTable , and the Component remainder . */ publi...
// tokenize the filename StringTokenizer st = new StringTokenizer ( name , String . valueOf ( separator ) ) ; String nexttok ; // all filenames must start with keyspace and column family String ksname = st . nextToken ( ) ; String cfname = st . nextToken ( ) ; // optional temporary marker nexttok = st . nextToken ( ) ;...
public class RegionInstanceGroupManagerClient { /** * Flags the specified instances in the managed instance group to be immediately deleted . The * instances are also removed from any target pools of which they were a member . This method * reduces the targetSize of the managed instance group by the number of insta...
DeleteInstancesRegionInstanceGroupManagerHttpRequest request = DeleteInstancesRegionInstanceGroupManagerHttpRequest . newBuilder ( ) . setInstanceGroupManager ( instanceGroupManager == null ? null : instanceGroupManager . toString ( ) ) . setRegionInstanceGroupManagersDeleteInstancesRequestResource ( regionInstanceGrou...
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } * { @ link CmisExtensionType } { @ code > } */ @ XmlElementDecl ( namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/" , name = "extension" , scope = DeleteObjectResponse . class ) public JAXBElement < CmisExten...
return new JAXBElement < CmisExtensionType > ( _GetPropertiesExtension_QNAME , CmisExtensionType . class , DeleteObjectResponse . class , value ) ;
public class HttpTracingClient { /** * Creates a new tracing { @ link Client } decorator using the specified { @ link Tracing } instance * and remote service name . */ public static Function < Client < HttpRequest , HttpResponse > , HttpTracingClient > newDecorator ( Tracing tracing , @ Nullable String remoteServiceN...
ensureScopeUsesRequestContext ( tracing ) ; return delegate -> new HttpTracingClient ( delegate , tracing , remoteServiceName ) ;
public class TypeValidator { /** * Expect that the first type can be addressed with GETELEM syntax and that the second type is the * right type for an index into the first type . * @ param t The node traversal . * @ param n The GETELEM or COMPUTED _ PROP node to issue warnings on . * @ param objType The type we...
checkState ( n . isGetElem ( ) || n . isComputedProp ( ) , n ) ; Node indexNode = n . isGetElem ( ) ? n . getLastChild ( ) : n . getFirstChild ( ) ; if ( indexType . isSymbolValueType ( ) ) { // For now , allow symbols definitions / access on any type . In the future only allow them // on the subtypes for which they ar...
public class ComapiChatClient { /** * Removes listener for changes in participant list in conversations . * @ param participantsListener Listener for changes in participant list in conversations . */ public void removeListener ( final ParticipantsListener participantsListener ) { } }
MessagingListener messagingListener = participantsListeners . get ( participantsListener ) ; if ( messagingListener != null ) { client . removeListener ( messagingListener ) ; participantsListeners . remove ( participantsListener ) ; }
public class RecordingTransactionBase { /** * Logs GETs for returned Row / Columns . Requests that return no data will not be logged . */ @ Override public Map < Bytes , Map < Column , Bytes > > get ( Collection < Bytes > rows , Set < Column > columns ) { } }
Map < Bytes , Map < Column , Bytes > > rowColVal = txb . get ( rows , columns ) ; for ( Map . Entry < Bytes , Map < Column , Bytes > > rowEntry : rowColVal . entrySet ( ) ) { for ( Map . Entry < Column , Bytes > colEntry : rowEntry . getValue ( ) . entrySet ( ) ) { txLog . filteredAdd ( LogEntry . newGet ( rowEntry . g...
public class AsciiDocExporter { /** * Method that is called to write video . * @ param videoEntry video entry to write */ protected void writeVideo ( VideoEntry videoEntry ) throws IOException { } }
writer . append ( "video::" ) . append ( videoEntry . getLink ( ) ) . append ( "[]" ) . append ( NEW_LINE ) . append ( NEW_LINE ) ;
public class ValidatorUtils { /** * 是否手机号 * @ since 2.0.1 */ public static boolean matchMobile ( String str ) { } }
if ( StringUtils . isEmpty ( str ) ) return false ; return Pattern . matches ( REG_MOBILE , str . trim ( ) ) ;
public class StAXEncoder { /** * Writes an end tag to the output relying on the internal state of the * writer to determine the prefix and local name of the event . * ( non - Javadoc ) * @ see javax . xml . stream . XMLStreamWriter # writeEndElement ( ) */ public void writeEndElement ( ) throws XMLStreamException...
try { this . checkPendingATEvents ( ) ; encoder . encodeEndElement ( ) ; } catch ( Exception e ) { throw new XMLStreamException ( e . getLocalizedMessage ( ) , e ) ; }
public class IntStreamEx { /** * Returns a { @ link String } which is the concatenation of the results of * calling { @ link String # valueOf ( int ) } on each element of this stream , * separated by the specified delimiter , with the specified prefix and * suffix in encounter order . * This is a terminal opera...
return collect ( IntCollector . joining ( delimiter , prefix , suffix ) ) ;
public class SearchParameter { /** * ( non - Javadoc ) * @ see ca . uhn . fhir . rest . param . IParameter # encode ( java . lang . Object ) */ @ Override public List < QualifiedParamList > encode ( FhirContext theContext , Object theObject ) throws InternalErrorException { } }
ArrayList < QualifiedParamList > retVal = new ArrayList < QualifiedParamList > ( ) ; // TODO : declaring method should probably have a generic type . . @ SuppressWarnings ( "rawtypes" ) IParamBinder paramBinder = myParamBinder ; @ SuppressWarnings ( "unchecked" ) List < IQueryParameterOr < ? > > val = paramBinder . enc...
public class AResource { /** * Returns a stream output , depending on the query parameters . * @ param impl * implementation * @ param path * path info * @ return parameter map */ private StreamingOutput createOutput ( final JaxRx impl , final ResourcePath path ) { } }
// check for command parameter String qu = path . getValue ( QueryParameter . COMMAND ) ; if ( qu != null ) { return impl . command ( qu , path ) ; } // check for run parameter qu = path . getValue ( QueryParameter . RUN ) ; if ( qu != null ) { return impl . run ( qu , path ) ; } // check for query parameter qu = path ...
public class ScalarOperation { /** * Builds the scaling operation for Doubles , that is the multiplying * operation for the factor . * @ return { @ link ScalarOperation } for Double */ public static ScalarOperation < Double > doubleMultiplicationOp ( ) { } }
return new ScalarOperation < Double > ( new ScalarFunction < Double > ( ) { @ Override public Double scale ( Double a , double b ) { return a * b ; } } , 1d ) ;
public class MapPoint { /** * Compute the bounds of this element . * This function does not update the internal * attribute replied by { @ link # getBoundingBox ( ) } */ @ Override @ Pure protected Rectangle2d calcBounds ( ) { } }
double x = this . getX ( ) ; double y = this . getY ( ) ; final double w = this . doubleFramed ? this . pointSize * 2 : this . pointSize ; final double h = w ; x -= w / 2. ; y -= h / 2. ; return new Rectangle2d ( x , y , w , h ) ;
public class Es6TemplateLiterals { /** * Converts tag ` a \ tb $ { bar } ` to : * / / A global ( module ) scoped variable * var $ jscomp $ templatelit $ 0 = [ " a \ tb " ] ; / / cooked string array * $ jscomp $ templatelit $ 0 . raw = [ " a \ \ tb " ] ; / / raw string array * / / A call to the tagging function ...
AstFactory astFactory = t . getCompiler ( ) . createAstFactory ( ) ; JSTypeRegistry registry = t . getCompiler ( ) . getTypeRegistry ( ) ; JSType stringType = createType ( addTypes , registry , JSTypeNative . STRING_TYPE ) ; JSType arrayType = createGenericType ( addTypes , registry , JSTypeNative . ARRAY_TYPE , string...
public class DescribeAvailabilityZonesRequest { /** * The names of the Availability Zones . * @ param zoneNames * The names of the Availability Zones . */ public void setZoneNames ( java . util . Collection < String > zoneNames ) { } }
if ( zoneNames == null ) { this . zoneNames = null ; return ; } this . zoneNames = new com . amazonaws . internal . SdkInternalList < String > ( zoneNames ) ;
public class BoxEntity { /** * Gets the id . * @ return the id of the entity . */ public String getId ( ) { } }
String id = getPropertyAsString ( FIELD_ID ) ; if ( id == null ) { return getPropertyAsString ( FIELD_ITEM_ID ) ; } return id ;
public class OrdersInner { /** * Creates or updates an order . * @ param deviceName The device name . * @ param resourceGroupName The resource group name . * @ param order The order to be created or updated . * @ param serviceCallback the async ServiceCallback to handle successful and failed responses . * @ t...
return ServiceFuture . fromResponse ( beginCreateOrUpdateWithServiceResponseAsync ( deviceName , resourceGroupName , order ) , serviceCallback ) ;
public class JvmTypesBuilder { /** * / * @ Nullable */ public JvmField toField ( /* @ Nullable */ EObject sourceElement , /* @ Nullable */ String name , /* @ Nullable */ JvmTypeReference typeRef , /* @ Nullable */ Procedure1 < ? super JvmField > initializer ) { } }
if ( sourceElement == null || name == null ) return null ; JvmField result = typesFactory . createJvmField ( ) ; result . setSimpleName ( name ) ; result . setVisibility ( JvmVisibility . PRIVATE ) ; result . setType ( cloneWithProxies ( typeRef ) ) ; associate ( sourceElement , result ) ; return initializeSafely ( res...
public class CasConfigurationJasyptCipherExecutor { /** * Sets provider name . * @ param pName the p name */ public void setProviderName ( final String pName ) { } }
if ( StringUtils . isNotBlank ( pName ) ) { LOGGER . debug ( "Configured Jasypt provider" ) ; this . jasyptInstance . setProviderName ( pName ) ; }
public class CmsJobEditView { /** * Try to save the form values to the edited bean . < p > * @ return true if setting the information was successful */ public boolean trySaveToBean ( ) { } }
try { m_group . commit ( ) ; } catch ( Exception e ) { LOG . info ( e . getLocalizedMessage ( ) , e ) ; return false ; } m_job . setParameters ( readParams ( ) ) ; return true ;
public class SourceStreamManager { /** * Add a message in to the appropriate source stream . This will create a stream * if one does not exist and set any appropriate fields in the message * @ param msgItem The message to add * @ return Whether the message was added to a real stream or not */ public boolean addMe...
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "addMessage" , new Object [ ] { msgItem } ) ; // Get the JsMessage as we need to update the Guaranteed fields JsMessage jsMsg = msgItem . getMessage ( ) ; StreamSet streamSet = getStreamSet ( ) ; // Stamp the message with th...
public class Gram { /** * Frames and wraps a token according to the GRAM " renew " protocol * for use in a GSI delegation handshake . The input token is framed with * a 4 byte big - endian token length header , and the resulting framed token * wrapped in SSL mode ( GSSContext ' s GSS _ MODE option set to MODE _ S...
if ( ! GSIConstants . MODE_SSL . equals ( c . getOption ( GSSConstants . GSS_MODE ) ) ) { throw new GSSException ( GSSException . NO_CONTEXT ) ; } byte [ ] framedToken = new byte [ token . length + 4 ] ; SSLUtil . writeInt ( token . length , framedToken , 0 ) ; System . arraycopy ( token , 0 , framedToken , 4 , token ....
public class BaseMessage { /** * Set the message data as a XML String . * @ return */ public boolean setXML ( String strXML ) { } }
Document doc = Util . convertXMLToDOM ( strXML ) ; return this . setDOM ( doc ) ;
public class AbstractEpollStreamChannel { /** * Splice from this { @ link AbstractEpollStreamChannel } to another { @ link FileDescriptor } . * The { @ code offset } is the offset for the { @ link FileDescriptor } and { @ code len } is the * number of bytes to splice . If using { @ link Integer # MAX _ VALUE } it w...
return spliceTo ( ch , offset , len , newPromise ( ) ) ;
public class RotationAxisAligner { /** * Returns a reference vector for the alignment of Cn structures . * @ return reference vector */ private Vector3d getReferenceAxisCylicWithSubunitAlignment ( ) { } }
if ( rotationGroup . getPointGroup ( ) . equals ( "C2" ) ) { return referenceVector ; } // find subunit that extends the most in the xy - plane List < List < Integer > > orbits = getOrbitsByXYWidth ( ) ; // get the last orbit which is the widest List < Integer > widestOrbit = orbits . get ( orbits . size ( ) - 1 ) ; Li...
public class CountryReader { /** * Add the requested query string arguments to the Request . * @ param request Request to add query string arguments to */ private void addQueryParams ( final Request request ) { } }
if ( isoCode != null ) { request . addQueryParam ( "IsoCode" , isoCode ) ; } if ( continent != null ) { request . addQueryParam ( "Continent" , continent ) ; } if ( countryCode != null ) { request . addQueryParam ( "CountryCode" , countryCode ) ; } if ( lowRiskNumbersEnabled != null ) { request . addQueryParam ( "LowRi...
public class ResultIterator { /** * Id value in byte arr . * @ return the byte [ ] */ private byte [ ] idValueInByteArr ( ) { } }
Object entity = results . get ( results . size ( ) - 1 ) ; Object id = PropertyAccessorHelper . getId ( entity , entityMetadata ) ; String idName = ( ( AbstractAttribute ) entityMetadata . getIdAttribute ( ) ) . getJPAColumnName ( ) ; Class idClazz = ( ( AbstractAttribute ) entityMetadata . getIdAttribute ( ) ) . getBi...
public class DockerRuleBuilder { /** * Keep stopped container after test . * @ deprecated Use { @ link # stopOptions ( StopOption . . . ) } instead . */ public DockerRuleBuilder keepContainer ( boolean keepContainer ) { } }
if ( keepContainer ) { this . stopOptions . setOptions ( StopOption . KEEP ) ; } else { this . stopOptions . setOptions ( StopOption . REMOVE ) ; } return this ;
public class CmsFileUtil { /** * Reads all bytes from the given input stream , conditionally closes the given input stream * and returns the result in an array . < p > * @ param in the input stream to read the bytes from * @ return the byte content of the input stream * @ param closeInputStream if true the give...
if ( in instanceof ByteArrayInputStream ) { // content can be read in one pass return readFully ( in , in . available ( ) , closeInputStream ) ; } // copy buffer byte [ ] xfer = new byte [ 2048 ] ; // output buffer ByteArrayOutputStream out = new ByteArrayOutputStream ( xfer . length ) ; // transfer data from input to ...
public class CopycatServer { /** * Starts listening the server . */ private CompletableFuture < Void > listen ( ) { } }
CompletableFuture < Void > future = new CompletableFuture < > ( ) ; context . getThreadContext ( ) . executor ( ) . execute ( ( ) -> { internalServer . listen ( cluster ( ) . member ( ) . serverAddress ( ) , context :: connectServer ) . whenComplete ( ( internalResult , internalError ) -> { if ( internalError == null )...
public class SessionEventHandler { /** * @ see com . ibm . websphere . eventengine . EventHandler # handleEvent ( com . ibm . websphere . eventengine . Event ) */ @ Override public void handleEvent ( Event event ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( this , tc , "Received event: " + event . getTopic ( ) ) ; } // if ( event . getTopic ( ) . equals ( PURGE _ EVENT ) ) { this . sessionMgr . startPurge ( ) ;
public class SpaceResource { /** * Adds a space . * @ param spaceID * @ param storeID */ public void addSpace ( String spaceID , Map < String , AclType > userACLs , String storeID ) throws ResourceException , InvalidIdException { } }
IdUtil . validateSpaceId ( spaceID ) ; try { StorageProvider storage = storageProviderFactory . getStorageProvider ( storeID ) ; storage . createSpace ( spaceID ) ; waitForSpaceCreation ( storage , spaceID ) ; updateSpaceACLs ( spaceID , userACLs , storeID ) ; } catch ( NotFoundException e ) { throw new InvalidIdExcept...
public class Util { /** * Compares two comparable objects where either may be null . Null is regarded as the smallest value , and 2 nulls are * considered equal . * @ param c1 the first comparable * @ param c2 the second comparable * @ return a negative integer , zero , or a positive integer if c1 is less than ...
if ( c1 == null && c2 == null ) { return 0 ; } else if ( c1 == null ) { return - 1 ; } else if ( c2 == null ) { return 1 ; } else { return c1 . compareTo ( c2 ) ; }
public class JCudaDriver { /** * Returns a function handle . * < pre > * CUresult cuModuleGetFunction ( * CUfunction * hfunc , * CUmodule hmod , * const char * name ) * < / pre > * < div > * < p > Returns a function handle . Returns in * < tt > * hfunc < / tt > the handle of the function of name < tt ...
return checkResult ( cuModuleGetFunctionNative ( hfunc , hmod , name ) ) ;
public class GuiMapReaderFactory { /** * Method to get the complete file path . * @ param file * @ return String file path */ private static String getFilePath ( String file ) { } }
logger . entering ( file ) ; String filePath = null ; URL fileURL = GuiMapReaderFactory . class . getClassLoader ( ) . getResource ( file ) ; if ( fileURL != null ) { filePath = fileURL . getPath ( ) ; } logger . exiting ( filePath ) ; return filePath ;
public class ChartComputator { /** * Checks if new viewport doesn ' t exceed max available viewport . */ public void constrainViewport ( float left , float top , float right , float bottom ) { } }
if ( right - left < minViewportWidth ) { // Minimum width - constrain horizontal zoom ! right = left + minViewportWidth ; if ( left < maxViewport . left ) { left = maxViewport . left ; right = left + minViewportWidth ; } else if ( right > maxViewport . right ) { right = maxViewport . right ; left = right - minViewportW...
public class ThreadPoolController { /** * Detect and handle aberrant data points by resetting the statistics * in the throughput distribution . * @ param distribution the throughput distribution associated with throughput * @ param throughput the observed throughput * @ return true if the thread pool has been r...
if ( throughput < 0.0 ) { resetStatistics ( false ) ; return true ; } else if ( throughput == 0.0 ) { return false ; } double zScore = distribution . getZScore ( throughput ) ; boolean currentIsOutlier = zScore <= - 3.0 || zScore >= 3.0 ; // 8/10/2012 : Reset the data for this thread count when we hit an outlier // 1/2...
public class ManagedObject { /** * Convert serialized bytes back into a managed object . * @ param byteArrayInputStream from which the serializable ManagedObject * is to be read . * @ param objectManagerState of the objectManager reconstructing the ManagedObject . * @ return ManagedObject that is deserialized ....
final String methodName = "restoreSerializedDefault" ; if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( cclass , methodName , new Object [ ] { byteArrayInputStream , objectManagerState } ) ; ManagedObject managedObjectToReturn = null ; try { // This type of ObjectInputStream ensure...
public class NonVoltDBBackend { /** * Modifies a < i > query < / i > containing the specified < i > queryPattern < / i > , in * such a way that the backend database ( e . g . PostgreSQL ) results will match * VoltDB results , typically by adding a < i > prefix < / i > and / or < i > suffix < / i > , * either to i...
StringBuffer modified_query = new StringBuffer ( ) ; Matcher matcher = qt . m_queryPattern . matcher ( query ) ; int count = 0 ; while ( matcher . find ( ) ) { StringBuffer replaceText = new StringBuffer ( qt . m_initialText ) ; String wholeMatch = matcher . group ( ) ; String lastGroup = wholeMatch ; List < String > g...
public class URIParsedResult { /** * Transforms a string that represents a URI into something more proper , by adding or canonicalizing * the protocol . */ private static String massageURI ( String uri ) { } }
uri = uri . trim ( ) ; int protocolEnd = uri . indexOf ( ':' ) ; if ( protocolEnd < 0 || isColonFollowedByPortNumber ( uri , protocolEnd ) ) { // No protocol , or found a colon , but it looks like it is after the host , so the protocol is still missing , // so assume http uri = "http://" + uri ; } return uri ;
public class HttpChannelConfig { /** * Check the configuration map for if we should skip adding the quote * to the cookie path attribute * @ param props */ private void parseSkipCookiePathQuotes ( Map < ? , ? > props ) { } }
// 738893 - Skip adding the quotes to the cookie path attribute String value = ( String ) props . get ( HttpConfigConstants . PROPNAME_SKIP_PATH_QUOTE ) ; if ( null != value ) { this . skipCookiePathQuotes = convertBoolean ( value ) ; if ( ( TraceComponent . isAnyTracingEnabled ( ) ) && ( tc . isEventEnabled ( ) ) ) { ...
public class StoppableThreadCache { /** * Registers a new thread for stopping */ public void registerThread ( StoppableThread thread ) { } }
if ( tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "registerThread" , thread ) ; synchronized ( this ) { _threadCache . add ( thread ) ; } if ( tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "registerThread" ) ;
public class MethodGenFactory { /** * ( non - Javadoc ) * @ see * edu . umd . cs . findbugs . classfile . IAnalysisEngine # analyze ( edu . umd . cs . findbugs * . classfile . IAnalysisCache , java . lang . Object ) */ @ Override public MethodGen analyze ( IAnalysisCache analysisCache , MethodDescriptor descripto...
Method method = getMethod ( analysisCache , descriptor ) ; if ( method . getCode ( ) == null ) { return null ; } XMethod xmethod = XFactory . createXMethod ( descriptor ) ; if ( xmethod . usesInvokeDynamic ( ) && false ) { AnalysisContext . currentAnalysisContext ( ) . analysisSkippedDueToInvokeDynamic ( xmethod ) ; re...
public class ReflectionUtils { /** * Returns the setter method associated with the object ' s field . * This method handles any autoboxing / unboxing of the argument passed to the setter ( e . g . if the setter type is a * primitive { @ code int } but the argument passed to the setter is an { @ code Integer } ) by ...
if ( object == null ) { throw new NullPointerException ( "object should not be null" ) ; } else if ( fieldName == null ) { throw new NullPointerException ( "fieldName should not be null" ) ; } else if ( argumentType == null ) { throw new NullPointerException ( "argumentType should not be null" ) ; } final String setter...
public class ClassPathUtils { /** * Return the classes from the given package and subpackages using the supplied classloader * @ param classLoader classloader to be used * @ param pkg package to scan * @ return set of found classes * @ throws IOException */ public static Set < Class < ? > > scanPackage ( ClassL...
Reflections reflections = new Reflections ( new ConfigurationBuilder ( ) . addUrls ( ClasspathHelper . forPackage ( pkg , classLoader ) ) . addClassLoader ( classLoader ) . setScanners ( new SubTypesScanner ( false ) ) ) ; Set < Class < ? > > classes = new HashSet < Class < ? > > ( ) ; for ( String typeNames : reflecti...
public class BoxApiFile { /** * Gets a request that downloads a thumbnail to a target file * @ param target target file to download to , target can only be a file * @ param fileId id of file to download the thumbnail of * @ return request to download a thumbnail to a target file * @ throws IOException throws Fi...
if ( ! target . exists ( ) ) { throw new FileNotFoundException ( ) ; } if ( target . isDirectory ( ) ) { throw new RuntimeException ( "This endpoint only supports files and does not support directories" ) ; } BoxRequestsFile . DownloadThumbnail request = new BoxRequestsFile . DownloadThumbnail ( fileId , target , getTh...
public class HandleHelper { /** * 处理单条数据 * @ param rs 数据集 * @ return 每一行的Entity * @ throws SQLException SQL执行异常 */ public static Entity handleRow ( ResultSet rs ) throws SQLException { } }
final ResultSetMetaData meta = rs . getMetaData ( ) ; final int columnCount = meta . getColumnCount ( ) ; return handleRow ( columnCount , meta , rs ) ;
public class Element { /** * ( non - Javadoc ) * @ see qc . automation . framework . widget . IElement # getText ( ) */ @ Override public String getText ( ) throws WidgetException { } }
try { WebElement webElement = findElement ( ) ; highlight ( HIGHLIGHT_MODES . GET ) ; return webElement . getText ( ) ; } catch ( Exception e ) { throw new WidgetException ( "Error while fetching text" , locator , e ) ; }
public class MultiChoiceListPreference { /** * Return the indices of the entries , which correspond to specific values . * @ param values * A set , which contains the values of the entries , whose indices should be returned , as * an instance of the type { @ link Set } * @ return A list , which contains the ind...
List < Integer > indices = new ArrayList < > ( ) ; if ( values != null && getEntryValues ( ) != null ) { for ( String value : values ) { int index = indexOf ( value ) ; if ( index >= 0 ) { indices . add ( index ) ; } } } return indices ;
public class PDFPageHelper { /** * Creates a String ( eg . < b > 3-9 < / b > or < b > 3 < / b > ) , based on the most left and * most right page annotation . * < p > The page annotation is detected with * { @ link # getPageFromAnnotation ( de . hu _ berlin . german . korpling . saltnpepper . salt . saltCommon . s...
if ( sspans == null || sspans . isEmpty ( ) ) { return null ; } TreeMap < Integer , SSpan > rightTokIdxToSSpan = sspans . get ( sspans . firstKey ( ) ) ; SSpan leftSpan = rightTokIdxToSSpan . get ( rightTokIdxToSSpan . firstKey ( ) ) ; SSpan rightSpan = null ; Integer rightIdx = null ; for ( TreeMap < Integer , SSpan >...
public class CourierTemplateSpecGenerator { /** * Generate { @ link com . linkedin . pegasus . generator . spec . ClassTemplateSpec } from the specified { @ link com . linkedin . data . schema . DataSchema } and its location . */ public ClassTemplateSpec generate ( DataSchema schema , DataSchemaLocation location ) { } ...
pushCurrentLocation ( location ) ; final ClassTemplateSpec result = generate ( schema ) ; popCurrentLocation ( ) ; return result ;
public class Configuration { /** * Loads configuration from | file | . * @ param config Configuration container * @ param f File to be loaded */ protected static void loadConfig ( final Properties config , final File f ) { } }
InputStreamReader r = null ; try { final FileInputStream in = new FileInputStream ( f ) ; r = new InputStreamReader ( in , "UTF-8" ) ; config . load ( r ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } finally { if ( r != null ) { try { r . close ( ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } // e...
public class CollectUtils { /** * newLinkedHashMap . * @ param m a { @ link java . util . Map } object . * @ param < K > a K object . * @ param < V > a V object . * @ return a { @ link java . util . Map } object . */ public static < K , V > Map < K , V > newLinkedHashMap ( Map < ? extends K , ? extends V > m ) ...
return new LinkedHashMap < K , V > ( m ) ;
public class WebSocketContext { /** * Send message to all connections labeled with tag specified . * @ param message the message to be sent * @ param tag the string that tag the connections to be sent * @ param excludeSelf specify whether the connection of this context should be send * @ return this context */ ...
return sendToConnections ( message , tag , manager . tagRegistry ( ) , excludeSelf ) ;
public class CPDefinitionSpecificationOptionValuePersistenceImpl { /** * Removes the cp definition specification option value where CPDefinitionId = & # 63 ; and CPDefinitionSpecificationOptionValueId = & # 63 ; from the database . * @ param CPDefinitionId the cp definition ID * @ param CPDefinitionSpecificationOpt...
CPDefinitionSpecificationOptionValue cpDefinitionSpecificationOptionValue = findByC_CSOVI ( CPDefinitionId , CPDefinitionSpecificationOptionValueId ) ; return remove ( cpDefinitionSpecificationOptionValue ) ;
public class TieredBlockStore { /** * Checks if a block id is available for a new temp block . This method must be enclosed by * { @ link # mMetadataLock } . * @ param blockId the id of block * @ throws BlockAlreadyExistsException if block id already exists */ private void checkTempBlockIdAvailable ( long blockId...
if ( mMetaManager . hasTempBlockMeta ( blockId ) ) { throw new BlockAlreadyExistsException ( ExceptionMessage . TEMP_BLOCK_ID_EXISTS , blockId ) ; } if ( mMetaManager . hasBlockMeta ( blockId ) ) { throw new BlockAlreadyExistsException ( ExceptionMessage . TEMP_BLOCK_ID_COMMITTED , blockId ) ; }
public class InternalArrayIterate { /** * Implemented to avoid megamorphic call on castProcedure . */ private static < T > void batchFastListCollectIf ( T [ ] array , int start , int end , FastListCollectIfProcedure < T , ? > castProcedure ) { } }
for ( int i = start ; i < end ; i ++ ) { castProcedure . value ( array [ i ] ) ; }
public class Matrix4d { /** * Set < code > this < / code > matrix to < code > T * R < / code > , where < code > T < / code > is a translation by the given < code > ( tx , ty , tz ) < / code > and * < code > R < / code > is a rotation - and possibly scaling - transformation specified by the quaternion < code > ( qx , ...
double w2 = qw * qw ; double x2 = qx * qx ; double y2 = qy * qy ; double z2 = qz * qz ; double zw = qz * qw ; double xy = qx * qy ; double xz = qx * qz ; double yw = qy * qw ; double yz = qy * qz ; double xw = qx * qw ; this . m00 = w2 + x2 - z2 - y2 ; this . m01 = xy + zw + zw + xy ; this . m02 = xz - yw + xz - yw ; t...
public class RuntimeExceptionsFactory { /** * Constructs and initializes a new { @ link NullPointerException } with the given { @ link String message } * formatted with the given { @ link Object [ ] arguments } . * @ param message { @ link String } describing the { @ link NullPointerException exception } . * @ pa...
return newNullPointerException ( null , message , args ) ;
public class TextBox { /** * Sets the current text mask , meaning the substitute to draw instead of the text inside the { @ code TextBox } . * This is normally used for password input fields so the password isn ' t shown * @ param mask New text mask or { @ code null } if there is no mask * @ return Itself */ publ...
if ( mask != null && TerminalTextUtils . isCharCJK ( mask ) ) { throw new IllegalArgumentException ( "Cannot use a CJK character as a mask" ) ; } this . mask = mask ; invalidate ( ) ; return this ;
public class ConnectionPoolManagerImpl { /** * Closes all connection pools . This method overrides * < code > shutdownModule ( ) < / code > . * @ throws ModuleShutdownException * If the close operation for the connection pool ( s ) fails . */ @ Override public void shutdownModule ( ) throws ModuleShutdownExceptio...
super . shutdownModule ( ) ; for ( Map . Entry < String , ConnectionPool > e : h_ConnectionPools . entrySet ( ) ) { e . getValue ( ) . close ( ) ; }
public class PathManagerService { /** * Install an { @ code Service < String > } for the given path . * @ param serviceTarget the service target associated with the management operation making this request . Cannot be { @ code null } * @ param pathName the name of the relevant path . Cannot be { @ code null } * @...
if ( possiblyAbsolute && AbstractPathService . isAbsoluteUnixOrWindowsPath ( path ) ) { return addAbsolutePathService ( serviceTarget , pathName , path ) ; } else { return RelativePathService . addService ( AbstractPathService . pathNameOf ( pathName ) , path , possiblyAbsolute , relativeTo , serviceTarget ) ; }
public class SVNCommands { /** * Performs a SVN Checkout of the given URL to the given directory * @ param url The SVN URL that should be checked out * @ param directory The location where the working copy is created . * @ param user The SVN user or null if the default user from the machine should be used * @ p...
if ( ! directory . exists ( ) && ! directory . mkdirs ( ) ) { throw new IOException ( "Could not create new working copy directory at " + directory ) ; } CommandLine cmdLine = new CommandLine ( SVN_CMD ) ; cmdLine . addArgument ( "co" ) ; addDefaultArguments ( cmdLine , user , pwd ) ; cmdLine . addArgument ( url ) ; cm...
public class SizeLimitableBlockingQueue { /** * / * ( non - Javadoc ) * @ see java . util . concurrent . BlockingQueue # offer ( java . lang . Object , long , java . util . concurrent . TimeUnit ) */ @ Override public boolean offer ( E e , long timeout , TimeUnit unit ) throws InterruptedException { } }
if ( sizeLimit > 0 ) { long nanos = unit . toNanos ( timeout ) ; final ReentrantLock lock = this . sizeLimitLock ; lock . lockInterruptibly ( ) ; try { for ( ; ; ) { if ( size ( ) < sizeLimit ) { return queue . offer ( e , timeout , unit ) ; } if ( nanos <= 0 ) return false ; try { nanos = withinSizeLimit . awaitNanos ...
public class PostgreSCSConnectionFactory { /** * { @ inheritDoc } */ public WorkspaceStorageConnection openConnection ( boolean readOnly ) throws RepositoryException { } }
try { if ( this . containerConfig . dbStructureType . isMultiDatabase ( ) ) { return new PostgreSCSMultiDbJDBCConnection ( getJdbcConnection ( readOnly ) , readOnly , containerConfig ) ; } return new PostgreSCSSingleDbJDBCConnection ( getJdbcConnection ( readOnly ) , readOnly , containerConfig ) ; } catch ( SQLExceptio...
public class WInternalLinkRenderer { /** * Paints the given { @ link WInternalLink } . * @ param component the WInternalLink to paint . * @ param renderContext the RenderContext to paint to . */ @ Override public void doRender ( final WComponent component , final WebXmlRenderContext renderContext ) { } }
WInternalLink link = ( WInternalLink ) component ; XmlStringBuilder xml = renderContext . getWriter ( ) ; if ( Util . empty ( link . getText ( ) ) ) { return ; } xml . appendTagOpen ( "ui:link" ) ; xml . appendAttribute ( "id" , component . getId ( ) ) ; xml . appendOptionalAttribute ( "class" , component . getHtmlClas...
public class DKV { /** * Used to order successive writes . */ static public void write_barrier ( ) { } }
for ( H2ONode h2o : H2O . CLOUD . _memary ) for ( RPC rpc : h2o . tasks ( ) ) if ( rpc . _dt instanceof TaskPutKey || rpc . _dt instanceof Atomic ) rpc . get ( ) ;
public class ResourceUtils { /** * 如果替换包含占位符则替换占位符 * @ param key * @ return */ private static String addToProperties ( String key , String value ) { } }
if ( ! value . contains ( PLACEHOLDER_PREFIX ) ) { allProperties . put ( key , value ) ; return value ; } String [ ] segments = value . split ( "\\$\\{" ) ; String seg ; StringBuilder finalValue = new StringBuilder ( ) ; for ( int i = 0 ; i < segments . length ; i ++ ) { seg = StringUtils . trimToNull ( segments [ i ] ...
public class LogRepositoryConfiguration { /** * Modify the trace to use a memory buffer * @ param dataDirectory directory where buffer will be dumped if requested * @ param memoryBufferSize amount of memory ( in Mb ) to be used for this circular buffer */ public void setTraceMemory ( String dataDirectory , long mem...
TraceState state = ( TraceState ) ivTrace . clone ( ) ; state . ivStorageType = MEMORYBUFFER_TYPE ; state . ivDataDirectory = dataDirectory ; state . ivMemoryBufferSize = memoryBufferSize ; updateTraceConfiguration ( state ) ; state . copyTo ( ivTrace ) ;
public class FifoTaskExecutor { /** * Executes the submitted task . If the maximum number of pooled threads is * in use , this method blocks until one of a them is available . * @ param task * @ throws InterruptedException */ public void execute ( final FifoTask < E > task ) throws InterruptedException { } }
final int id ; synchronized ( this ) { id = idCounter ++ ; taskMap . put ( id , task ) ; while ( activeCounter >= maxThreads ) { wait ( ) ; } activeCounter ++ ; } this . threadPoolExecutor . execute ( new Runnable ( ) { public void run ( ) { try { try { final E outcome = task . runParallel ( ) ; synchronized ( resultMa...
public class ResourceBundleMessageSource { /** * Resolves the given message code as key in the registered resource bundles , * returning the value found in the bundle as - is ( without MessageFormat parsing ) . */ @ Override protected String resolveCodeWithoutArguments ( String code , Locale locale ) { } }
String result = null ; for ( int i = 0 ; result == null && i < this . basenames . length ; i ++ ) { ResourceBundle bundle = getResourceBundle ( this . basenames [ i ] , locale ) ; if ( bundle != null ) { result = getStringOrNull ( bundle , code ) ; } } return result ;
public class InfinitePagerAdapter { /** * fills the page on index { @ code position } . * @ param position the page index to fill the page . */ void fillPage ( final int position ) { } }
if ( Constants . DEBUG ) { Log . d ( "InfiniteViewPager" , "setup Page " + position ) ; printPageModels ( "before newPage" ) ; } final PageModel < T > oldModel = mPageModels [ position ] ; final PageModel < T > newModel = createPageModel ( position ) ; if ( oldModel == null || newModel == null ) { Log . w ( Constants ....
public class CmdArgs { /** * Returns usage string . * @ return */ public String getUsage ( ) { } }
Set < Option > set = new HashSet < > ( ) ; StringBuilder sb = new StringBuilder ( ) ; sb . append ( "usage: " ) ; boolean n1 = false ; for ( Entry < String , List < Option > > e : groups . entrySet ( ) ) { if ( n1 ) { sb . append ( "|" ) ; } n1 = true ; sb . append ( "[" ) ; boolean n2 = false ; for ( Option opt : e . ...
public class WorkbookReader { /** * Converts the spreadsheet to String Lists by a List Iterable . * @ return List of String Iterable */ public Iterable < List < String > > toLists ( ) { } }
checkState ( ! isClosed , WORKBOOK_CLOSED ) ; Iterable < List < String > > listsIterable = Iterables . transform ( sheet , item -> { return rowToList ( item ) ; } ) ; return hasHeader ? Iterables . skip ( listsIterable , 1 ) : listsIterable ;
public class RouteProcessorThreadListener { /** * RouteListener from the { @ link RouteProcessorBackgroundThread } - if fired with checkFasterRoute set * to true , a new { @ link DirectionsRoute } should be fetched with { @ link RouteFetcher } . * @ param location to create a new origin * @ param routeProgress fo...
if ( checkFasterRoute ) { routeFetcher . findRouteFromRouteProgress ( location , routeProgress ) ; }
public class BinaryReader { /** * Read an int from the input stream . * @ return The number read . * @ throws IOException if unable to read from stream . */ public int expectInt ( ) throws IOException { } }
int b1 = in . read ( ) ; if ( b1 < 0 ) { throw new IOException ( "Missing byte 1 to expected int" ) ; } int b2 = in . read ( ) ; if ( b2 < 0 ) { throw new IOException ( "Missing byte 2 to expected int" ) ; } int b3 = in . read ( ) ; if ( b3 < 0 ) { throw new IOException ( "Missing byte 3 to expected int" ) ; } int b4 =...
public class BinaryJedis { /** * Increment the number stored at field in the hash at key by a double precision floating point * value . If key does not exist , a new key holding a hash is created . If field does not exist or * holds a string , the value is set to 0 before applying the operation . Since the value ar...
checkIsInMultiOrPipeline ( ) ; client . hincrByFloat ( key , field , value ) ; final String dval = client . getBulkReply ( ) ; return ( dval != null ? new Double ( dval ) : null ) ;