signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class DubiousMapCollection { /** * parses all the parameters of a called method and removes any of the parameters that are maps currently being looked at for this detector */
private void processMethodCall ( ) { } } | int numParams = SignatureUtils . getNumParameters ( getSigConstantOperand ( ) ) ; int depth = stack . getStackDepth ( ) ; for ( int i = 0 ; i < numParams ; i ++ ) { if ( depth > i ) { OpcodeStack . Item item = stack . getStackItem ( i ) ; XField xf = item . getXField ( ) ; if ( xf != null ) { removeField ( item ) ; } }... |
public class ClusteringFeature { /** * Calculates the k - means costs of the ClusteringFeature too a center .
* @ param center
* the center too calculate the costs
* @ return the costs */
public double calcKMeansCosts ( double [ ] center ) { } } | assert ( this . sumPoints . length == center . length ) ; return this . sumSquaredLength - 2 * Metric . dotProduct ( this . sumPoints , center ) + this . numPoints * Metric . dotProduct ( center ) ; |
public class ProfileOption { /** * Sets the profile version or version range . Do not set ( use this method ) if the latest version should be
* discovered and used )
* @ param version artifact version / version range ( cannot be empty )
* @ return itself , for fluent api usage
* @ throws IllegalArgumentExceptio... | if ( version != null ) { validateNotEmpty ( version , true , "Version" ) ; } m_version = version ; return this ; |
public class WebSiteManagementClientImpl { /** * Gets the source controls available for Azure websites .
* Gets the source controls available for Azure websites .
* @ throws IllegalArgumentException thrown if parameters fail the validation
* @ return the PagedList & lt ; SourceControlInner & gt ; object wrapped i... | if ( this . apiVersion ( ) == null ) { throw new IllegalArgumentException ( "Parameter this.apiVersion() is required and cannot be null." ) ; } return service . listSourceControls ( this . apiVersion ( ) , this . acceptLanguage ( ) , this . userAgent ( ) ) . flatMap ( new Func1 < Response < ResponseBody > , Observable ... |
public class TypeMappings { /** * Get the output unique group ID mapping for the UserRegistry .
* @ param inputVirtualRealm Virtual realm to find the mappings .
* @ return The output unique group ID property .
* @ pre inputVirtualRealm ! = null
* @ pre inputVirtualRealm ! = " "
* @ post $ return ! = " "
* @... | // initialize the return value
String returnValue = getOutputMapping ( inputVirtualRealm , Service . CONFIG_DO_UNIQUE_GROUP_ID_MAPPING , OUTPUT_UNIQUE_GROUP_ID_DEFAULT ) ; return returnValue ; |
public class MainFrame { /** * GEN - LAST : event _ menuAboutActionPerformed */
private void menuOpenProjectActionPerformed ( java . awt . event . ActionEvent evt ) { } } | // GEN - FIRST : event _ menuOpenProjectActionPerformed
final JFileChooser fileChooser = new JFileChooser ( ) ; fileChooser . setFileView ( new FileView ( ) { private Icon KNOWLEDGE_FOLDER_ICO = null ; private Icon OTHER_FOLDER_ICO = null ; @ Override public Icon getIcon ( final File f ) { final Icon result ; if ( f . ... |
public class AWSAppSyncClient { /** * Lists the data sources for a given API .
* @ param listDataSourcesRequest
* @ return Result of the ListDataSources operation returned by the service .
* @ throws BadRequestException
* The request is not well formed . For example , a value is invalid or a required field is m... | request = beforeClientExecution ( request ) ; return executeListDataSources ( request ) ; |
public class S16 { /** * Compress an integer array using Simple16
* @ param in
* array to compress
* @ param currentPos
* where to start reading
* @ param inlength
* how many integers to read
* @ param out
* output array
* @ param tmpoutpos
* location in the output array
* @ return the number of 3... | int outpos = tmpoutpos ; final int finalin = currentPos + inlength ; while ( currentPos < finalin ) { int inoffset = compressblock ( out , outpos ++ , in , currentPos , inlength ) ; if ( inoffset == - 1 ) throw new RuntimeException ( "Too big a number" ) ; currentPos += inoffset ; inlength -= inoffset ; } return outpos... |
public class PropertiesReader { /** * Reads an integer property .
* @ param property The property name .
* @ return The property value .
* @ throws ConfigurationException if the property is not present */
public int getInteger ( String property ) { } } | return getProperty ( property , value -> { try { return Integer . valueOf ( value ) ; } catch ( NumberFormatException e ) { throw new ConfigurationException ( "malformed property value: " + property + " must be an integer" ) ; } } ) ; |
public class BootstrapDiscoveryBuilder { /** * Sets the bootstrap nodes .
* @ param nodes the bootstrap nodes
* @ return the location provider builder */
public BootstrapDiscoveryBuilder withNodes ( Address ... nodes ) { } } | return withNodes ( Stream . of ( nodes ) . map ( address -> Node . builder ( ) . withAddress ( address ) . build ( ) ) . collect ( Collectors . toSet ( ) ) ) ; |
public class MapRFileSystem { /** * Retrieves the CLDB locations for the given MapR cluster name .
* @ param authority
* the name of the MapR cluster
* @ return a list of CLDB locations
* @ throws IOException
* thrown if the CLDB locations for the given MapR cluster name
* cannot be determined */
private st... | // Determine the MapR home
String maprHome = System . getenv ( MAPR_HOME_ENV ) ; if ( maprHome == null ) { maprHome = DEFAULT_MAPR_HOME ; } final File maprClusterConf = new File ( maprHome , MAPR_CLUSTER_CONF_FILE ) ; if ( LOG . isDebugEnabled ( ) ) { LOG . debug ( String . format ( "Trying to retrieve MapR cluster con... |
public class GitlabAPI { /** * Delete a deploy key for a project
* @ param targetProjectId The id of the Gitlab project
* @ param targetKeyId The id of the Gitlab ssh key
* @ throws IOException on gitlab api call error */
public void deleteDeployKey ( Integer targetProjectId , Integer targetKeyId ) throws IOExcep... | String tailUrl = GitlabProject . URL + "/" + targetProjectId + GitlabSSHKey . DEPLOY_KEYS_URL + "/" + targetKeyId ; retrieve ( ) . method ( DELETE ) . to ( tailUrl , Void . class ) ; |
public class JsonValidationContext { /** * Adds the specified state objects to this validation context . Each state object will be
* identified by its concrete class ( retrieved with < tt > getClass < / tt > ) and can be retrieved with
* { @ link # getState ( java . lang . Class ) } .
* @ param states the state o... | for ( Object state : states ) { addState ( state , state . getClass ( ) ) ; } return this ; |
public class LCCore { /** * Because some systems may need to use the main thread for specific action ( like Cocoa ) ,
* we keep the current thread aside , and continue on a new thread .
* @ param toContinue the Runnable to run on a new Thread to continue the application startup */
public static void keepMainThread ... | mainThread = Thread . currentThread ( ) ; Thread thread = new Thread ( toContinue , "LC Core - Main" ) ; thread . start ( ) ; mainThreadLoop ( ) ; |
public class ListResourceRecordSetsResult { /** * Information about multiple resource record sets .
* @ param resourceRecordSets
* Information about multiple resource record sets . */
public void setResourceRecordSets ( java . util . Collection < ResourceRecordSet > resourceRecordSets ) { } } | if ( resourceRecordSets == null ) { this . resourceRecordSets = null ; return ; } this . resourceRecordSets = new com . amazonaws . internal . SdkInternalList < ResourceRecordSet > ( resourceRecordSets ) ; |
public class ReplicatedTree { /** * Returns all children of a given node .
* @ param fqn The fully qualified name of the node
* @ return A list of child names ( as Strings ) */
public List < String > getChildren ( String fqn ) { } } | final Node n = findNode ( fqn ) ; if ( n == null ) return null ; final Set < String > names = n . getChildrenNames ( ) ; return new ArrayList < String > ( names ) ; |
public class DiagnosticImpl { /** * { @ inheritDoc } */
@ Override public String getDescription ( ) { } } | // We need to change references to input fields to their label or accessible text .
Object [ ] modifiedArgs = new Object [ args . length ] ; for ( int i = 0 ; i < args . length ; i ++ ) { if ( args [ i ] instanceof Input ) { Input input = ( Input ) args [ i ] ; String text = null ; UIContextHolder . pushContext ( uic )... |
public class DateUtils { /** * < p > Gets a date ceiling , leaving the field specified as the most
* significant field . < / p >
* < p > For example , if you had the date - time of 28 Mar 2002
* 13:45:01.231 , if you passed with HOUR , it would return 28 Mar
* 2002 14:00:00.000 . If this was passed with MONTH ,... | if ( date == null ) { throw new IllegalArgumentException ( "The date must not be null" ) ; } if ( date instanceof Date ) { return ceiling ( ( Date ) date , field ) ; } else if ( date instanceof Calendar ) { return ceiling ( ( Calendar ) date , field ) . getTime ( ) ; } else { throw new ClassCastException ( "Could not f... |
public class ns_ssl_certkey_policy { /** * < pre >
* Use this operation to set the polling frequency of the NetScaler SSL certificates .
* < / pre > */
public static ns_ssl_certkey_policy update ( nitro_service client , ns_ssl_certkey_policy resource ) throws Exception { } } | resource . validate ( "modify" ) ; return ( ( ns_ssl_certkey_policy [ ] ) resource . update_resource ( client ) ) [ 0 ] ; |
public class RepresentationModel { /** * Adds all given { @ link Link } s to the resource .
* @ param links must not be { @ literal null } . */
@ SuppressWarnings ( "unchecked" ) public T add ( Link ... links ) { } } | Assert . notNull ( links , "Given links must not be null!" ) ; add ( Arrays . asList ( links ) ) ; return ( T ) this ; |
public class Utils { /** * 获取excel列表头
* @ param titleRow excel行
* @ param clz 类型
* @ return ExcelHeader集合
* @ throws Excel4JException 异常 */
public static Map < Integer , ExcelHeader > getHeaderMap ( Row titleRow , Class < ? > clz ) throws Excel4JException { } } | List < ExcelHeader > headers = getHeaderList ( clz ) ; Map < Integer , ExcelHeader > maps = new HashMap < > ( ) ; for ( Cell c : titleRow ) { String title = c . getStringCellValue ( ) ; for ( ExcelHeader eh : headers ) { if ( eh . getTitle ( ) . equals ( title . trim ( ) ) ) { maps . put ( c . getColumnIndex ( ) , eh )... |
public class AVLGroupTree { /** * Update values associated with a node , readjusting the tree if necessary . */
@ SuppressWarnings ( "WeakerAccess" ) public void update ( int node , double centroid , int count , List < Double > data , boolean forceInPlace ) { } } | if ( centroid == centroids [ node ] || forceInPlace ) { // we prefer to update in place so repeated values don ' t shuffle around and for merging
centroids [ node ] = centroid ; counts [ node ] = count ; if ( datas != null ) { datas [ node ] = data ; } } else { // have to do full scale update
this . centroid = centroid... |
public class ContractsApi { /** * Get corporation contracts Returns contracts available to a corporation ,
* only if the corporation is issuer , acceptor or assignee . Only returns
* contracts no older than 30 days , or if the status is
* \ & quot ; in _ progress \ & quot ; . - - - This route is cached for up to ... | com . squareup . okhttp . Call call = getCorporationsCorporationIdContractsValidateBeforeCall ( corporationId , datasource , ifNoneMatch , page , token , null ) ; Type localVarReturnType = new TypeToken < List < CorporationContractsResponse > > ( ) { } . getType ( ) ; return apiClient . execute ( call , localVarReturnT... |
public class nsacl6 { /** * Use this API to disable nsacl6 resources of given names . */
public static base_responses disable ( nitro_service client , String acl6name [ ] ) throws Exception { } } | base_responses result = null ; if ( acl6name != null && acl6name . length > 0 ) { nsacl6 disableresources [ ] = new nsacl6 [ acl6name . length ] ; for ( int i = 0 ; i < acl6name . length ; i ++ ) { disableresources [ i ] = new nsacl6 ( ) ; disableresources [ i ] . acl6name = acl6name [ i ] ; } result = perform_operatio... |
public class ApiOvhStore { /** * Create a ' marketplace ' contact for current nic
* REST : POST / store / contact
* @ param title [ required ] Title
* @ param firstname [ required ] First name
* @ param lastname [ required ] Last name
* @ param email [ required ] Email address
* @ param street [ required ] ... | String qPath = "/store/contact" ; StringBuilder sb = path ( qPath ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "city" , city ) ; addBody ( o , "country" , country ) ; addBody ( o , "email" , email ) ; addBody ( o , "firstname" , firstname ) ; addBody ( o , "lastname" , lastnam... |
public class SerializationObjectPool { /** * Returns a serialization object back into the pool .
* @ param object an instance previously allocated with { @ link # getSerializationObject ( ) } . */
public void returnSerializationObject ( SerializationObject object ) { } } | synchronized ( ivListOfObjects ) { if ( ivListOfObjects . size ( ) < MAXIMUM_NUM_OF_OBJECTS ) { ivListOfObjects . add ( object ) ; } } |
public class JsonOutput { /** * Writes a JSON double .
* This outputs the values of NaN , and Infinity as strings .
* @ param value the value
* @ throws IOException if an error occurs */
void writeDouble ( double value ) throws IOException { } } | if ( Double . isNaN ( value ) || Double . isInfinite ( value ) ) { output . append ( '"' ) . append ( Double . toString ( value ) ) . append ( '"' ) ; } else { output . append ( Double . toString ( value ) ) ; } |
public class BiMapJsonDeserializer { /** * @ param keyDeserializer { @ link KeyDeserializer } used to deserialize the keys .
* @ param valueDeserializer { @ link JsonDeserializer } used to deserialize the values .
* @ param < K > Type of the keys inside the { @ link BiMap }
* @ param < V > Type of the values insi... | return new BiMapJsonDeserializer < K , V > ( keyDeserializer , valueDeserializer ) ; |
public class FeaturesInner { /** * Registers the preview feature for the subscription .
* @ param resourceProviderNamespace The namespace of the resource provider .
* @ param featureName The name of the feature to register .
* @ param serviceCallback the async ServiceCallback to handle successful and failed respo... | return ServiceFuture . fromResponse ( registerWithServiceResponseAsync ( resourceProviderNamespace , featureName ) , serviceCallback ) ; |
public class AmazonDaxClient { /** * Returns a list of parameter group descriptions . If a parameter group name is specified , the list will contain
* only the descriptions for that group .
* @ param describeParameterGroupsRequest
* @ return Result of the DescribeParameterGroups operation returned by the service ... | request = beforeClientExecution ( request ) ; return executeDescribeParameterGroups ( request ) ; |
public class ManagedObject { /** * Get the serialized bytes representing this ManagedObject ,
* these will be given to the logger and potentially to the ObjectStore .
* @ return ObjectManagerByteArrayOutputStream containing the serialized bytes currently
* representing this ManagedObject .
* @ throws ObjectMana... | final String methodName = "getSerializedBytes" ; if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , methodName ) ; // The serialized image of the ManagedObject that will become the commited version .
// The objectStore and log keep their own reference to the bytes so ... |
public class SuggestTree { /** * Returns the weight of the specified suggestion in this tree , or - 1 if the
* tree does not contain the suggestion .
* @ throws NullPointerException if the specified suggestion is { @ code null } */
public int weightOf ( String suggestion ) { } } | Node n = getNode ( suggestion ) ; return ( n != null ) ? n . weight : - 1 ; |
public class ClasspathJSGenerator { /** * ( non - Javadoc )
* @ see
* net . jawr . web . resource . handler . reader . ResourceBrowser # getFilePath ( java .
* lang . String ) */
@ Override public String getFilePath ( String resourcePath ) { } } | return helper . getFilePath ( resolver . getResourcePath ( resourcePath ) ) ; |
public class PrettyPrint { /** * About as clumsy and random as a blaster . . . */
public static String UUID ( long lo , long hi ) { } } | long lo0 = ( lo >> 32 ) & 0xFFFFFFFFL ; long lo1 = ( lo >> 16 ) & 0xFFFFL ; long lo2 = ( lo >> 0 ) & 0xFFFFL ; long hi0 = ( hi >> 48 ) & 0xFFFFL ; long hi1 = ( hi >> 0 ) & 0xFFFFFFFFFFFFL ; return String . format ( "%08X-%04X-%04X-%04X-%012X" , lo0 , lo1 , lo2 , hi0 , hi1 ) ; |
public class AbstractIoBuffer { /** * { @ inheritDoc } */
@ Override public final IoBuffer putDouble ( int index , double value ) { } } | autoExpand ( index , 8 ) ; buf ( ) . putDouble ( index , value ) ; return this ; |
public class FileHelper { /** * Transform an existing file into the target class .
* @ param < T >
* @ param securityContext
* @ param uuid
* @ param fileType
* @ return transformed file
* @ throws FrameworkException
* @ throws IOException */
public static < T extends File > T transformFile ( final Securi... | AbstractFile existingFile = getFileByUuid ( securityContext , uuid ) ; if ( existingFile != null ) { existingFile . unlockSystemPropertiesOnce ( ) ; existingFile . setProperties ( securityContext , new PropertyMap ( AbstractNode . type , fileType == null ? File . class . getSimpleName ( ) : fileType . getSimpleName ( )... |
public class PushNotificationPayload { /** * Create a custom alert ( if none exist ) and add a title - loc - key parameter .
* @ param titleLocKey
* @ throws JSONException */
public void addCustomAlertTitleLocKey ( String titleLocKey ) throws JSONException { } } | Object value = titleLocKey != null ? titleLocKey : new JSONNull ( ) ; put ( "title-loc-key" , titleLocKey , getOrAddCustomAlert ( ) , false ) ; |
public class AbstractCreator { /** * Initialize the code builder to create a mapper .
* @ param instance the class to call
* @ return the code builder to create the mapper */
private CodeBlock . Builder initMethodCallCode ( MapperInstance instance ) { } } | CodeBlock . Builder builder = CodeBlock . builder ( ) ; if ( null == instance . getInstanceCreationMethod ( ) . isConstructor ( ) ) { builder . add ( "$T.$L" , rawName ( instance . getMapperType ( ) ) , instance . getInstanceCreationMethod ( ) . getName ( ) ) ; } else { builder . add ( "new $T" , typeName ( instance . ... |
public class VTimeZone { /** * Check if the DOW rule specified by month , weekInMonth and dayOfWeek is equivalent
* to the DateTimerule . */
private static boolean isEquivalentDateRule ( int month , int weekInMonth , int dayOfWeek , DateTimeRule dtrule ) { } } | if ( month != dtrule . getRuleMonth ( ) || dayOfWeek != dtrule . getRuleDayOfWeek ( ) ) { return false ; } if ( dtrule . getTimeRuleType ( ) != DateTimeRule . WALL_TIME ) { // Do not try to do more intelligent comparison for now .
return false ; } if ( dtrule . getDateRuleType ( ) == DateTimeRule . DOW && dtrule . getR... |
import java . util . List ; import javafx . util . Pair ; class ValidateMatching { /** * Function to verify if two lists of tuples are identical .
* Examples :
* validate _ matching ( [ ( 10 , 4 ) , ( 2 , 5 ) ] , [ ( 10 , 4 ) , ( 2 , 5 ) ] ) - > True
* validate _ matching ( [ ( 1 , 2 ) , ( 3 , 7 ) ] , [ ( 12 , 14... | boolean result = pairList1 . equals ( pairList2 ) ; return result ; |
public class DatabaseHashMap { /** * PK56991 we are checking if the session table in DB2 is marked as Volatile .
* We are skipping the same check on iSeries and zOS as VOLATILE is only
* compatiable and improve DB2 performance on Linux , Unix and Windows
* platforms ( LUW ) as information provided by Mark Anderso... | if ( com . ibm . websphere . ras . TraceComponent . isAnyTracingEnabled ( ) && LoggingUtil . SESSION_LOGGER_WAS . isLoggable ( Level . FINE ) ) { LoggingUtil . SESSION_LOGGER_WAS . entering ( methodClassName , methodNames [ IS_TABLE_MARKED_VOLATILE ] ) ; } boolean isMarkedVolatile = false ; String tblName = tableName ,... |
public class SingularValueDecomposition { /** * Effective numerical matrix rank
* @ return Number of non - negligible singular values . */
public int rank ( ) { } } | final double eps = 0x1p-52 , tol = ( m > n ? m : n ) * s [ 0 ] * eps ; int r = 0 ; for ( int i = 0 ; i < s . length ; i ++ ) { if ( s [ i ] > tol ) { r ++ ; } } return r ; |
public class AuthenticationApi { /** * Perform authorization
* Perform authorization based on the code grant type & amp ; mdash ; either Authorization Code Grant or Implicit Grant . For more information , see [ Authorization Endpoint ] ( https : / / tools . ietf . org / html / rfc6749 # section - 3.1 ) . * * Note : *... | com . squareup . okhttp . Call call = authorizeValidateBeforeCall ( clientId , redirectUri , responseType , authorization , hideTenant , scope , null , null ) ; return apiClient . execute ( call ) ; |
public class NumericShaper { /** * Converts the digits in the text that occur between start and
* start + count , using the provided context .
* Context is ignored if the shaper is not a contextual shaper .
* @ param text an array of characters
* @ param start the index into < code > text < / code > to start
... | checkParams ( text , start , count ) ; if ( isContextual ( ) ) { int ctxKey = getKeyFromMask ( context ) ; if ( rangeSet == null ) { shapeContextually ( text , start , count , ctxKey ) ; } else { shapeContextually ( text , start , count , Range . values ( ) [ ctxKey ] ) ; } } else { shapeNonContextually ( text , start ... |
public class MPBase { /** * Fills a hashmap with the rest method and the path to call the api . It validates that no other method / path is filled in the hash
* @ param hashAnnotation a HashMap object that will contain the method and path
* @ param method a String with the method
* @ param path a String with the ... | if ( hashAnnotation . containsKey ( "method" ) ) { throw new MPException ( "Multiple rest methods found" ) ; } hashAnnotation . put ( "method" , method ) ; hashAnnotation . put ( "path" , path ) ; hashAnnotation . put ( "payloadType" , payloadType ) ; hashAnnotation . put ( "retries" , retries ) ; hashAnnotation . put ... |
public class BuiltinAuthorizationService { /** * { @ inheritDoc } */
@ Override public boolean isEveryoneGranted ( String resourceName , Collection < String > requiredRoles ) { } } | validateInput ( resourceName , requiredRoles ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Determining if Everyone is authorized to access resource " + resourceName + ". Specified required roles are " + requiredRoles + "." ) ; } if ( requiredRoles . isEmpty ( ) ) { ... |
public class TypeVariableName { /** * Returns type variable equivalent to { @ code type } . */
public static TypeVariableName get ( java . lang . reflect . TypeVariable < ? > type ) { } } | return get ( type , new LinkedHashMap < > ( ) ) ; |
public class EventMetadataUtils { /** * Append values for the given key from all { @ link TaskState } s
* @ param sb a { @ link StringBuffer } to hold the output
* @ param key the key of the values to retrieve */
private static void appendTaskStateValues ( List < TaskState > taskStates , StringBuffer sb , String ke... | // Add task failure messages in a group followed by task failure exceptions
for ( TaskState taskState : taskStates ) { if ( taskState . contains ( key ) ) { if ( sb . length ( ) != 0 ) { sb . append ( "," ) ; } sb . append ( taskState . getProp ( key ) ) ; } } |
public class PageFlowUtils { /** * Destroys the stack of { @ link PageFlowController } s that have invoked nested page flows .
* @ deprecated Use { @ link PageFlowStack # destroy } instead .
* @ param request the current HttpServletRequest . */
public static void destroyPageFlowStack ( HttpServletRequest request ) ... | ServletContext servletContext = InternalUtils . getServletContext ( request ) ; PageFlowStack . get ( request , servletContext ) . destroy ( request ) ; |
public class GlResourceBuilder { /** * Return this gl resource builder configured with an plus operator ( ' < code > + < / code > ' character ) . The
* plus operator combines two ore more haplotypes into a genotype .
* @ return this gl resource builder configured with an plus operator ( ' < code > + < / code > ' ch... | alleles . clear ( ) ; alleleLists . clear ( ) ; haplotypes . add ( haplotype ) ; genotype = client . createGenotype ( haplotypes ) ; return this ; |
public class NavigationView { /** * Subscribes the { @ link InstructionView } and { @ link SummaryBottomSheet } to the { @ link NavigationViewModel } .
* Then , creates an instance of { @ link NavigationViewSubscriber } , which takes a presenter .
* The subscriber then subscribes to the view models , setting up the... | instructionView . subscribe ( navigationViewModel ) ; summaryBottomSheet . subscribe ( navigationViewModel ) ; NavigationViewSubscriber subscriber = new NavigationViewSubscriber ( navigationPresenter ) ; subscriber . subscribe ( ( ( LifecycleOwner ) getContext ( ) ) , navigationViewModel ) ; isSubscribed = true ; |
public class StandardRequestMapper { /** * Locates the piece of mapping definition that fits the command ,
* being a mvc form , and hands the result exceptionHandler to the form for processing
* The command is a string that consists of maximum three words , separated by dots . The first
* word specifies a mapping... | String [ ] subProcessArray ; String mappingName ; if ( processArray . length == 0 ) { mappingName = this . defaultMappingName ; subProcessArray = new String [ 0 ] ; } else { mappingName = processArray [ 0 ] ; subProcessArray = new String [ processArray . length - 1 ] ; System . arraycopy ( processArray , 1 , subProcess... |
public class CmsObject { /** * Reads a resource from the VFS ,
* using the specified resource filter . < p >
* A resource may be of type < code > { @ link CmsFile } < / code > or
* < code > { @ link CmsFolder } < / code > . In case of
* a file , the resource will not contain the binary file content . Since read... | return m_securityManager . readResource ( m_context , addSiteRoot ( resourcename ) , filter ) ; |
public class DefaultTree { /** * 向 TreeSource 增加新的节点 。
* @ param < ID >
* 数据标识
* @ param < DATA >
* 数据
* @ param source
* 节点构造源
* @ param node
* 父节点 */
private static < ID , DATA > void generateSubNode ( final TreeSource < ID , DATA > source , final DefaultTree < ID , DATA > node ) { } } | List < ID > items = source . listChildrenId ( node . getId ( ) ) ; if ( items == null || items . isEmpty ( ) ) { return ; } for ( ID id : items ) { DATA item = source . getItem ( id ) ; node . appendChildNode ( id , item ) ; } for ( DefaultTree < ID , DATA > subNode : new ArrayList < > ( node . getChildNodes ( ) . valu... |
public class JsonSerDe { /** * Also , throws IOException when Binary is detected . */
private static void buildJSONString ( StringBuilder sb , Object o , ObjectInspector oi ) throws IOException { } } | switch ( oi . getCategory ( ) ) { case PRIMITIVE : { PrimitiveObjectInspector poi = ( PrimitiveObjectInspector ) oi ; if ( o == null ) { sb . append ( "null" ) ; } else { switch ( poi . getPrimitiveCategory ( ) ) { case BOOLEAN : { boolean b = ( ( BooleanObjectInspector ) poi ) . get ( o ) ; sb . append ( b ? "true" : ... |
public class AssignPointIDTouchFilter { /** * Assign touch point IDs , for protocol A multitouch drivers that do not
* assign IDs themselves . */
@ Override public boolean filter ( TouchState state ) { } } | if ( oldState . getPointCount ( ) == 0 ) { for ( int i = 0 ; i < state . getPointCount ( ) ; i ++ ) { state . getPoint ( i ) . id = acquireID ( ) ; } } else if ( state . getPointCount ( ) >= oldState . getPointCount ( ) ) { // For each existing touch point , find the closest pending touch
// point .
// mappedIndices co... |
public class MPJwtBadMPConfigAsEnvVars { /** * The server will be started with all mp - config properties set to bad values in environment variables .
* The server . xml has a valid mp _ jwt config specified .
* The config settings should come from server . xml .
* The test should run successfully .
* @ throws ... | resourceServer . reconfigureServerUsingExpandedConfiguration ( _testName , "rs_server_AltConfigNotInApp_goodServerXmlConfig.xml" ) ; standardTestFlow ( resourceServer , MpJwtFatConstants . NO_MP_CONFIG_IN_APP_ROOT_CONTEXT , MpJwtFatConstants . NO_MP_CONFIG_IN_APP_APP , MpJwtFatConstants . MPJWT_APP_CLASS_NO_MP_CONFIG_I... |
public class ReflectionUtils { /** * Invokes the specified method without throwing any checked exceptions .
* This is only valid for methods that are not declared to throw any checked
* exceptions . Any unchecked exceptions thrown by the specified method will be
* re - thrown ( in their original form , not wrappe... | try { @ SuppressWarnings ( "unchecked" ) T result = ( T ) method . invoke ( target , arguments ) ; return result ; } catch ( IllegalAccessException ex ) { // This cannot happen if the method is public .
throw new IllegalArgumentException ( "Method " + method . getName ( ) + " is not publicly accessible." , ex ) ; } cat... |
public class EncodingContext { /** * Encode the given integer array into Base64 format .
* @ param input The array of integers to encode
* @ return The Base64 encoded data
* @ throws IOException if an error occurs encoding the array stream
* @ see # decodeIntArray ( String ) */
public String encodeIntArray ( in... | ByteArrayOutputStream bos = new ByteArrayOutputStream ( ) ; DataOutputStream dos = new DataOutputStream ( bos ) ; int length = input . length ; dos . writeInt ( length ) ; for ( int i = 0 ; i < length ; i ++ ) { dos . writeInt ( input [ i ] ) ; } return new String ( Base64 . encodeBase64URLSafe ( bos . toByteArray ( ) ... |
public class FairScheduler { /** * Is a job being starved for fair share for the given task type ?
* This is defined as being below half its fair share * and * having a
* positive deficit . */
boolean isStarvedForFairShare ( JobInfo info , TaskType type ) { } } | int desiredFairShare = ( int ) Math . floor ( Math . min ( ( fairTasks ( info , type ) + 1 ) / 2 , runnableTasks ( info , type ) ) ) ; return ( runningTasks ( info , type ) < desiredFairShare ) ; |
public class UpgradeManagerNamenode { /** * Start distributed upgrade .
* Instantiates distributed upgrade objects .
* @ return true if distributed upgrade is required or false otherwise
* @ throws IOException */
public synchronized boolean startUpgrade ( ) throws IOException { } } | if ( ! upgradeState ) { initializeUpgrade ( ) ; if ( ! upgradeState ) return false ; // write new upgrade state into disk
namesystem . getFSImage ( ) . storage . writeAll ( ) ; } assert currentUpgrades != null : "currentUpgrades is null" ; this . broadcastCommand = currentUpgrades . first ( ) . startUpgrade ( ) ; NameN... |
public class KllFloatsSketch { /** * thousands of trials */
public static int getKFromEpsilon ( final double epsilon , final boolean pmf ) { } } | // Ensure that eps is > = than the lowest possible eps given MAX _ K and pmf = false .
final double eps = max ( epsilon , 4.7634E-5 ) ; final double kdbl = pmf ? exp ( log ( 2.446 / eps ) / 0.9433 ) : exp ( log ( 2.296 / eps ) / 0.9723 ) ; final double krnd = round ( kdbl ) ; final double del = abs ( krnd - kdbl ) ; fi... |
public class InternalArrayIterate { /** * Implemented to avoid megamorphic call on castProcedure . */
private static < T > void batchReject ( T [ ] array , int start , int end , FastListRejectProcedure < T > castProcedure ) { } } | for ( int i = start ; i < end ; i ++ ) { castProcedure . value ( array [ i ] ) ; } |
public class TableExtractor { /** * Get the table row headings based on the cell information
* @ param tc
* the object of the table candidate */
public void getRowHeadingBasedOnCells ( TableCandidate tc ) { } } | String rowHeadingThisTable = "" ; int footnoteLineIndex = tc . getFootnoteBeginRow ( ) ; String [ ] [ ] cells = tc . getCells ( ) ; // if ( cells [ 0 ] [ 0 ] . length ( ) = = 0 ) {
for ( int j = 0 ; j < footnoteLineIndex ; j ++ ) { if ( cells [ j ] [ 0 ] . length ( ) > 0 ) rowHeadingThisTable = rowHeadingThisTable + ce... |
public class ManagementResource { /** * / * ( non - Javadoc )
* @ see net . roboconf . dm . internal . rest . client . exceptions . server . IApplicationWs
* # deleteApplication ( java . lang . String ) */
@ Override public Response deleteApplication ( String applicationName ) { } } | this . logger . fine ( "Request: delete application " + applicationName + "." ) ; Response result = Response . ok ( ) . build ( ) ; try { ManagedApplication ma = this . manager . applicationMngr ( ) . findManagedApplicationByName ( applicationName ) ; if ( ma == null ) result = handleError ( Status . NOT_FOUND , new Re... |
public class GroovyInterpretterConfig { /** * Get default compiler configuration for { @ link GroovyShell } . */
public CompilerConfiguration getCompilerConfiguration ( ) { } } | CompilerConfiguration cc = new CompilerConfiguration ( ) ; ImportCustomizer imports = new ImportCustomizer ( ) ; for ( String starImport : STAR_IMPORTS ) { imports . addStarImports ( starImport ) ; } for ( String staticStar : STATIC_IMPORTS ) { imports . addStaticStars ( staticStar ) ; } cc . addCompilationCustomizers ... |
public class Channel { /** * Send a transaction proposal .
* @ param transactionProposalRequest The transaction proposal to be sent to all the required peers needed for endorsing .
* @ return responses from peers .
* @ throws InvalidArgumentException
* @ throws ProposalException */
public Collection < ProposalR... | return sendProposal ( transactionProposalRequest , getEndorsingPeers ( ) ) ; |
public class ResourceUtil { /** * Convert a resource path to an absolute file path .
* @ param resourcePath The resource - relative path to resolve .
* @ return The absolute path to this resource . */
public static String getPathForResource ( final String resourcePath ) { } } | URL path = ResourceUtil . class . getResource ( resourcePath ) ; if ( path == null ) { path = ResourceUtil . class . getResource ( "/" ) ; File tmpFile = new File ( path . getPath ( ) , resourcePath ) ; return tmpFile . getPath ( ) ; } return path . getPath ( ) ; |
public class WDTimerImpl { /** * Open custom Watchdog
* @ param file
* @ throws IOException */
public void open ( String file ) throws IOException { } } | filename = file ; if ( fd > 0 ) { throw new IOException ( "File " + filename + " already open." ) ; } fd = WDT . open ( file ) ; if ( fd < 0 ) { throw new IOException ( "Cannot open file handle for " + filename + " got " + fd + " back." ) ; } |
public class XsdAsm { /** * This method is the entry point for the class creation process .
* It receives all the { @ link XsdAbstractElement } objects and creates the necessary infrastructure for the
* generated fluent interface , the required interfaces , visitor and all the classes based on the elements received... | createGeneratedFilesDirectory ( apiName ) ; createSupportingInfrastructure ( apiName ) ; List < XsdElement > elementList = elements . collect ( Collectors . toList ( ) ) ; interfaceGenerator . addCreatedElements ( elementList ) ; elementList . forEach ( element -> generateClassFromElement ( element , apiName ) ) ; inte... |
public class Popups { /** * Creates a new popup with the specified style name and contents and shows it near the
* specified target widget . Returns the newly created popup . */
public static PopupPanel newPopup ( String styleName , Widget contents , Position pos , Widget target ) { } } | PopupPanel panel = newPopup ( styleName , contents ) ; show ( panel , pos , target ) ; return panel ; |
public class JFXAlert { /** * this method ensure not null value for current animation */
private JFXAlertAnimation getCurrentAnimation ( ) { } } | JFXAlertAnimation usedAnimation = getAnimation ( ) ; usedAnimation = usedAnimation == null ? JFXAlertAnimation . NO_ANIMATION : usedAnimation ; return usedAnimation ; |
public class EmailAddressValidator { /** * Checks if a value is a valid e - mail address according to a complex regular
* expression . Additionally an MX record lookup is performed to see whether
* this host provides SMTP services .
* @ param sEmail
* The value validation is being performed on . A < code > null... | // First check without MX
if ( ! EmailAddressHelper . isValid ( sEmail ) ) return false ; final String sUnifiedEmail = EmailAddressHelper . getUnifiedEmailAddress ( sEmail ) ; // MX record checking
final int i = sUnifiedEmail . indexOf ( '@' ) ; final String sHostName = sUnifiedEmail . substring ( i + 1 ) ; return _has... |
public class FileRepositoryCollectionFactory { /** * Add a FileRepositorySource so it can be used by the ' createFileRepositySource ' factory method */
public void addFileRepositoryCollectionClass ( Class < ? extends FileRepositoryCollection > clazz , Set < String > fileExtensions ) { } } | for ( String extension : fileExtensions ) { fileRepositoryCollections . put ( extension . toLowerCase ( ) , clazz ) ; } |
public class ContainerDeployController { /** * Undeploy all deployments marked as managed , and all manually deployed .
* @ throws Exception */
public void undeployManaged ( @ Observes UnDeployManagedDeployments event ) throws Exception { } } | forEachDeployedDeployment ( new Operation < Container , Deployment > ( ) { @ Inject private Event < DeploymentEvent > event ; @ Override public void perform ( Container container , Deployment deployment ) throws Exception { if ( container . getState ( ) . equals ( Container . State . STARTED ) && deployment . isDeploye... |
public class BinaryString { /** * TODO upper / lower is slow ? . . */
private SegmentAndOffset firstSegmentAndOffset ( int segSize ) { } } | int segIndex = offset / segSize ; return new SegmentAndOffset ( segIndex , offset % segSize ) ; |
public class AVIMConversationsQuery { /** * 增加查询条件 , 当conversation的属性中对应的字段满足小于条件时即可返回
* @ param key
* @ param value
* @ return */
public AVIMConversationsQuery whereLessThan ( String key , Object value ) { } } | conditions . whereLessThan ( key , value ) ; return this ; |
public class DroolsValidator { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public boolean validatePriorityType ( BigInteger priorityType , DiagnosticChain diagnostics , Map < Object , Object > context ) { } } | boolean result = validatePriorityType_Min ( priorityType , diagnostics , context ) ; return result ; |
public class AbstractSlidingAverage { /** * Returns average by calculating cell by cell
* @ return */
@ Override public double average ( ) { } } | readLock . lock ( ) ; try { double s = 0 ; PrimitiveIterator . OfInt it = modIterator ( ) ; while ( it . hasNext ( ) ) { s += ring [ it . nextInt ( ) ] ; } return s / ( count ( ) ) ; } finally { readLock . unlock ( ) ; } |
public class SibRaXaResource { /** * Checks if the transaction was rolled back or not . If for some reason
* we could not obtain the transaction state then we return true indicating
* a rollback .
* @ return true if the transaction was rolled back */
boolean isTransactionRolledBack ( ) { } } | final String methodName = "isTransactionRolledBack" ; if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , methodName ) ; } // Default to true indicating a rollback
boolean isRolledBack = true ; Boolean rolledBack = null ; if ( _lastXidUsed != null ) { // Get ho... |
public class Actions { /** * Converts an { @ link Action1 } to a function that calls the action and returns a specified value .
* @ param action the { @ link Action1 } to convert
* @ param result the value to return from the function call
* @ return a { @ link Func1 } that calls { @ code action } and returns { @ ... | return new Func1 < T1 , R > ( ) { @ Override public R call ( T1 t1 ) { action . call ( t1 ) ; return result ; } } ; |
public class ZookeeperHealthAutoConfiguration { /** * If there is an active curator , if the zookeeper health endpoint is enabled and if a
* health indicator hasn ' t already been added by a user add one .
* @ param curator The curator connection to zookeeper to use
* @ return An instance of { @ link ZookeeperHea... | return new ZookeeperHealthIndicator ( curator ) ; |
public class SnorocketReasoner { /** * Ideally we ' d return some kind of normal form axioms here . However , in
* the presence of GCIs this is not well defined ( as far as I know -
* Michael ) .
* Instead , we will return stated form axioms for Sufficient conditions
* ( i . e . for INamedConcept on the RHS ) ,... | final Collection < Axiom > inferred = new HashSet < > ( ) ; if ( ! isClassified ) classify ( ) ; if ( ! no . isTaxonomyComputed ( ) ) { log . info ( "Building taxonomy" ) ; no . buildTaxonomy ( ) ; } final Map < String , Node > taxonomy = no . getTaxonomy ( ) ; final IConceptMap < Context > contextIndex = no . getConte... |
public class OrOperator { /** * ( non - Javadoc )
* @ see net . timewalker . ffmq4 . common . message . selector . expression . SelectorNode # evaluate ( javax . jms . Message ) */
@ Override public Object evaluate ( Message message ) throws JMSException { } } | Boolean leftOperandValue = leftOperand . evaluateBoolean ( message ) ; if ( leftOperandValue == null ) { Boolean rightOperandValue = rightOperand . evaluateBoolean ( message ) ; if ( rightOperandValue == null || ! rightOperandValue . booleanValue ( ) ) return null ; return Boolean . TRUE ; } else { if ( leftOperandValu... |
public class MySQLQueryFactory { /** * Create a INSERT IGNORE INTO clause
* @ param entity table to insert to
* @ return insert clause */
public SQLInsertClause insertIgnore ( RelationalPath < ? > entity ) { } } | SQLInsertClause insert = insert ( entity ) ; insert . addFlag ( Position . START_OVERRIDE , "insert ignore into " ) ; return insert ; |
public class SurefireMojoInterceptor { /** * Checks that surefire configuration allows integration with
* Ekstazi . At the moment , we check that forking is enabled . */
private static void checkSurefireConfiguration ( Object mojo ) throws Exception { } } | String forkCount = null ; try { forkCount = invokeAndGetString ( GET_FORK_COUNT , mojo ) ; } catch ( NoSuchMethodException ex ) { // Nothing : earlier versions ( before 2.14 ) of surefire did
// not have forkCount .
} String forkMode = null ; try { forkMode = getStringField ( FORK_MODE_FIELD , mojo ) ; } catch ( NoSuch... |
public class QueueListenerImpl { /** * Returns true when the execution is a branch with the new branch mechanism
* It will return true for executions of parallel , multi - instance , sub - flows and non blocking */
private boolean isBranch ( Execution execution ) { } } | return execution != null && ! StringUtils . isEmpty ( execution . getSystemContext ( ) . getBranchId ( ) ) ; |
public class ResourceType { /** * Returns < code > true < / code > if the resource type or any of the resource ' s super type ( s ) equals the given resource
* type .
* This implementation is equal to { @ link ResourceResolver # isResourceType ( Resource , String ) } - but in earlier sling
* version the compariso... | if ( resource == null || resourceType == null ) { return false ; } ResourceResolver resolver = resource . getResourceResolver ( ) ; // Check if the resource is of the given type . This method first checks the
// resource type of the resource , then its super resource type and continues
// to go up the resource super ty... |
public class CommandOption { /** * Sets command option setting key to be output when set
* if not set short command option name is used instead
* @ param name of setting key
* @ return command option */
public CommandOption < T > setting ( String name ) { } } | Assert . notNullOrEmptyTrimmed ( name , "Missing setting name" ) ; name = StringUtils . trim ( name ) ; String compare = StringUtils . sanitizeWhitespace ( name ) ; Assert . isTrue ( name . equals ( compare ) , "Setting name can not contain whitespace characters!" ) ; setting = name ; return this ; |
public class TwitterImpl { /** * " command = FINALIZE & media _ id = 601413451156586496" */
private UploadedMedia uploadMediaChunkedFinalize ( long mediaId ) throws TwitterException { } } | int tries = 0 ; int maxTries = 20 ; int lastProgressPercent = 0 ; int currentProgressPercent = 0 ; UploadedMedia uploadedMedia = uploadMediaChunkedFinalize0 ( mediaId ) ; while ( tries < maxTries ) { if ( lastProgressPercent == currentProgressPercent ) { tries ++ ; } lastProgressPercent = currentProgressPercent ; Strin... |
public class AuthorizedValuesRule { /** * ( non - Javadoc )
* @ see javax . validation . ConstraintValidator # initialize ( java . lang . annotation . Annotation ) */
@ Override public void initialize ( AuthorizedValues annotation ) { } } | // Si l ' annotation est nulle : on sort
if ( annotation == null ) return ; // Obtention de la liste
String [ ] annotationValues = annotation . values ( ) ; // Si la liste de l ' annotation est vide : on sort
if ( annotationValues == null || annotationValues . length == 0 ) return ; // On affecte la liste de valeurs
va... |
public class AbstractHosts { /** * 获取hosts文件路径 .
* @ return hosts文件路径 */
protected String getHostsPath ( ) { } } | String path ; if ( System . getProperty ( "os.name" ) . startsWith ( "Windows" ) ) { path = "c:/windows/System32/drivers/etc/hosts" ; } else { path = "/etc/hosts" ; } return path ; |
public class HttpResourceHandler { /** * Helper method to split a string by a given character , with empty parts omitted . */
private static Iterable < String > splitAndOmitEmpty ( final String str , final char splitChar ) { } } | return new Iterable < String > ( ) { @ Override public Iterator < String > iterator ( ) { return new Iterator < String > ( ) { int startIdx = 0 ; String next = null ; @ Override public boolean hasNext ( ) { while ( next == null && startIdx < str . length ( ) ) { int idx = str . indexOf ( splitChar , startIdx ) ; if ( i... |
public class UnscaledDecimal128Arithmetic { /** * Instead of throwing overflow exception , this function returns :
* 0 when there was no overflow
* + 1 when there was overflow
* - 1 when there was underflow */
public static long addWithOverflow ( Slice left , Slice right , Slice result ) { } } | boolean leftNegative = isNegative ( left ) ; boolean rightNegative = isNegative ( right ) ; long overflow = 0 ; if ( leftNegative == rightNegative ) { // either both negative or both positive
overflow = addUnsignedReturnOverflow ( left , right , result , leftNegative ) ; if ( leftNegative ) { overflow = - overflow ; } ... |
public class ThresholdImageOps { /** * Applies a global threshold across the whole image . If ' down ' is true , then pixels with values < =
* to ' threshold ' are set to 1 and the others set to 0 . If ' down ' is false , then pixels with values >
* to ' threshold ' are set to 1 and the others set to 0.
* @ param... | output = InputSanityCheck . checkDeclare ( input , output , GrayU8 . class ) ; if ( BoofConcurrency . USE_CONCURRENT ) { ImplThresholdImageOps_MT . threshold ( input , output , threshold , down ) ; } else { ImplThresholdImageOps . threshold ( input , output , threshold , down ) ; } return output ; |
public class MultiMapLayer { /** * Fire the event that indicates a layer was moved up .
* @ param layer is the moved layer .
* @ param newIndex is the new index of the layer . */
protected void fireLayerMovedUpEvent ( MapLayer layer , int newIndex ) { } } | fireLayerHierarchyChangedEvent ( new MapLayerHierarchyEvent ( this , layer , Type . MOVE_CHILD_UP , newIndex , layer . isTemporaryLayer ( ) ) ) ; |
public class MongoDBClient { /** * ( non - Javadoc )
* @ see com . impetus . kundera . client . Client # getColumnsById ( java . lang . String ,
* java . lang . String , java . lang . String , java . lang . String , java . lang . Object ,
* java . lang . Class ) */
@ Override public < E > List < E > getColumnsByI... | List < E > foreignKeys = new ArrayList < E > ( ) ; DBCollection dbCollection = mongoDb . getCollection ( joinTableName ) ; BasicDBObject query = new BasicDBObject ( ) ; query . put ( joinColumnName , MongoDBUtils . populateValue ( parentId , parentId . getClass ( ) ) ) ; KunderaCoreUtils . printQuery ( "Find by Id:" + ... |
public class DefineStyleActivity { /** * Preview image , to album . */
private void previewAlbum ( int position ) { } } | if ( mAlbumFiles == null || mAlbumFiles . size ( ) == 0 ) { Toast . makeText ( this , R . string . no_selected , Toast . LENGTH_LONG ) . show ( ) ; } else { Album . galleryAlbum ( this ) . checkable ( true ) . checkedList ( mAlbumFiles ) . currentPosition ( position ) . widget ( Widget . newLightBuilder ( this ) . tool... |
public class ServiceTools { /** * Return JsonUnmarshaller instance if annotation JsonUnmarshaller is present
* @ param annotations
* @ return
* @ throws org . ocelotds . marshalling . exceptions . JsonMarshallerException */
public IJsonMarshaller getJsonMarshaller ( Annotation [ ] annotations ) throws JsonMarshal... | if ( annotations != null ) { for ( Annotation annotation : annotations ) { if ( JsonUnmarshaller . class . isAssignableFrom ( annotation . annotationType ( ) ) ) { return getJsonMarshallerFromAnnotation ( ( JsonUnmarshaller ) annotation ) ; } } } return null ; |
public class CustomFunctions { /** * コレクションの値を結合する 。
* @ param collection 結合対象のコレクション
* @ param delimiter 区切り文字
* @ param printer コレクションの要素の値のフォーマッタ
* @ return 結合した文字列を返す 。 結合の対象のコレクションがnulの場合 、 空文字を返す 。
* @ throws NullPointerException { @ literal printer is null . } */
@ SuppressWarnings ( { } } | "rawtypes" , "unchecked" } ) public static String join ( final Collection < ? > collection , final String delimiter , final TextPrinter printer ) { Objects . requireNonNull ( printer ) ; if ( collection == null || collection . isEmpty ( ) ) { return "" ; } String value = collection . stream ( ) . map ( v -> printer . p... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.