signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class TasksBase { /** * Returns the compact task records for all tasks with the given tag .
* @ param tag The tag in which to search for tasks .
* @ return Request object */
public CollectionRequest < Task > findByTag ( String tag ) { } } | String path = String . format ( "/tags/%s/tasks" , tag ) ; return new CollectionRequest < Task > ( this , Task . class , path , "GET" ) ; |
public class InMemoryRegistry { /** * Gets an API by its unique identifying info ( orgid , id , version ) .
* @ param apiOrgId
* @ param apiId
* @ param apiVersion
* @ return an Api or null if not found */
private Api getApiInternal ( String apiOrgId , String apiId , String apiVersion ) { } } | String key = getApiIndex ( apiOrgId , apiId , apiVersion ) ; Api api ; synchronized ( mutex ) { api = ( Api ) getMap ( ) . get ( key ) ; } return api ; |
public class AbstractEquinoxCommandProvider { /** * Run command method
* @ param commandName command name
* @ param interpreter interpreter */
protected void runCommand ( String commandName , CommandInterpreter interpreter ) { } } | PrintWriter out = new PrintWriter ( new CommandInterpreterWriter ( interpreter ) ) ; String [ ] args = fetchCommandParams ( interpreter ) ; try { Method method = service . getClass ( ) . getMethod ( commandName , PrintWriter . class , String [ ] . class ) ; method . invoke ( service , out , args ) ; } catch ( NoSuchMet... |
public class DisplacedList { /** * Inherited from ArrayList
* @ param index
* @ return */
@ Override public T get ( int index ) { } } | if ( displacement != null ) { return super . get ( index - displacement ) ; } return super . get ( index ) ; |
public class Include { public void write ( Writer out ) throws IOException { } } | if ( reader == null ) return ; try { IO . copy ( reader , out ) ; } finally { reader . close ( ) ; reader = null ; } |
public class Hessian2Output { /** * Writes a fault . The fault will be written
* as a descriptive string followed by an object :
* < code > < pre >
* F map
* < / pre > < / code >
* < code > < pre >
* F H
* \ x04code
* \ x10the fault code
* \ x07message
* \ x11the fault message
* \ x06detail
* M ... | flushIfFull ( ) ; writeVersion ( ) ; _buffer [ _offset ++ ] = ( byte ) 'F' ; _buffer [ _offset ++ ] = ( byte ) 'H' ; addRef ( new Object ( ) , _refCount ++ , false ) ; writeString ( "code" ) ; writeString ( code ) ; writeString ( "message" ) ; writeString ( message ) ; if ( detail != null ) { writeString ( "detail" ) ;... |
public class CliFrontend { /** * Executions the run action .
* @ param args Command line arguments for the run action . */
protected int run ( String [ ] args ) { } } | // Parse command line options
CommandLine line ; try { line = parser . parse ( RUN_OPTIONS , args , false ) ; evaluateGeneralOptions ( line ) ; } catch ( MissingOptionException e ) { System . out . println ( e . getMessage ( ) ) ; printHelpForRun ( ) ; return 1 ; } catch ( UnrecognizedOptionException e ) { System . out... |
public class ConstructorLeakChecker { /** * For each class , visits constructors , instance variables , and instance initializers . Delegates
* further scanning of these " constructor - scope " constructs to { @ link # traverse } . */
@ Override public Description matchClass ( ClassTree tree , VisitorState state ) { ... | // TODO ( b / 36395371 ) : filter here to exclude some classes ( e . g . not immutable )
if ( TEST_CLASS . matches ( tree , state ) ) { return NO_MATCH ; } for ( Tree member : tree . getMembers ( ) ) { if ( isSuppressed ( member ) ) { continue ; } if ( ( member instanceof MethodTree && Matchers . methodIsConstructor ( ... |
public class JMethod { /** * Returns a full method name with arguments . */
public String getFullName ( ) { } } | StringBuilder name = new StringBuilder ( ) ; name . append ( getName ( ) ) ; name . append ( "(" ) ; JClass [ ] params = getParameterTypes ( ) ; for ( int i = 0 ; i < params . length ; i ++ ) { if ( i != 0 ) name . append ( ", " ) ; name . append ( params [ i ] . getShortName ( ) ) ; } name . append ( ')' ) ; return na... |
public class MessageProcessInfo { /** * Add this field in the Record ' s field sequence . */
public BaseField setupField ( int iFieldSeq ) { } } | BaseField field = null ; // if ( iFieldSeq = = 0)
// field = new CounterField ( this , ID , Constants . DEFAULT _ FIELD _ LENGTH , null , null ) ;
// field . setHidden ( true ) ;
// if ( iFieldSeq = = 1)
// field = new RecordChangedField ( this , LAST _ CHANGED , Constants . DEFAULT _ FIELD _ LENGTH , null , null ) ;
/... |
public class AmazonWebServiceClient { /** * Returns the service name of this AWS http client by first looking it up from the SDK internal
* configuration , and if not found , derive it from the class name of the immediate subclass of
* { @ link AmazonWebServiceClient } . No configuration is necessary if the simple ... | final String httpClientName = getHttpClientName ( ) ; String service = ServiceNameFactory . getServiceName ( httpClientName ) ; if ( service != null ) { return service ; // only if it is so explicitly configured
} // Otherwise , make use of convention over configuration
int j = httpClientName . indexOf ( "JavaClient" )... |
public class RequestContext { /** * Sends the specified error status code .
* @ param sc the specified error status code */
public void sendError ( final int sc ) { } } | try { response . sendError ( sc ) ; } catch ( final Exception e ) { LOGGER . log ( Level . ERROR , "Sends error status code [" + sc + "] failed: " + e . getMessage ( ) ) ; } |
public class FirstPartyAudienceSegmentRule { /** * Sets the customCriteriaRule value for this FirstPartyAudienceSegmentRule .
* @ param customCriteriaRule * Specifies the collection of custom criteria that are part of
* the rule of a
* { @ link FirstPartyAudienceSegment } .
* Once the { @ link FirstPartyAudienc... | this . customCriteriaRule = customCriteriaRule ; |
public class AbstractDeployMojo { /** * Return projectId from either projectId or project . Show deprecation message if configured as
* project and throw error if both specified . */
public String getProjectId ( ) { } } | if ( project != null ) { if ( projectId != null ) { throw new IllegalArgumentException ( "Configuring <project> and <projectId> is not allowed, please use only <projectId>" ) ; } getLog ( ) . warn ( "Configuring <project> is deprecated," + " use <projectId> to set your Google Cloud ProjectId" ) ; return project ; } ret... |
public class ElasticHashinator { /** * Figure out the token interval from the first 3 ranges , assuming that there is at most one token that doesn ' t
* fall onto the bucket boundary at any given time . The largest range will be the hashinator ' s bucket size .
* @ return The bucket size , or token interval if you ... | long interval = 0 ; int count = 4 ; int prevToken = Integer . MIN_VALUE ; UnmodifiableIterator < Integer > tokenIter = tokens . iterator ( ) ; while ( tokenIter . hasNext ( ) && count -- > 0 ) { int nextToken = tokenIter . next ( ) ; interval = Math . max ( interval , nextToken - prevToken ) ; prevToken = nextToken ; }... |
public class JobsInner { /** * List all directories and files inside the given directory of the output directory ( Only if the output directory is on Azure File Share or Azure Storage container ) .
* @ param nextPageLink The NextLink from the previous successful call to List operation .
* @ param serviceFuture the ... | return AzureServiceFuture . fromPageResponse ( listOutputFilesNextSinglePageAsync ( nextPageLink ) , new Func1 < String , Observable < ServiceResponse < Page < FileInner > > > > ( ) { @ Override public Observable < ServiceResponse < Page < FileInner > > > call ( String nextPageLink ) { return listOutputFilesNextSingleP... |
public class CmsDNDHandler { /** * Clears all references used within the current drag process . < p > */
protected void clear ( ) { } } | for ( I_CmsDropTarget target : m_targets ) { target . removePlaceholder ( ) ; } if ( m_dragHelper != null ) { m_dragHelper . removeFromParent ( ) ; m_dragHelper = null ; } m_placeholder = null ; m_currentTarget = null ; m_draggable = null ; Document . get ( ) . getBody ( ) . removeClassName ( org . opencms . gwt . clie... |
public class MessageBuilder { /** * Creates CEPOCH message .
* @ param proposedEpoch the last proposed epoch .
* @ param acknowledgedEpoch the acknowledged epoch .
* @ param config the current seen configuration .
* @ return the protobuf message . */
public static Message buildProposedEpoch ( long proposedEpoch... | ZabMessage . Zxid version = toProtoZxid ( config . getVersion ( ) ) ; ZabMessage . ClusterConfiguration zCnf = ZabMessage . ClusterConfiguration . newBuilder ( ) . setVersion ( version ) . addAllServers ( config . getPeers ( ) ) . build ( ) ; ProposedEpoch pEpoch = ProposedEpoch . newBuilder ( ) . setProposedEpoch ( pr... |
public class MessageCell { /** * private static final Template TEMPLATE = GWT . create ( Template . class ) ; */
@ Override public void render ( Context context , Message message , SafeHtmlBuilder safeHtmlBuilder ) { } } | // ImageResource icon = MessageCenterView . getSeverityIcon ( message . getSeverity ( ) ) ;
// AbstractImagePrototype prototype = AbstractImagePrototype . create ( icon ) ;
String styles = ( context . getIndex ( ) % 2 > 0 ) ? "message-list-item message-list-item-odd" : "message-list-item" ; String rowStyle = message . ... |
public class StoreNamingRules { /** * Gets fully - qualified name of a table or sequence .
* @ param localName local table name .
* @ param params params .
* @ return fully - qualified table name . */
@ NotNull private String getFQName ( @ NotNull final String localName , Object ... params ) { } } | final StringBuilder builder = new StringBuilder ( ) ; builder . append ( storeName ) ; builder . append ( '.' ) ; builder . append ( localName ) ; for ( final Object param : params ) { builder . append ( '#' ) ; builder . append ( param ) ; } // noinspection ConstantConditions
return StringInterner . intern ( builder .... |
public class FullDemo { /** * clearOneAndTwoButtonClicked , This clears date picker one . */
private static void clearOneAndTwoButtonClicked ( ActionEvent e ) { } } | // Clear the date pickers .
datePicker1 . clear ( ) ; datePicker2 . clear ( ) ; // Display message .
String message = "The datePicker1 and datePicker2 dates were cleared!\n\n" ; message += getDatePickerOneDateText ( ) + "\n" ; String date2String = datePicker2 . getDateStringOrSuppliedString ( "(null)" ) ; message += ( ... |
public class ParseUtil { /** * Parse a long integer from a character sequence .
* @ param str String
* @ param start Begin
* @ param end End
* @ return Long value */
public static long parseLongBase10 ( final CharSequence str , final int start , final int end ) { } } | // Current position and character .
int pos = start ; char cur = str . charAt ( pos ) ; // Match sign
boolean isNegative = ( cur == '-' ) ; // Carefully consume the - character , update c and i :
if ( ( isNegative || ( cur == '+' ) ) && ( ++ pos < end ) ) { cur = str . charAt ( pos ) ; } // Begin parsing real numbers !... |
public class DescribeMeshRequestMarshaller { /** * Marshall the given parameter object . */
public void marshall ( DescribeMeshRequest describeMeshRequest , ProtocolMarshaller protocolMarshaller ) { } } | if ( describeMeshRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( describeMeshRequest . getMeshName ( ) , MESHNAME_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . ge... |
public class DiGraph { /** * Returns the number of vertices in < code > this < / code > directed
* graph .
* Complexity : linear in the size of the graph . Cached if the
* < code > CACHING < / code > argument to the constructor was true . */
public int numVertices ( ) { } } | if ( CACHING && ( cachedNumVertices != - 1 ) ) { return cachedNumVertices ; } int numVertices = vertices ( ) . size ( ) ; if ( CACHING ) { cachedNumVertices = numVertices ; } return numVertices ; |
public class BeanUtil { /** * 获得字段名和字段描述Map 。 内部使用 , 直接获取Bean类的PropertyDescriptor
* @ param clazz Bean类
* @ param ignoreCase 是否忽略大小写
* @ return 字段名和字段描述Map
* @ throws BeanException 获取属性异常 */
private static Map < String , PropertyDescriptor > internalGetPropertyDescriptorMap ( Class < ? > clazz , boolean ignoreC... | final PropertyDescriptor [ ] propertyDescriptors = getPropertyDescriptors ( clazz ) ; final Map < String , PropertyDescriptor > map = ignoreCase ? new CaseInsensitiveMap < String , PropertyDescriptor > ( propertyDescriptors . length , 1 ) : new HashMap < String , PropertyDescriptor > ( ( int ) ( propertyDescriptors . l... |
public class TaskGroup { /** * Mark root of this task task group depends on the given TaskItem .
* This ensure this task group ' s root get picked for execution only after the completion
* of invocation of provided TaskItem .
* @ param dependencyTaskItem the task item that this task group depends on
* @ return ... | IndexableTaskItem dependency = IndexableTaskItem . create ( dependencyTaskItem ) ; this . addDependency ( dependency ) ; return dependency . key ( ) ; |
public class FilterExprIteratorSimple { /** * This function is used to fixup variables from QNames to stack frame
* indexes at stylesheet build time .
* @ param vars List of QNames that correspond to variables . This list
* should be searched backwards for the first qualified name that
* corresponds to the vari... | super . fixupVariables ( vars , globalsSize ) ; m_expr . fixupVariables ( vars , globalsSize ) ; |
public class ESRIFileUtil { /** * Replies if the given value is assumed to be NaN according to the
* ESRI specifications .
* @ param value the value .
* @ return < code > true < / code > if the value corresponds to NaN , otherwise < code > false < / code > . */
@ Pure public static boolean isESRINaN ( float value... | return Float . isInfinite ( value ) || Float . isNaN ( value ) || value <= ESRI_NAN ; |
public class Utils { /** * This method should be called by common install kernel only .
* @ param installDir */
public static void setInstallDir ( File installDir ) { } } | Utils . installDir = StaticValue . mutateStaticValue ( Utils . installDir , new FileInitializer ( installDir ) ) ; |
public class CircuitAssigmentMapImpl { /** * Enables circuit
* @ param circuitNumber - index of circuit - must be number < 1,31 >
* @ throws IllegalArgumentException - when number is not in range */
public void enableCircuit ( int circuitNumber ) throws IllegalArgumentException { } } | if ( circuitNumber < 1 || circuitNumber > 31 ) { throw new IllegalArgumentException ( "Cicruit number is out of range[" + circuitNumber + "] <1,31>" ) ; } this . mapFormat |= _CIRCUIT_ENABLED << ( circuitNumber - 1 ) ; |
public class Single { /** * Returns a Single that emits the item emitted by the source Single until a Publisher emits an item . Upon
* emission of an item from { @ code other } , this will emit a { @ link CancellationException } rather than go to
* { @ link SingleObserver # onSuccess ( Object ) } .
* < img width ... | ObjectHelper . requireNonNull ( other , "other is null" ) ; return RxJavaPlugins . onAssembly ( new SingleTakeUntil < T , E > ( this , other ) ) ; |
public class HornSchunckPyramid { /** * Computes the flow for a layer using Taylor series expansion and Successive Over - Relaxation linear solver .
* Flow estimates from previous layers are feed into this by setting initFlow and flow to their values . */
protected void processLayer ( GrayF32 image1 , GrayF32 image2 ... | float w = SOR_RELAXATION ; float uf , vf ; // outer Taylor expansion iterations
for ( int warp = 0 ; warp < numWarps ; warp ++ ) { initFlowX . setTo ( flowX ) ; initFlowY . setTo ( flowY ) ; warpImageTaylor ( derivX2 , initFlowX , initFlowY , warpDeriv2X ) ; warpImageTaylor ( derivY2 , initFlowX , initFlowY , warpDeriv... |
public class ModelsImpl { /** * Deletes a sublist of a specific closed list model .
* @ param appId The application ID .
* @ param versionId The version ID .
* @ param clEntityId The closed list entity extractor ID .
* @ param subListId The sublist ID .
* @ throws IllegalArgumentException thrown if parameters... | return deleteSubListWithServiceResponseAsync ( appId , versionId , clEntityId , subListId ) . toBlocking ( ) . single ( ) . body ( ) ; |
public class AbstractGpxParserTrk { /** * Fires whenever an XML start markup is encountered . It creates a new
* trackSegment when a < trkseg > markup is encountered . It creates a new
* trackPoint when a < trkpt > markup is encountered . It saves informations
* about < link > in currentPoint or currentLine .
*... | if ( localName . equalsIgnoreCase ( GPXTags . TRKSEG ) ) { segment = true ; GPXLine trkSegment = new GPXLine ( GpxMetadata . TRKSEGFIELDCOUNT ) ; trkSegment . setValue ( GpxMetadata . LINEID , trksegID ++ ) ; trkSegment . setValue ( GpxMetadata . TRKSEG_TRKID , getCurrentLine ( ) . getValues ( ) [ GpxMetadata . LINEID ... |
public class CommerceWishListItemLocalServiceBaseImpl { /** * Adds the commerce wish list item to the database . Also notifies the appropriate model listeners .
* @ param commerceWishListItem the commerce wish list item
* @ return the commerce wish list item that was added */
@ Indexable ( type = IndexableType . RE... | commerceWishListItem . setNew ( true ) ; return commerceWishListItemPersistence . update ( commerceWishListItem ) ; |
public class TagLibFactory { /** * Laedt mehrere TagLib ' s die innerhalb eines Verzeichnisses liegen .
* @ param dir Verzeichnis im dem die TagLib ' s liegen .
* @ param saxParser Definition des Sax Parser mit dem die TagLib ' s eingelesen werden sollen .
* @ return TagLib ' s als Array
* @ throws TagLibExcept... | if ( ! dir . isDirectory ( ) ) return new TagLib [ 0 ] ; ArrayList < TagLib > arr = new ArrayList < TagLib > ( ) ; Resource [ ] files = dir . listResources ( new ExtensionResourceFilter ( new String [ ] { "tld" , "tldx" } ) ) ; for ( int i = 0 ; i < files . length ; i ++ ) { if ( files [ i ] . isFile ( ) ) arr . add ( ... |
public class ParallelTaskBuilder { /** * Sets the HTTP poller processor to handle Async API .
* Will auto enable the pollable mode with this call
* @ param httpPollerProcessor
* the http poller processor
* @ return the parallel task builder */
public ParallelTaskBuilder setHttpPollerProcessor ( HttpPollerProces... | this . httpMeta . setHttpPollerProcessor ( httpPollerProcessor ) ; this . httpMeta . setPollable ( true ) ; return this ; |
public class DefaultGroovyMethods { /** * Splits all items into two collections based on the closure condition .
* The first list contains all items which match the closure expression .
* The second list all those that don ' t .
* @ param self an Array
* @ param closure a closure condition
* @ return a List w... | List < T > accept = new ArrayList < T > ( ) ; List < T > reject = new ArrayList < T > ( ) ; Iterator < T > iter = new ArrayIterator < T > ( self ) ; return split ( closure , accept , reject , iter ) ; |
public class DefaultMailMessageParser { /** * Returns the sender email from the provided mail object .
* @ param mailMessage
* The mail message with the fax data
* @ return The sender email
* @ throws MessagingException
* Any exception while handling the mail message */
protected String getSenderEmail ( Messa... | Address [ ] addresses = mailMessage . getFrom ( ) ; String senderEmail = null ; if ( ( addresses != null ) && ( addresses . length > 0 ) ) { // get sender mail address ( only first from is used )
Address address = addresses [ 0 ] ; // get as string
senderEmail = address . toString ( ) ; } return senderEmail ; |
public class ShrinkWrapFileSystemProvider { /** * Writes the contents of the { @ link InputStream } to the { @ link SeekableByteChannel }
* @ param in
* @ param out
* @ throws IOException */
private void copy ( final InputStream in , final SeekableByteChannel out ) throws IOException { } } | assert in != null : "InStream must be specified" ; assert out != null : "Channel must be specified" ; final byte [ ] backingBuffer = new byte [ 1024 * 4 ] ; final ByteBuffer byteBuffer = ByteBuffer . wrap ( backingBuffer ) ; int bytesRead = 0 ; while ( ( bytesRead = in . read ( backingBuffer , 0 , backingBuffer . lengt... |
public class NegationImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ Override public void eUnset ( int featureID ) { } } | switch ( featureID ) { case XtextPackage . NEGATION__VALUE : setValue ( ( Condition ) null ) ; return ; } super . eUnset ( featureID ) ; |
public class PoolStopResizeHeaders { /** * Set the time at which the resource was last modified .
* @ param lastModified the lastModified value to set
* @ return the PoolStopResizeHeaders object itself . */
public PoolStopResizeHeaders withLastModified ( DateTime lastModified ) { } } | if ( lastModified == null ) { this . lastModified = null ; } else { this . lastModified = new DateTimeRfc1123 ( lastModified ) ; } return this ; |
public class policyexpression { /** * Use this API to fetch policyexpression resource of given name . */
public static policyexpression get ( nitro_service service , String name ) throws Exception { } } | policyexpression obj = new policyexpression ( ) ; obj . set_name ( name ) ; policyexpression response = ( policyexpression ) obj . get_resource ( service ) ; return response ; |
public class ValuesResolver { /** * The http : / / facebook . github . io / graphql / # sec - Coercing - Variable - Values says :
* < pre >
* 1 . Let coercedValues be an empty unordered Map .
* 2 . Let variableDefinitions be the variables defined by operation .
* 3 . For each variableDefinition in variableDefin... | GraphqlFieldVisibility fieldVisibility = schema . getFieldVisibility ( ) ; Map < String , Object > coercedValues = new LinkedHashMap < > ( ) ; for ( VariableDefinition variableDefinition : variableDefinitions ) { String variableName = variableDefinition . getName ( ) ; GraphQLType variableType = TypeFromAST . getTypeFr... |
public class MalisisSlot { /** * Extract a specified < b > amount < / b > from this { @ link MalisisSlot } .
* @ param amount the amount
* @ return the { @ link ItemStack } extracted */
public ItemStack extract ( int amount ) { } } | ItemStackSplitter iss = new ItemUtils . ItemStackSplitter ( getItemStack ( ) ) ; iss . split ( amount ) ; setItemStack ( iss . source ) ; // if ( hasChanged ( ) )
onSlotChanged ( ) ; return iss . split ; |
public class TemplCommand { /** * Analyse the method given at construction time .
* This method check if the method ( s ) given at construction time fulfill the
* required specification . It always analyse the execution method and eventually
* the command allowed method .
* @ exception DevFailed If one of the m... | // Analyse the execution method given by the user
this . exe_method = analyse_method_exe ( device_class_name , exe_method_name ) ; // Analyse the state method if one is given by the user
if ( state_method_name != null ) this . state_method = analyse_method_state ( device_class_name , state_method_name ) ; |
public class PullDependencies { /** * Create the extension directory for a specific maven coordinate .
* The name of this directory should be the artifactId in the coordinate */
private void createExtensionDirectory ( String coordinate , File atLocation ) { } } | if ( atLocation . isDirectory ( ) ) { log . info ( "Directory [%s] already exists, skipping creating a directory" , atLocation . getAbsolutePath ( ) ) ; return ; } if ( ! atLocation . mkdir ( ) ) { throw new ISE ( "Unable to create directory at [%s] for coordinate [%s]" , atLocation . getAbsolutePath ( ) , coordinate )... |
public class DecimalFormatSymbols { /** * < strong > [ icu ] < / strong > Sets the string used for decimal sign .
* < b > Note : < / b > When the input decimal separator String is represented
* by multiple Java chars , then { @ link # getDecimalSeparator ( ) } will
* return the default decimal separator character... | if ( decimalSeparatorString == null ) { throw new NullPointerException ( "The input decimal separator is null" ) ; } this . decimalSeparatorString = decimalSeparatorString ; if ( decimalSeparatorString . length ( ) == 1 ) { this . decimalSeparator = decimalSeparatorString . charAt ( 0 ) ; } else { // Use the default de... |
public class Types { /** * Builds ( class name - > class ) map for given classes . */
@ SuppressWarnings ( "all" ) public static < C extends Class < ? > > Map < String , C > buildClassNameMap ( Iterable < C > set ) { } } | Map < String , C > classNameMap = new HashMap < String , C > ( ) ; for ( C javaClass : set ) { classNameMap . put ( javaClass . getName ( ) , javaClass ) ; } return classNameMap ; |
public class IfcTypeObjectImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ SuppressWarnings ( "unchecked" ) @ Override public EList < IfcPropertySetDefinition > getHasPropertySets ( ) { } } | return ( EList < IfcPropertySetDefinition > ) eGet ( Ifc4Package . Literals . IFC_TYPE_OBJECT__HAS_PROPERTY_SETS , true ) ; |
public class AmazonCloudFormationClient { /** * Returns drift information for the resources that have been checked for drift in the specified stack . This
* includes actual and expected configuration values for resources where AWS CloudFormation detects configuration
* drift .
* For a given stack , there will be ... | request = beforeClientExecution ( request ) ; return executeDescribeStackResourceDrifts ( request ) ; |
public class ModuleInfoHandler { /** * Here is the information to expose ( use ModuleLoaderMXBean as a source of information ) :
* Loaded module names
* For each module :
* Module name
* Main class name ( if any )
* Class loader name string
* Fallback loader name string
* Dependency information :
* Depe... | ModelNode result = new ModelNode ( ) ; result . get ( "name" ) . set ( module . getName ( ) ) ; ModelNode value ; value = result . get ( "main-class" ) ; if ( module . getMainClass ( ) != null ) { value . set ( module . getMainClass ( ) ) ; } value = result . get ( "fallback-loader" ) ; if ( module . getFallbackLoader ... |
public class JFinalViewResolver { /** * 设置 shared function 文件 , 多个文件用逗号分隔
* 主要用于 Spring MVC 的 xml 配置方式
* Spring Boot 的代码配置方式可使用 addSharedFunction ( . . . ) 进行配置 */
public void setSharedFunction ( String sharedFunctionFiles ) { } } | if ( StrKit . isBlank ( sharedFunctionFiles ) ) { throw new IllegalArgumentException ( "sharedFunctionFiles can not be blank" ) ; } String [ ] fileArray = sharedFunctionFiles . split ( "," ) ; for ( String fileName : fileArray ) { JFinalViewResolver . sharedFunctionFiles . add ( fileName ) ; } |
public class AWSLambdaClient { /** * Deletes a version of an < a href = " https : / / docs . aws . amazon . com / lambda / latest / dg / configuration - layers . html " > AWS
* Lambda layer < / a > . Deleted versions can no longer be viewed or added to functions . To avoid breaking functions , a
* copy of the versi... | request = beforeClientExecution ( request ) ; return executeDeleteLayerVersion ( request ) ; |
public class MetricKeyDataPoints { /** * An array of timestamp - value pairs , representing measurements over a period of time .
* < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use
* { @ link # setDataPoints ( java . util . Collection ) } or { @ link # withDataPoints ( java .... | if ( this . dataPoints == null ) { setDataPoints ( new java . util . ArrayList < DataPoint > ( dataPoints . length ) ) ; } for ( DataPoint ele : dataPoints ) { this . dataPoints . add ( ele ) ; } return this ; |
public class FilterTypeImpl { /** * If not already created , a new < code > init - param < / code > element will be created and returned .
* Otherwise , the first existing < code > init - param < / code > element will be returned .
* @ return the instance defined for the element < code > init - param < / code > */
... | List < Node > nodeList = childNode . get ( "init-param" ) ; if ( nodeList != null && nodeList . size ( ) > 0 ) { return new InitParamTypeImpl < FilterType < T > > ( this , "init-param" , childNode , nodeList . get ( 0 ) ) ; } return createInitParam ( ) ; |
public class Timestamp { /** * Creates an instance representing the value of { @ code Date } .
* @ throws IllegalArgumentException if the timestamp is outside the representable range */
public static Timestamp of ( Date date ) { } } | return ofTimeMicroseconds ( TimeUnit . MILLISECONDS . toMicros ( date . getTime ( ) ) ) ; |
public class ClassUtils { /** * Given a JVM Qualified Name produce a readable classname
* @ param qualifiedName The Qualified Name
* @ return The readable classname */
public static String determineReadableClassName ( String qualifiedName ) { } } | String readableClassName = StringUtils . removeWhitespace ( qualifiedName ) ; if ( readableClassName == null ) { throw new IllegalArgumentException ( "qualifiedName must not be null." ) ; } else if ( readableClassName . startsWith ( "[" ) ) { StringBuilder classNameBuffer = new StringBuilder ( ) ; while ( readableClass... |
public class Ifc2x3tc1PackageImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public EClass getIfcPlateType ( ) { } } | if ( ifcPlateTypeEClass == null ) { ifcPlateTypeEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc2x3tc1Package . eNS_URI ) . getEClassifiers ( ) . get ( 363 ) ; } return ifcPlateTypeEClass ; |
public class BoundedBuffer { /** * Increases the buffer ' s capacity by the given amount .
* @ param additionalCapacity
* The amount by which the buffer ' s capacity should be increased . */
@ SuppressWarnings ( "unchecked" ) public synchronized void expand ( int additionalCapacity ) { } } | if ( additionalCapacity <= 0 ) { throw new IllegalArgumentException ( ) ; } int capacityBefore = buffer . length ; synchronized ( lock ) { // D312598
int capacityAfter = buffer . length ; // Check that no one was expanding while we waited on this lock
if ( capacityAfter == capacityBefore ) { final Object [ ] newBuffer ... |
public class PromptTask { /** * Implementation . */
private boolean isValid ( String response , List < String > options ) { } } | boolean rslt = false ; // default . . .
if ( options . size ( ) == 0 ) { // If no acceptable responses are specified , it ' s wide open . . .
rslt = true ; } else { for ( String o : options ) { if ( response . matches ( o ) ) { rslt = true ; break ; } } } return rslt ; |
public class MathUtil { /** * Returns the next larger positive prime integer . < p >
* The integer specified will be returned if it is positive and a prime . < p >
* If the integer specified is greater than the maximumn prime integer , then
* the next odd integer will be returned . */
public static int findNextPr... | // 2 is the smallest positive prime number .
if ( number <= 2 ) return 2 ; // Even numbers ( other than 2 ) are not prime .
if ( isEven ( number ) ) ++ number ; if ( number > MAX_PRIME_INTEGER ) return number ; // For safety , don ' t loop forever looking for a prime , and skip
// all of the evens , as they are not pri... |
public class NetworkClient { /** * Retrieves the list of networks available to the specified project .
* < p > Sample code :
* < pre > < code >
* try ( NetworkClient networkClient = NetworkClient . create ( ) ) {
* ProjectName project = ProjectName . of ( " [ PROJECT ] " ) ;
* for ( Network element : networkC... | ListNetworksHttpRequest request = ListNetworksHttpRequest . newBuilder ( ) . setProject ( project == null ? null : project . toString ( ) ) . build ( ) ; return listNetworks ( request ) ; |
public class DrawableUtils { /** * Normalize value between minimum and maximum .
* @ param val value
* @ param minVal minimum value
* @ param maxVal maximum value
* @ return normalized value in range < code > 0 . . 1 < / code >
* @ throws IllegalArgumentException if value is out of range < code > [ minVal , m... | if ( val < minVal || val > maxVal ) throw new IllegalArgumentException ( "Value must be between min and max values. [val, min, max]: [" + val + "," + minVal + ", " + maxVal + "]" ) ; return ( val - minVal ) / ( maxVal - minVal ) ; |
import java . util . Collections ; import java . util . Arrays ; import java . util . List ; class RetrieveMaximum { /** * This function finds the greatest number in a list of tuples .
* Examples :
* retrieveMaximum ( [ ( 2 , 4 ) , ( 6 , 7 ) , ( 5 , 1 ) , ( 6 , 10 ) , ( 8 , 7 ) ] ) - > 10
* retrieveMaximum ( [ ( ... | int maximum = Collections . max ( Arrays . asList ( Collections . max ( input_tuples_list , ( t1 , t2 ) -> Collections . max ( t1 ) - Collections . max ( t2 ) ) ) ) ; return maximum ; |
public class Type { /** * Returns the conversion cost of assigning the given type to this type .
* Conversions are allowed between arrays as well if they have the
* same dimensions . If no legal conversion exists , - 1 is returned .
* The conversion costs are as follows :
* < ol >
* < li > any type is assigna... | // if ( equals ( other ) ) {
// return 1;
Class < ? > thisNat = mNaturalClass ; Class < ? > otherNat = other . mNaturalClass ; if ( thisNat . equals ( otherNat ) ) { return 1 ; } if ( thisNat . isAssignableFrom ( otherNat ) ) { return 2 ; } if ( other == NULL_TYPE && ! thisNat . isPrimitive ( ) ) { return 38 ; } boolea... |
public class ClientRegistry { /** * Return next client id
* @ return Next client id */
public String nextId ( ) { } } | String id = "-1" ; do { // when we reach max int , reset to zero
if ( nextId . get ( ) == Integer . MAX_VALUE ) { nextId . set ( 0 ) ; } id = String . format ( "%d" , nextId . getAndIncrement ( ) ) ; } while ( hasClient ( id ) ) ; return id ; |
public class CmsUpdateDBProjectId { /** * Renames the column of the given table the new name . < p >
* @ param dbCon the db connection interface
* @ param tablename the table in which the column shall be renamed
* @ param oldname the old name of the column
* @ param newname the new name of the column
* @ thro... | System . out . println ( new Exception ( ) . getStackTrace ( ) [ 0 ] . toString ( ) ) ; if ( dbCon . hasTableOrColumn ( tablename , oldname ) ) { String query = readQuery ( QUERY_RENAME_COLUMN ) ; Map < String , String > replacer = new HashMap < String , String > ( ) ; replacer . put ( REPLACEMENT_TABLENAME , tablename... |
public class ResourceSnippet { /** * extract a ResourceSnippet from InputStream at the given char positions
* @ param is - InputStream of the Resource
* @ param startChar - start position of the snippet
* @ param endChar - end position of the snippet
* @ param charset - use server ' s charset , default should b... | return createResourceSnippet ( getContents ( is , charset ) , startChar , endChar ) ; |
public class Connection { /** * { @ inheritDoc }
* @ throws IllegalArgumentException if | properties | is null */
public void setClientInfo ( final Properties properties ) throws SQLClientInfoException { } } | if ( properties == null ) { throw new IllegalArgumentException ( ) ; } // end of if
if ( this . closed ) { throw new SQLClientInfoException ( ) ; } // end of if
this . clientInfo = properties ; |
public class PDF417HighLevelEncoder { /** * Encode parts of the message using Text Compaction as described in ISO / IEC 15438:2001 ( E ) ,
* chapter 4.4.2.
* @ param msg the message
* @ param startpos the start position within the message
* @ param count the number of characters to encode
* @ param sb receive... | StringBuilder tmp = new StringBuilder ( count ) ; int submode = initialSubmode ; int idx = 0 ; while ( true ) { char ch = msg . charAt ( startpos + idx ) ; switch ( submode ) { case SUBMODE_ALPHA : if ( isAlphaUpper ( ch ) ) { if ( ch == ' ' ) { tmp . append ( ( char ) 26 ) ; // space
} else { tmp . append ( ( char ) (... |
public class NFRule { /** * Checks to see whether a string consists entirely of ignorable
* characters .
* @ param str The string to test .
* @ return true if the string is empty of consists entirely of
* characters that the number formatter ' s collator says are
* ignorable at the primary - order level . fal... | // if the string is empty , we can just return true
if ( str == null || str . length ( ) == 0 ) { return true ; } RbnfLenientScanner scanner = formatter . getLenientScanner ( ) ; return scanner != null && scanner . allIgnorable ( str ) ; |
public class ReportQuery { /** * Gets the timeZoneType value for this ReportQuery .
* @ return timeZoneType * Gets the { @ link TimeZoneType } for this report , which determines
* the time zone used for the
* report ' s date range . Defaults to { @ link TimeZoneType . PUBLISHER } . */
public com . google . api . ... | return timeZoneType ; |
public class BasicComponent { /** * Increments the { @ link MyData } bean ' s count by 1 . Called by the action on { @ link # decBtn } . */
private void decrement ( ) { } } | MyData data = ( MyData ) getData ( ) ; int dataCount = data . getCount ( ) ; if ( dataCount > 0 ) { dataCount -- ; } data . setCount ( dataCount ) ; |
public class GeometryUtil { /** * Calculates the center of mass for the < code > Atom < / code > s in the AtomContainer .
* @ param ac AtomContainer for which the center of mass is calculated
* @ return The center of mass of the molecule , or < code > NULL < / code > if the molecule
* does not have 3D coordinates... | double xsum = 0.0 ; double ysum = 0.0 ; double zsum = 0.0 ; double totalmass = 0.0 ; Isotopes isotopes ; try { isotopes = Isotopes . getInstance ( ) ; } catch ( IOException e ) { throw new RuntimeException ( "Could not initialize Isotopes" ) ; } for ( IAtom a : ac . atoms ( ) ) { Double mass = a . getExactMass ( ) ; //... |
public class ListT { /** * Filter the wrapped List
* < pre >
* { @ code
* ListT . of ( AnyM . fromStream ( Arrays . asList ( 10,11 ) )
* . filter ( t - > t ! = 10 ) ;
* / / ListT < AnyM < Stream < List [ 11 ] > > >
* < / pre >
* @ param test Predicate to filter the wrapped List
* @ return ListT that app... | return of ( run . map ( seq -> seq . filter ( test ) ) ) ; |
public class AdBrokerBenchmark { /** * Produce a random longitude / latitude point within the bounding box
* where advertisers are placing bids .
* @ return a random point */
private GeographyPointValue getRandomPoint ( ) { } } | double lngRange = Regions . MAX_LNG - Regions . MIN_LNG ; double lng = Regions . MIN_LNG + lngRange * m_rand . nextDouble ( ) ; double latRange = Regions . MAX_LAT - Regions . MIN_LAT ; double lat = Regions . MIN_LAT + latRange * m_rand . nextDouble ( ) ; return new GeographyPointValue ( lng , lat ) ; |
public class IonCharacterReader { /** * Uses the push back implementation but normalizes newlines to " \ n " . */
@ Override public int read ( ) throws IOException { } } | int nextChar = super . read ( ) ; // process the character
if ( nextChar != - 1 ) { if ( nextChar == '\n' ) { m_line ++ ; pushColumn ( m_column ) ; m_column = 0 ; } else if ( nextChar == '\r' ) { int aheadChar = super . read ( ) ; // if the lookahead is not a newline combo , unread it
if ( aheadChar != '\n' ) { // no n... |
public class DiameterStackMultiplexer { /** * ( non - Javadoc )
* @ see org . mobicents . diameter . stack . DiameterStackMultiplexerMBean # _ LocalPeer _ removeIPAddress ( java . lang . String ) */
@ Override public void _LocalPeer_removeIPAddress ( String ipAddress ) throws MBeanException { } } | Configuration [ ] oldIPAddressesConfig = getMutableConfiguration ( ) . getChildren ( OwnIPAddresses . ordinal ( ) ) ; Configuration ipAddressToRemove = null ; List < Configuration > newIPAddressesConfig = Arrays . asList ( oldIPAddressesConfig ) ; for ( Configuration curIPAddress : newIPAddressesConfig ) { if ( curIPAd... |
public class Image { /** * Draw a section of this image at a particular location and scale on the screen
* @ param x The x position to draw the image
* @ param y The y position to draw the image
* @ param x2 The x position of the bottom right corner of the drawn image
* @ param y2 The y position of the bottom r... | init ( ) ; if ( alpha != 1 ) { if ( filter == null ) { filter = Color . white ; } filter = new Color ( filter ) ; filter . a *= alpha ; } filter . bind ( ) ; texture . bind ( ) ; GL . glTranslatef ( x , y , 0 ) ; if ( angle != 0 ) { GL . glTranslatef ( centerX , centerY , 0.0f ) ; GL . glRotatef ( angle , 0.0f , 0.0f ,... |
public class ConfigImpl { /** * Initializes and returns the flag indicating if files and directories
* located under the base directory should be scanned for javascript files
* when building the module dependency mappings . The default is false .
* @ param cfg
* The parsed config JavaScript as a properties map ... | boolean result = false ; Object value = cfg . get ( DEPSINCLUDEBASEURL_CONFIGPARAM , cfg ) ; if ( value != Scriptable . NOT_FOUND ) { result = TypeUtil . asBoolean ( toString ( value ) , false ) ; } return result ; |
public class DB { /** * Selects a page of posts with a specified type .
* @ param type The post type . May be { @ code null } for any type .
* @ param status The required post status .
* @ param terms A collection of terms attached to the posts .
* @ param sort The page sort .
* @ param paging The page range ... | return selectPostIds ( type != null ? EnumSet . of ( type ) : null , status , terms , sort , paging ) ; |
public class GVRTexture { /** * Set the list of { @ link GVRAtlasInformation } to map the texture atlas
* to each object of the scene .
* @ param atlasInformation Atlas information to map the texture atlas to each
* scene object . */
public void setAtlasInformation ( List < GVRAtlasInformation > atlasInformation ... | if ( ( mImage != null ) && ( mImage instanceof GVRImageAtlas ) ) { ( ( GVRImageAtlas ) mImage ) . setAtlasInformation ( atlasInformation ) ; } |
public class DescribeTrainingJobResult { /** * A history of all of the secondary statuses that the training job has transitioned through .
* < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use
* { @ link # setSecondaryStatusTransitions ( java . util . Collection ) } or
* { @ ... | if ( this . secondaryStatusTransitions == null ) { setSecondaryStatusTransitions ( new java . util . ArrayList < SecondaryStatusTransition > ( secondaryStatusTransitions . length ) ) ; } for ( SecondaryStatusTransition ele : secondaryStatusTransitions ) { this . secondaryStatusTransitions . add ( ele ) ; } return this ... |
public class ServerDispatcher { /** * Must be called with the clientsModificationLock hold . */
private void updateClients ( ) { } } | assignedClients . addAll ( newlyAssignedClients ) ; assignedClients . removeAll ( removedClients ) ; newlyAssignedClients . clear ( ) ; removedClients . clear ( ) ; |
public class BeatGrid { /** * Helper function to find the beat grid section in a rekordbox track analysis file .
* @ param anlzFile the file that was downloaded from the player
* @ return the section containing the beat grid */
private RekordboxAnlz . BeatGridTag findTag ( RekordboxAnlz anlzFile ) { } } | for ( RekordboxAnlz . TaggedSection section : anlzFile . sections ( ) ) { if ( section . body ( ) instanceof RekordboxAnlz . BeatGridTag ) { return ( RekordboxAnlz . BeatGridTag ) section . body ( ) ; } } throw new IllegalArgumentException ( "No beat grid found inside analysis file " + anlzFile ) ; |
public class NodeTypes { /** * Get the mandatory property definitions for a node with the named primary type and mixin types . Note that the
* { @ link # hasMandatoryPropertyDefinitions ( Name , Set ) } method should first be called with the primary type and mixin types ; if
* that method returns < code > true < / ... | if ( mixinTypes . isEmpty ( ) ) { return mandatoryPropertiesNodeTypes . get ( primaryType ) ; } Set < JcrPropertyDefinition > defn = new HashSet < JcrPropertyDefinition > ( ) ; defn . addAll ( mandatoryPropertiesNodeTypes . get ( primaryType ) ) ; for ( Name mixinType : mixinTypes ) { defn . addAll ( mandatoryPropertie... |
public class BigComplexMath { /** * Calculates the arc tangens ( inverted tangens ) of { @ link BigComplex } x in the complex domain .
* < p > See : < a href = " https : / / en . wikipedia . org / wiki / Inverse _ trigonometric _ functions # Extension _ to _ complex _ plane " > Wikipedia : Inverse trigonometric funct... | MathContext mc = new MathContext ( mathContext . getPrecision ( ) + 4 , mathContext . getRoundingMode ( ) ) ; return log ( I . subtract ( x , mc ) . divide ( I . add ( x , mc ) , mc ) , mc ) . divide ( I , mc ) . divide ( TWO , mc ) . round ( mathContext ) ; |
public class ChannelUtil { /** * Returns all the channel Names in the given Collection of channels
* @ param channels - list of channels
* @ return a set of all the unique names associated with the each channel in
* channels */
public static Collection < String > getChannelNames ( Collection < Channel > channels ... | Collection < String > channelNames = new HashSet < String > ( ) ; for ( Channel channel : channels ) { channelNames . add ( channel . getName ( ) ) ; } return channelNames ; |
public class HtmlDocletWriter { /** * Adds the navigation bar for the Html page at the top and and the bottom .
* @ param header If true print navigation bar at the top of the page else
* @ param htmlTree the HtmlTree to which the nav links will be added */
protected void addNavLinks ( boolean header , Content html... | if ( ! configuration . nonavbar ) { Content tree = ( configuration . allowTag ( HtmlTag . NAV ) ) ? HtmlTree . NAV ( ) : htmlTree ; String allClassesId = "allclasses_" ; HtmlTree navDiv = new HtmlTree ( HtmlTag . DIV ) ; fixedNavDiv . addStyle ( HtmlStyle . fixedNav ) ; Content skipNavLinks = configuration . getContent... |
public class HttpSupport { /** * Produces a writer for sending raw data to HTTP clients .
* @ param contentType content type . If null - will not be set on the response
* @ param headers headers . If null - will not be set on the response
* @ param status will be sent to browser .
* @ return instance of a write... | try { RequestContext . setControllerResponse ( new NopResponse ( contentType , status ) ) ; if ( headers != null ) { for ( Object key : headers . keySet ( ) ) { if ( headers . get ( key ) != null ) RequestContext . getHttpResponse ( ) . addHeader ( key . toString ( ) , headers . get ( key ) . toString ( ) ) ; } } retur... |
public class SecurityUtils { /** * Generates a new JWT token .
* @ param user a User object belonging to the app
* @ param app the app object
* @ return a new JWT or null */
public static SignedJWT generateJWToken ( User user , App app ) { } } | if ( app != null ) { try { Date now = new Date ( ) ; JWTClaimsSet . Builder claimsSet = new JWTClaimsSet . Builder ( ) ; String userSecret = "" ; claimsSet . issueTime ( now ) ; claimsSet . expirationTime ( new Date ( now . getTime ( ) + ( app . getTokenValiditySec ( ) * 1000 ) ) ) ; claimsSet . notBeforeTime ( now ) ;... |
public class DomHelper { /** * Generic creation method for non - group elements .
* @ param parent
* the parent group
* @ param name
* local group name of the element ( should be unique within the group )
* @ param type
* the type of the element ( tag name , e . g . ' image ' )
* @ param style
* The sty... | if ( null == name ) { return null ; } Element parentElement ; if ( parent == null ) { parentElement = getRootElement ( ) ; } else { parentElement = getGroup ( parent ) ; } if ( parentElement == null ) { return null ; } else { Element element ; String id = generateId ? Dom . assembleId ( parentElement . getId ( ) , name... |
public class AmfWriter { /** * Enables the uses of the Vector and Dictionary type markers ( defaults
* to array serialization otherwise ) . */
public void enableExtendedSerializers ( ) { } } | amf3Serializers . put ( int [ ] . class , new Amf3IntVectorSerializer ( this ) ) ; amf3Serializers . put ( long [ ] . class , new Amf3UintVectorSerializer ( this ) ) ; amf3Serializers . put ( double [ ] . class , new Amf3DoubleVectorSerializer ( this ) ) ; amf3Serializers . put ( ArrayList . class , new Amf3VectorSeria... |
public class SimpleConversionService { /** * / * ( non - Javadoc ) */
private boolean isJarFile ( URL resourceLocation ) { } } | String resourceLocationString = resourceLocation . toExternalForm ( ) ; return resourceLocationString . startsWith ( "jar:file:" ) || resourceLocationString . contains ( ".jar!" ) ; |
public class GrantFlowEntitlementsRequest { /** * The list of entitlements that you want to grant .
* < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use
* { @ link # setEntitlements ( java . util . Collection ) } or { @ link # withEntitlements ( java . util . Collection ) } if... | if ( this . entitlements == null ) { setEntitlements ( new java . util . ArrayList < GrantEntitlementRequest > ( entitlements . length ) ) ; } for ( GrantEntitlementRequest ele : entitlements ) { this . entitlements . add ( ele ) ; } return this ; |
public class SecureUtil { /** * 生成签名对象 , 仅用于非对称加密
* @ param asymmetricAlgorithm { @ link AsymmetricAlgorithm } 非对称加密算法
* @ param digestAlgorithm { @ link DigestAlgorithm } 摘要算法
* @ return { @ link Signature } */
public static Signature generateSignature ( AsymmetricAlgorithm asymmetricAlgorithm , DigestAlgorithm ... | try { return Signature . getInstance ( generateAlgorithm ( asymmetricAlgorithm , digestAlgorithm ) ) ; } catch ( NoSuchAlgorithmException e ) { throw new CryptoException ( e ) ; } |
public class MorcBuilder { /** * Add a set of processors to handle an outgoing exchange at a particular offset ( n ' th message )
* @ param index The exchange offset that these processors should be applied to
* @ param processors The processors that will handle populating the exchange with an appropriate outgoing v... | while ( index >= this . processors . size ( ) ) { this . processors . add ( new ArrayList < > ( ) ) ; } this . processors . get ( index ) . addAll ( new ArrayList < > ( Arrays . asList ( processors ) ) ) ; return self ( ) ; |
public class Tags { /** * Optimized version of { @ code String # split } that doesn ' t use regexps .
* This function works in O ( 5n ) where n is the length of the string to
* split .
* @ param s The string to split .
* @ param c The separator to use to split the string .
* @ return A non - null , non - empt... | final char [ ] chars = s . toCharArray ( ) ; int num_substrings = 1 ; for ( final char x : chars ) { if ( x == c ) { num_substrings ++ ; } } final String [ ] result = new String [ num_substrings ] ; final int len = chars . length ; int start = 0 ; // starting index in chars of the current substring .
int pos = 0 ; // c... |
public class JvmExecutableBuilder { @ Override public AnnotationVisitor visitAnnotationDefault ( ) { } } | return new JvmAnnotationValueBuilder ( proxies ) { int array = 0 ; @ Override public void visitEnd ( ) { if ( array == 0 ) { JvmOperation operation = ( JvmOperation ) JvmExecutableBuilder . this . result ; if ( result == null ) { if ( returnType . equals ( "()[Ljava/lang/Class;" ) ) { result = TypesFactory . eINSTANCE ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.