signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class PrcWageCopy { /** * < p > Process entity request . < / p >
* @ param pAddParam additional param , e . g . return this line ' s
* document in " nextEntity " for farther process
* @ param pRequestData Request Data
* @ param pEntity Entity to process
* @ return Entity processed for farther process o... | Wage entity = this . prcAccEntityPbCopy . process ( pAddParam , pEntity , pRequestData ) ; entity . setReversedId ( null ) ; entity . setItsTotal ( BigDecimal . ZERO ) ; entity . setItsDate ( new Date ( ) ) ; entity . setHasMadeAccEntries ( false ) ; entity . setTotalTaxesEmployer ( BigDecimal . ZERO ) ; entity . setTo... |
public class CmsAliasModeColumn { /** * Creates the options for the select box . < p >
* @ return the options for the select box */
public static List < String > createOptions ( ) { } } | List < String > result = new ArrayList < String > ( ) ; result . add ( nameLookup . get ( CmsAliasMode . permanentRedirect ) ) ; result . add ( nameLookup . get ( CmsAliasMode . redirect ) ) ; result . add ( nameLookup . get ( CmsAliasMode . page ) ) ; return result ; |
public class DriverLauncher { /** * Update job status and notify the waiting thread . */
public synchronized void setStatusAndNotify ( final LauncherStatus newStatus ) { } } | LOG . log ( Level . FINEST , "Set status: {0} -> {1}" , new Object [ ] { this . status , newStatus } ) ; this . status = newStatus ; this . notify ( ) ; |
public class CmsExtendedWorkflowManager { /** * Helper method for generating the workflow response which should be sent when publishing the resources would break relations . < p >
* @ param userCms the user ' s CMS context
* @ param publishResources the resources whose links would be broken
* @ return the workflo... | List < CmsWorkflowAction > actions = new ArrayList < CmsWorkflowAction > ( ) ; String forcePublishLabel = Messages . get ( ) . getBundle ( getLocale ( userCms ) ) . key ( Messages . GUI_WORKFLOW_ACTION_FORCE_PUBLISH_0 ) ; CmsWorkflowAction forcePublish = new CmsWorkflowAction ( ACTION_FORCE_PUBLISH , forcePublishLabel ... |
public class MonthDay { /** * Queries this month - day using the specified query .
* This queries this month - day using the specified query strategy object .
* The { @ code TemporalQuery } object defines the logic to be used to
* obtain the result . Read the documentation of the query to understand
* what the ... | if ( query == TemporalQueries . chronology ( ) ) { return ( R ) IsoChronology . INSTANCE ; } return super . query ( query ) ; |
public class MapExtractor { /** * { @ inheritDoc } */
public T extract ( Object target ) { } } | if ( target == null ) { return null ; } if ( ! ( target instanceof Map ) ) { throw new IllegalArgumentException ( "Extraction target is not a Map" ) ; } return ( T ) ( ( Map ) target ) . get ( key ) ; |
public class BaseDistribution { /** * { @ inheritDoc }
* The default implementation returns
* < ul >
* < li > { @ link # getSupportLowerBound ( ) } for { @ code p = 0 } , < / li >
* < li > { @ link # getSupportUpperBound ( ) } for { @ code p = 1 } . < / li >
* < / ul > */
@ Override public double inverseCumul... | /* * IMPLEMENTATION NOTES
* Where applicable , use is made of the one - sided Chebyshev inequality
* to bracket the root . This inequality states that
* P ( X - mu > = k * sig ) < = 1 / ( 1 + k ^ 2 ) ,
* mu : mean , sig : standard deviation . Equivalently
* 1 - P ( X < mu + k * sig ) < = 1 / ( 1 + k ^ 2 ) ,
... |
public class DefaultFaceletContext { /** * { @ inheritDoc } */
@ Override public void setAttribute ( String name , Object value ) { } } | if ( _varMapper != null ) { if ( value == null ) { _varMapper . setVariable ( name , null ) ; } else { _varMapper . setVariable ( name , _facelet . getExpressionFactory ( ) . createValueExpression ( value , Object . class ) ) ; } } |
public class Phenotype { /** * Return a new phenotype with the the genotype of this and with new
* fitness function , fitness scaler and generation .
* @ param generation the generation of the new phenotype .
* @ param function the ( new ) fitness scaler of the created phenotype .
* @ param scaler the ( new ) f... | return of ( _genotype , generation , function , scaler ) ; |
public class AbstractFilterButtons { /** * Insert the update icons next to the filter tags in target , distribution
* and software module tags / types tables */
public void addUpdateColumn ( ) { } } | if ( alreadyContainsColumn ( SPUIDefinitions . UPDATE_FILTER_BUTTON_COLUMN ) ) { return ; } deleteColumnIfVisible ( SPUIDefinitions . DELETE_FILTER_BUTTON_COLUMN ) ; addGeneratedColumn ( SPUIDefinitions . UPDATE_FILTER_BUTTON_COLUMN , ( source , itemId , columnId ) -> addUpdateCell ( itemId ) ) ; |
public class SnitchProperties { /** * Get a snitch property value or return defaultValue if not defined . */
public String get ( String propertyName , String defaultValue ) { } } | return properties . getProperty ( propertyName , defaultValue ) ; |
public class HystrixServoMetricsPublisherCollapser { /** * Servo will flatten metric names as : getServoTypeTag ( ) _ getServoInstanceTag ( ) _ monitorName
* An implementation note . If there ' s a version mismatch between hystrix - core and hystrix - servo - metric - publisher ,
* the code below may reference a Hy... | List < Monitor < ? > > monitors = new ArrayList < Monitor < ? > > ( ) ; monitors . add ( new InformationalMetric < String > ( MonitorConfig . builder ( "name" ) . build ( ) ) { @ Override public String getValue ( ) { return key . name ( ) ; } } ) ; // allow Servo and monitor to know exactly at what point in time these ... |
public class Parser { /** * Parse string to check presence of INSERT keyword regardless of case .
* @ param query char [ ] of the query statement
* @ param offset position of query to start checking
* @ return boolean indicates presence of word */
public static boolean parseInsertKeyword ( final char [ ] query , ... | if ( query . length < ( offset + 7 ) ) { return false ; } return ( query [ offset ] | 32 ) == 'i' && ( query [ offset + 1 ] | 32 ) == 'n' && ( query [ offset + 2 ] | 32 ) == 's' && ( query [ offset + 3 ] | 32 ) == 'e' && ( query [ offset + 4 ] | 32 ) == 'r' && ( query [ offset + 5 ] | 32 ) == 't' ; |
public class FeatureAttributeWindow { /** * Build the entire widget .
* @ param layer layer */
private void buildWidget ( VectorLayer layer ) { } } | mapModel = layer . getMapModel ( ) ; setTitle ( I18nProvider . getAttribute ( ) . getAttributeWindowTitle ( "" ) ) ; setCanDragReposition ( true ) ; setCanDragResize ( true ) ; attributeTable = new FeatureAttributeEditor ( layer , true , factory ) ; toolStrip = new ToolStrip ( ) ; toolStrip . setWidth100 ( ) ; toolStri... |
public class IabHelper { /** * Dispose of object , releasing resources . It ' s very important to call this
* method when you are done with this object . It will release any resources
* used by it such as service connections . Naturally , once the object is
* disposed of , it can ' t be used again . */
public voi... | logDebug ( "Disposing." ) ; mSetupDone = false ; if ( mServiceConn != null ) { logDebug ( "Unbinding from service." ) ; if ( mContext != null ) mContext . unbindService ( mServiceConn ) ; } mDisposed = true ; mContext = null ; mServiceConn = null ; mService = null ; mPurchaseListener = null ; |
public class Event { /** * Prevents the invocation of further handlers ( like { @ link # stop ( ) }
* and ( in addition ) the invocation of any added completed events .
* @ param mayInterruptIfRunning ignored
* @ return ` false ` if the event has already been completed
* @ see java . util . concurrent . Future ... | if ( ! completed && ! cancelled ) { stop ( ) ; cancelled = true ; return true ; } return false ; |
public class ParserAdapter { /** * Internal setup method .
* @ param parser The embedded parser .
* @ exception java . lang . NullPointerException If the parser parameter
* is null . */
private void setup ( Parser parser ) { } } | if ( parser == null ) { throw new NullPointerException ( "Parser argument must not be null" ) ; } this . parser = parser ; atts = new AttributesImpl ( ) ; nsSupport = new NamespaceSupport ( ) ; attAdapter = new AttributeListAdapter ( ) ; |
public class BaseScriptPlugin { /** * Create the command array for the data context .
* @ param localDataContext data
* @ return command array */
protected String [ ] createScriptArgs ( final Map < String , Map < String , String > > localDataContext ) { } } | final ScriptPluginProvider plugin = getProvider ( ) ; final File scriptfile = plugin . getScriptFile ( ) ; final String scriptargs = plugin . getScriptArgs ( ) ; final String [ ] scriptargsarray = plugin . getScriptArgsArray ( ) ; final String scriptinterpreter = plugin . getScriptInterpreter ( ) ; final boolean interp... |
public class Strs { /** * Search target string to find the first index of any string in the given string array
* @ param target
* @ param indexWith
* @ return */
public static int indexAny ( String target , String ... indexWith ) { } } | return indexAny ( target , 0 , Arrays . asList ( indexWith ) ) ; |
public class GossipManager { /** * Starts the client . Specifically , start the various cycles for this protocol . Start the gossip
* thread and start the receiver thread . */
public void run ( ) { } } | for ( LocalGossipMember member : members . keySet ( ) ) { if ( member != me ) { member . startTimeoutTimer ( ) ; } } try { passiveGossipThread = passiveGossipThreadClass . getConstructor ( GossipManager . class ) . newInstance ( this ) ; gossipThreadExecutor . execute ( passiveGossipThread ) ; activeGossipThread = acti... |
public class OWLOntologyID_CustomFieldSerializer { /** * Serializes the content of the object into the
* { @ link com . google . gwt . user . client . rpc . SerializationStreamWriter } .
* @ param streamWriter the { @ link com . google . gwt . user . client . rpc . SerializationStreamWriter } to write the
* objec... | serialize ( streamWriter , instance ) ; |
public class ClassWriter { /** * Given a symbol , return its name - and - type . */
NameAndType nameType ( Symbol sym ) { } } | return new NameAndType ( sym . name , sym . externalType ( types ) , types ) ; // the NameAndType is generated from a symbol reference , and the
// adjustment of adding an additional this $ n parameter needs to be made . |
public class WriterUtils { /** * Get the { @ link Path } corresponding the the relative file path for a given { @ link org . apache . gobblin . writer . DataWriter } .
* This method retrieves the value of { @ link ConfigurationKeys # WRITER _ FILE _ PATH } from the given { @ link State } . It also
* constructs the ... | if ( state . contains ( ForkOperatorUtils . getPropertyNameForBranch ( ConfigurationKeys . WRITER_FILE_PATH , numBranches , branchId ) ) ) { return new Path ( state . getProp ( ForkOperatorUtils . getPropertyNameForBranch ( ConfigurationKeys . WRITER_FILE_PATH , numBranches , branchId ) ) ) ; } switch ( getWriterFilePa... |
public class SBaseButton { /** * Get the best guess for the command name .
* This is usually used to get the command to perform for a canned button .
* @ return The button command ( or the best guess for the command ) . */
public String getButtonCommand ( ) { } } | String strCommand = m_strCommand ; if ( strCommand == null ) strCommand = this . getButtonDesc ( ) ; if ( ( strCommand == null ) || ( strCommand . equals ( Constants . BLANK ) ) ) strCommand = m_strImageButton ; // Use image name until the image is loaded
return strCommand ; |
public class Cache { /** * 存放 key value 对到 redis , 并将 key 的生存时间设为 seconds ( 以秒为单位 ) 。
* 如果 key 已经存在 , SETEX 命令将覆写旧值 。 */
public String setex ( Object key , int seconds , Object value ) { } } | Jedis jedis = getJedis ( ) ; try { return jedis . setex ( keyToBytes ( key ) , seconds , valueToBytes ( value ) ) ; } finally { close ( jedis ) ; } |
public class inat { /** * Use this API to update inat resources . */
public static base_responses update ( nitro_service client , inat resources [ ] ) throws Exception { } } | base_responses result = null ; if ( resources != null && resources . length > 0 ) { inat updateresources [ ] = new inat [ resources . length ] ; for ( int i = 0 ; i < resources . length ; i ++ ) { updateresources [ i ] = new inat ( ) ; updateresources [ i ] . name = resources [ i ] . name ; updateresources [ i ] . priv... |
public class PushbuttonField { /** * Gets the button appearance .
* @ throws IOException on error
* @ throws DocumentException on error
* @ return the button appearance */
public PdfAppearance getAppearance ( ) throws IOException , DocumentException { } } | PdfAppearance app = getBorderAppearance ( ) ; Rectangle box = new Rectangle ( app . getBoundingBox ( ) ) ; if ( ( text == null || text . length ( ) == 0 ) && ( layout == LAYOUT_LABEL_ONLY || ( image == null && template == null && iconReference == null ) ) ) { return app ; } if ( layout == LAYOUT_ICON_ONLY && image == n... |
public class CompressionUtil { /** * Decode lz to string string .
* @ param data the data
* @ param dictionary the dictionary
* @ return the string */
public static String decodeLZToString ( byte [ ] data , String dictionary ) { } } | try { return new String ( decodeLZ ( data ) , "UTF-8" ) ; } catch ( UnsupportedEncodingException e ) { throw new RuntimeException ( e ) ; } |
public class PlanNode { /** * Remove all children from this node . All nodes immediately become orphaned . The resulting list will be mutable .
* @ return a copy of all the of the children that were removed ( and which have no parent ) ; never null */
public List < PlanNode > removeAllChildren ( ) { } } | if ( this . children . isEmpty ( ) ) { return new ArrayList < PlanNode > ( 0 ) ; } List < PlanNode > copyOfChildren = new ArrayList < PlanNode > ( this . children ) ; for ( Iterator < PlanNode > childIter = this . children . iterator ( ) ; childIter . hasNext ( ) ; ) { PlanNode child = childIter . next ( ) ; childIter ... |
public class StringUtil { /** * Converts a comma - separated String to an array of doubles .
* @ param pString The comma - separated string
* @ param pDelimiters The delimiter string
* @ return a { @ code double } array
* @ throws NumberFormatException if any of the elements are not parseable
* as a double */... | if ( isEmpty ( pString ) ) { return new double [ 0 ] ; } // Some room for improvement here . . .
String [ ] temp = toStringArray ( pString , pDelimiters ) ; double [ ] array = new double [ temp . length ] ; for ( int i = 0 ; i < array . length ; i ++ ) { array [ i ] = Double . valueOf ( temp [ i ] ) ; // Double . parse... |
public class RTED_InfoTree_Opt { /** * Initialization method .
* @ param t1
* @ param t2 */
public void init ( LblTree t1 , LblTree t2 ) { } } | LabelDictionary ld = new LabelDictionary ( ) ; it1 = new InfoTree ( t1 , ld ) ; it2 = new InfoTree ( t2 , ld ) ; size1 = it1 . getSize ( ) ; size2 = it2 . getSize ( ) ; IJ = new int [ Math . max ( size1 , size2 ) ] [ Math . max ( size1 , size2 ) ] ; delta = new double [ size1 ] [ size2 ] ; deltaBit = new byte [ size1 ]... |
public class AsianOption { /** * This method returns the value random variable of the product within the specified model , evaluated at a given evalutationTime .
* Note : For a lattice this is often the value conditional to evalutationTime , for a Monte - Carlo simulation this is the ( sum of ) value discounted to ev... | // Calculate average
RandomVariableInterface average = model . getRandomVariableForConstant ( 0.0 ) ; for ( double time : timesForAveraging ) { RandomVariableInterface underlying = model . getAssetValue ( time , underlyingIndex ) ; average = average . add ( underlying ) ; } average = average . div ( timesForAveraging .... |
public class ThemeUtil { /** * Obtains the text , which corresponds to a specific resource id , from a context ' s theme . If the
* given resource id is invalid , a { @ link NotFoundException } will be thrown .
* @ param context
* The context , which should be used , as an instance of the class { @ link Context }... | return getText ( context , - 1 , resourceId ) ; |
public class IdlToDSMojo { /** * Various steps needing to be done for each IDD */
private void processService ( Service service ) throws Exception { } } | getLog ( ) . info ( " Service: " + service . getServiceName ( ) ) ; Document iddDoc = parseIddFile ( service . getServiceName ( ) ) ; // 1 . validate
if ( ! isOffline ( ) ) { getLog ( ) . debug ( "Validating XML.." ) ; new XmlValidator ( resolver ) . validate ( iddDoc ) ; } // 2 . generate outputs
generateJavaCode ( s... |
public class Node { /** * Inserts a Sibling into the linked list just prior to this Node
* @ param node Node to be made the prevSibling */
public void insertSiblingBefore ( Node node ) throws ChildNodeException { } } | if ( node != null ) { node . setPrevSibling ( getPrevSibling ( ) ) ; node . setNextSibling ( this ) ; } |
public class Boxing { /** * Transforms any array into an array of { @ code short } .
* @ param src source array
* @ param srcPos start position
* @ param len length
* @ return short array */
public static short [ ] unboxShorts ( Object src , int srcPos , int len ) { } } | return unboxShorts ( array ( src ) , srcPos , len ) ; |
public class ListValidationEditor { /** * Sets the ListEditor ' s backing data .
* If a null is passed in , the ListEditor will have no backing list and edits cannot be made .
* @ param value a List of data objects of type T */
@ Override public void setValue ( final List < T > value ) { } } | if ( list == null && value == null ) { // fast exit
return ; } if ( list != null && list . isSameValue ( value ) ) { // setting the same value as the one being edited
list . refresh ( ) ; return ; } if ( list != null ) { // Having entire value reset , so dump the wrapper gracefully
list . detach ( ) ; } if ( value == n... |
public class UriTemplate { /** * Creates a new { @ link UriTemplate } with the current { @ link TemplateVariable } s augmented with the given ones .
* @ param variables must not be { @ literal null } .
* @ return will never be { @ literal null } . */
public UriTemplate with ( TemplateVariables variables ) { } } | Assert . notNull ( variables , "TemplateVariables must not be null!" ) ; if ( variables . equals ( TemplateVariables . NONE ) ) { return this ; } UriComponents components = UriComponentsBuilder . fromUriString ( baseUri ) . build ( ) ; List < TemplateVariable > result = new ArrayList < > ( ) ; for ( TemplateVariable va... |
public class HierarchicalContextRunner { /** * Returns a { @ link TestClassValidator } that validates the { @ link TestClass } instance after the
* { @ link HierarchicalContextRunner } has been created for the corresponding { @ link Class } . To use multiple
* { @ link TestClassValidator } s , please use the { @ li... | return BooleanValidator . AND ( ConstructorValidator . VALID_CONSTRUCTOR , BooleanValidator . OR ( ChildrenCountValidator . CONTEXT_HIERARCHIES , ChildrenCountValidator . TEST_METHODS ) , FixtureValidator . BEFORE_CLASS_METHODS , FixtureValidator . AFTER_CLASS_METHODS , FixtureValidator . BEFORE_METHODS , FixtureValida... |
public class CopyFieldHandler { /** * Constructor .
* @ param field The basefield owner of this listener ( usually null and set on setOwner ( ) ) .
* @ param iFieldSeq The field sequence in this record to move this listener ' s field to .
* @ param field The field to move this listener ' s field to .
* @ param ... | BaseField fldSource = null ; boolean bClearIfThisNull = true ; boolean bOnlyIfDestNull = false ; boolean bDontMoveNull = false ; super . init ( field , fldDest , fldSource , bClearIfThisNull , bOnlyIfDestNull , bDontMoveNull ) ; this . setRespondsToMode ( DBConstants . INIT_MOVE , false ) ; // By default , only respond... |
public class HlsGroupSettings { /** * Choose one or more ad marker types to pass SCTE35 signals through to this group of Apple HLS outputs .
* @ param adMarkers
* Choose one or more ad marker types to pass SCTE35 signals through to this group of Apple HLS outputs .
* @ return Returns a reference to this object so... | java . util . ArrayList < String > adMarkersCopy = new java . util . ArrayList < String > ( adMarkers . length ) ; for ( HlsAdMarkers value : adMarkers ) { adMarkersCopy . add ( value . toString ( ) ) ; } if ( getAdMarkers ( ) == null ) { setAdMarkers ( adMarkersCopy ) ; } else { getAdMarkers ( ) . addAll ( adMarkersCo... |
public class S3ResourceClassificationMarshaller { /** * Marshall the given parameter object . */
public void marshall ( S3ResourceClassification s3ResourceClassification , ProtocolMarshaller protocolMarshaller ) { } } | if ( s3ResourceClassification == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( s3ResourceClassification . getBucketName ( ) , BUCKETNAME_BINDING ) ; protocolMarshaller . marshall ( s3ResourceClassification . getPrefix ( ) , PREFIX_BINDING ... |
public class Token { /** * Creates a token that represents an identifier . */
public static Token newIdentifier ( String text , int startLine , int startColumn ) { } } | return new Token ( Types . IDENTIFIER , text , startLine , startColumn ) ; |
public class CommerceTaxFixedRateAddressRelPersistenceImpl { /** * Returns a range of all the commerce tax fixed rate address rels where commerceTaxMethodId = & # 63 ; .
* Useful when paginating results . Returns a maximum of < code > end - start < / code > instances . < code > start < / code > and < code > end < / c... | return findByCommerceTaxMethodId ( commerceTaxMethodId , start , end , null ) ; |
public class Session { /** * Forces some user to unpublish a Stream . OpenVidu Browser will trigger the
* proper events on the client - side ( < code > streamDestroyed < / code > ) with reason
* set to " forceUnpublishByServer " . < br >
* You can get < code > streamId < / code > parameter with
* { @ link io . ... | HttpDelete request = new HttpDelete ( OpenVidu . urlOpenViduServer + OpenVidu . API_SESSIONS + "/" + this . sessionId + "/stream/" + streamId ) ; request . setHeader ( HttpHeaders . CONTENT_TYPE , "application/x-www-form-urlencoded" ) ; HttpResponse response ; try { response = OpenVidu . httpClient . execute ( request ... |
public class MemoryCache { /** * Empty the reference queue and remove all corresponding entries
* from the cache .
* This method should be called at the beginning of each public
* method . */
private void emptyQueue ( ) { } } | if ( queue == null ) { return ; } int startSize = cacheMap . size ( ) ; while ( true ) { @ SuppressWarnings ( "unchecked" ) CacheEntry < K , V > entry = ( CacheEntry < K , V > ) queue . poll ( ) ; if ( entry == null ) { break ; } K key = entry . getKey ( ) ; if ( key == null ) { // key is null , entry has already been ... |
public class VortexWorkerManager { /** * Sends an { @ link VortexAggregateFunction } and its { @ link VortexFunction } to a
* { @ link org . apache . reef . vortex . evaluator . VortexWorker } . */
< TInput , TOutput > void sendAggregateFunction ( final int aggregateFunctionId , final VortexAggregateFunction < TOutpu... | final TaskletAggregationRequest < TInput , TOutput > taskletAggregationRequest = new TaskletAggregationRequest < > ( aggregateFunctionId , aggregateFunction , function , policy ) ; // The send is synchronous such that we make sure that the aggregate function is sent to the
// target worker before attempting to launch a... |
public class ExitStandbyResult { /** * The activities related to moving instances out of < code > Standby < / code > mode .
* @ param activities
* The activities related to moving instances out of < code > Standby < / code > mode . */
public void setActivities ( java . util . Collection < Activity > activities ) { ... | if ( activities == null ) { this . activities = null ; return ; } this . activities = new com . amazonaws . internal . SdkInternalList < Activity > ( activities ) ; |
public class BogusSslContextFactory { /** * Get SSLContext singleton .
* @ return SSLContext
* @ throws java . security . GeneralSecurityException */
public static SSLContext getInstance ( boolean server ) throws GeneralSecurityException { } } | SSLContext retInstance = null ; if ( server ) { if ( serverInstance == null ) { synchronized ( BogusSslContextFactory . class ) { if ( serverInstance == null ) { try { serverInstance = createBougusServerSslContext ( ) ; } catch ( Exception ioe ) { throw new GeneralSecurityException ( "Can't create Server SSLContext:" +... |
public class QuickConstructorGenerator { /** * Returns a factory instance for one type of object . Each method in the
* interface defines a constructor via its parameters . Any checked
* exceptions declared thrown by the constructor must also be declared by
* the method . The method return types can be the same t... | Cache < Class < ? > , Object > innerCache = cCache . get ( factory ) ; if ( innerCache == null ) { innerCache = new SoftValueCache ( 5 ) ; cCache . put ( factory , innerCache ) ; } F instance = ( F ) innerCache . get ( objectType ) ; if ( instance != null ) { return instance ; } if ( objectType == null ) { throw new Il... |
public class ClassPath { /** * Load all classes in the fileJar
* @ param fileJar
* @ throws IOException */
public void loadJar ( File fileJar ) throws IOException { } } | JarFile jar = null ; try { jar = new JarFile ( fileJar ) ; Enumeration < JarEntry > enumerations = jar . entries ( ) ; JarEntry entry = null ; byte [ ] classByte = null ; ByteArrayOutputStream byteStream = null ; String fileName = null ; String className = null ; Class < ? > jarClass = null ; while ( enumerations . has... |
public class DataTable { /** * Creates a new instance with the given column setup . At least one column
* must be specified in the table . Rows are allowed to be empty .
* Columns should be unique , but the table doesn ' t enforce this .
* @ param columns columns for the table
* @ return new DataTable
* @ thr... | List < DataColumn > list = new ArrayList < DataColumn > ( ) ; for ( String column : columns ) { list . add ( new DataColumn ( column ) ) ; } return new DataTable ( list ) ; |
public class GenericResponses { /** * Create a new { @ link GenericResponseBuilder } for a not acceptable response .
* @ param variants list of variants that were available
* @ return a new builder */
public static < T > GenericResponseBuilder < T > notAcceptable ( List < Variant > variants ) { } } | return GenericResponses . < T > status ( Response . Status . NOT_ACCEPTABLE ) . variants ( variants ) ; |
public class WaveformRender { /** * Render a waveform of a wave file
* @ param wave Wave object
* @ param timeStep time interval in second , as known as 1 / fps
* @ see RGB graphic rendered */
public BufferedImage renderWaveform ( Wave wave , int width ) { } } | // for signed signals , the middle is 0 ( - 1 ~ 1)
double middleLine = 0 ; // usually 8bit is unsigned
if ( wave . getWaveHeader ( ) . getBitsPerSample ( ) == 8 ) { // for unsigned signals , the middle is 0.5 ( 0 ~ 1)
middleLine = 0.5 ; } double [ ] nAmplitudes = wave . getNormalizedAmplitudes ( ) ; // int width = ( in... |
public class ApiUtil { public static String [ ] toStringArray ( final String objname , final DbAttribute [ ] attributes , final int mode ) { } } | final int nb_attr = attributes . length ; // Copy object name and nb attrib to String array
final ArrayList < String > list = new ArrayList < String > ( ) ; list . add ( objname ) ; list . add ( Integer . toString ( nb_attr ) ) ; for ( DbAttribute attribute : attributes ) { // Copy Attrib name and nb prop to String arr... |
public class UITextFormatter { /** * Process the provided String as Markdown and return the created IHCNode .
* @ param sMD
* The Markdown source to be invoked . May be < code > null < / code > .
* @ return Either the processed markdown code or in case of an internal error
* a { @ link HCTextNode } which contai... | try { final HCNodeList aNL = MARKDOWN_PROC . process ( sMD ) . getNodeList ( ) ; // Replace a single < p > element with its contents
if ( aNL . getChildCount ( ) == 1 && aNL . getChildAtIndex ( 0 ) instanceof HCP ) return ( ( HCP ) aNL . getChildAtIndex ( 0 ) ) . getAllChildrenAsNodeList ( ) ; return aNL ; } catch ( fi... |
public class CompositeELResolver { /** * Attemps to resolve and invoke the given < code > method < / code > on the given
* < code > base < / code > object by querying all component resolvers .
* < p > If this resolver handles the given ( base , method ) pair ,
* the < code > propertyResolved < / code > property o... | context . setPropertyResolved ( false ) ; Object value ; for ( int i = 0 ; i < size ; i ++ ) { value = elResolvers [ i ] . invoke ( context , base , method , paramTypes , params ) ; if ( context . isPropertyResolved ( ) ) { return value ; } } return null ; |
public class HandTemplateDevice { /** * This method is called using JNI */
public void processData ( ) { } } | // get number of hands
float handNum = readbackBuffer . get ( 0 ) ; int count = 1 ; boolean rightHandProcessed = false ; boolean leftHandProcessed = false ; for ( int handCount = 0 ; handCount < handNum ; handCount ++ ) { IOHand ioHand ; HandIODevice device ; if ( handCount == 0 ) { ioHand = rightHand ; device = rightD... |
public class RGraph { /** * Builds the initial extension set . This is the
* set of node that may be used as seed for the
* RGraph parsing . This set depends on the constrains
* defined by the user .
* @ param c1 constraint in the graph G1
* @ param c2 constraint in the graph G2
* @ return the new extension... | this . c1 = c1 ; this . c2 = c2 ; BitSet bs = new BitSet ( ) ; // only nodes that fulfill the initial constrains
// are allowed in the initial extension set : B
for ( Iterator < RNode > i = graph . iterator ( ) ; i . hasNext ( ) ; ) { RNode rn = i . next ( ) ; if ( ( c1 . get ( rn . rMap . id1 ) || c1 . isEmpty ( ) ) &... |
public class JWTUtils { /** * Helper method to create a JWT token for the JWT flow
* @ param publicKeyFilename the filename of the RSA public key
* @ param privateKeyFilename the filename of the RSA private key
* @ param oAuthBasePath DocuSign OAuth base path ( account - d . docusign . com for the developer sandb... | String token = null ; if ( expiresIn <= 0L ) { throw new IllegalArgumentException ( "expiresIn should be a non-negative value" ) ; } if ( publicKeyFilename == null || "" . equals ( publicKeyFilename ) || privateKeyFilename == null || "" . equals ( privateKeyFilename ) || oAuthBasePath == null || "" . equals ( oAuthBase... |
public class ImageMath { /** * A variant of the gamma function .
* @ param a the number to apply gain to
* @ param b the gain parameter . 0.5 means no change , smaller values reduce gain , larger values increase gain .
* @ return the output value */
public static float gain ( float a , float b ) { } } | /* float p = ( float ) Math . log ( 1.0 - b ) / ( float ) Math . log ( 0.5 ) ;
if ( a < . 001)
return 0.0f ;
else if ( a > . 999)
return 1.0f ;
if ( a < 0.5)
return ( float ) Math . pow ( 2 * a , p ) / 2;
else
return 1.0f - ( float ) Math . pow ( 2 * ( 1 . - a ) , p ) / 2; */
float c = ( 1.0f / b - 2.0f... |
public class EventServiceImpl { /** * { @ inheritDoc }
* If the execution is rejected , the rejection count is increased and a failure is logged .
* The event callback is not re - executed .
* @ param callback the callback to execute on a random event thread */
@ Override public void executeEventCallback ( Runnab... | if ( ! nodeEngine . isRunning ( ) ) { return ; } try { eventExecutor . execute ( callback ) ; } catch ( RejectedExecutionException e ) { rejectedCount . inc ( ) ; if ( eventExecutor . isLive ( ) ) { logFailure ( "EventQueue overloaded! Failed to execute event callback: %s" , callback ) ; } } |
public class ServiceImplBeanType { /** * { @ inheritDoc } */
@ Override public void describe ( Diagnostics diag ) { } } | diag . describeIfSet ( "ejb-link" , ejb_link ) ; diag . describeIfSet ( "servlet-link" , servlet_link ) ; |
public class LongPipeline { /** * Stateless intermediate ops from LongStream */
@ Override public final DoubleStream asDoubleStream ( ) { } } | return new DoublePipeline . StatelessOp < Long > ( this , StreamShape . LONG_VALUE , StreamOpFlag . NOT_SORTED | StreamOpFlag . NOT_DISTINCT ) { @ Override public Sink < Long > opWrapSink ( int flags , Sink < Double > sink ) { return new Sink . ChainedLong < Double > ( sink ) { @ Override public void accept ( long t ) ... |
public class UsingInstrumentation { /** * Creates an instrumentation - based class injector .
* @ param folder The folder to be used for storing jar files .
* @ param target A representation of the target path to which classes are to be appended .
* @ param instrumentation The instrumentation to use for appending... | return new UsingInstrumentation ( folder , target , instrumentation , new RandomString ( ) ) ; |
public class SivMode { /** * Convenience method , if you are using the javax . crypto API . This is just a wrapper for { @ link # encrypt ( byte [ ] , byte [ ] , byte [ ] , byte [ ] . . . ) } .
* @ param ctrKey SIV mode requires two separate keys . You can use one long key , which is splitted in half . See https : / ... | final byte [ ] ctrKeyBytes = ctrKey . getEncoded ( ) ; final byte [ ] macKeyBytes = macKey . getEncoded ( ) ; if ( ctrKeyBytes == null || macKeyBytes == null ) { throw new IllegalArgumentException ( "Can't get bytes of given key." ) ; } try { return encrypt ( ctrKeyBytes , macKeyBytes , plaintext , associatedData ) ; }... |
public class RequestServer { /** * Top - level dispatch handling */
public void doGeneric ( String method , HttpServletRequest request , HttpServletResponse response ) { } } | try { ServletUtils . startTransaction ( request . getHeader ( "User-Agent" ) ) ; // Note that getServletPath does an un - escape so that the % 24 of job id ' s are turned into $ characters .
String uri = request . getServletPath ( ) ; Properties headers = new Properties ( ) ; Enumeration < String > en = request . getHe... |
public class HtmlEncoder { /** * Translates the alignment value .
* @ param alignment the alignment value
* @ return the translated value */
public static String getAlignment ( int alignment ) { } } | switch ( alignment ) { case Element . ALIGN_LEFT : return HtmlTags . ALIGN_LEFT ; case Element . ALIGN_CENTER : return HtmlTags . ALIGN_CENTER ; case Element . ALIGN_RIGHT : return HtmlTags . ALIGN_RIGHT ; case Element . ALIGN_JUSTIFIED : case Element . ALIGN_JUSTIFIED_ALL : return HtmlTags . ALIGN_JUSTIFIED ; case Ele... |
public class Utf8Util { /** * Custom UTF - 8 encoding . Generates UTF - 8 byte sequence for the specified char [ ] . The UTF - 8 byte sequence is
* encoded in the specified ByteBuffer .
* @ param srcBuf the source char [ ] to be encoded as UTF - 8 byte sequence
* @ param srcOffset offset in the char [ ] from wher... | int destMark = destOffset ; for ( int i = srcOffset ; i < srcLength ; ) { char ch = srcBuf [ i ] ; if ( ch < 0x0080 ) { dest . put ( destOffset ++ , ( byte ) ch ) ; } else if ( ch < 0x0800 ) { dest . put ( destOffset ++ , ( byte ) ( 0xc0 | ( ch >> 6 ) ) ) ; dest . put ( destOffset ++ , ( byte ) ( 0x80 | ( ( ch >> 0 ) &... |
public class JSON { /** * parse json .
* @ param reader json source .
* @ param types target type array .
* @ return result .
* @ throws IOException
* @ throws ParseException */
public static Object [ ] parse ( Reader reader , Class < ? > [ ] types , Converter < Object , Map < String , Object > > mc ) throws ... | return ( Object [ ] ) parse ( reader , new JSONVisitor ( types , new JSONValue ( mc ) ) , JSONToken . LSQUARE ) ; |
public class SiftDetector { /** * Detects SIFT features inside the input image
* @ param input Input image . Not modified . */
public void process ( GrayF32 input ) { } } | scaleSpace . initialize ( input ) ; detections . reset ( ) ; do { // scale from octave to input image
pixelScaleToInput = scaleSpace . pixelScaleCurrentToInput ( ) ; // detect features in the image
for ( int j = 1 ; j < scaleSpace . getNumScales ( ) + 1 ; j ++ ) { // not really sure how to compute the scale for feature... |
public class AbstractValidate { /** * < p > Validate that the specified argument iterable is neither { @ code null } nor contains any elements that are { @ code null } ; otherwise throwing an exception with the specified message . < / p >
* < pre > Validate . noNullElements ( myCollection , " The collection contains ... | notNull ( iterable ) ; final int index = indexOfNullElement ( iterable ) ; if ( index != - 1 ) { fail ( String . format ( message , ArrayUtils . addAll ( this , values , index ) ) ) ; } return iterable ; |
public class Security { /** * Returns an array containing all installed providers that satisfy the
* specified selection criterion , or null if no such providers have been
* installed . The returned providers are ordered
* according to their < a href =
* " # insertProviderAt ( java . security . Provider , int )... | String key = null ; String value = null ; int index = filter . indexOf ( ':' ) ; if ( index == - 1 ) { key = filter ; value = "" ; } else { key = filter . substring ( 0 , index ) ; value = filter . substring ( index + 1 ) ; } Hashtable < String , String > hashtableFilter = new Hashtable < > ( 1 ) ; hashtableFilter . pu... |
public class ContentSpec { /** * Set the BookVersion of the Book the Content Specification represents .
* @ param bookVersion The Book Version . */
public void setBookVersion ( final String bookVersion ) { } } | if ( bookVersion == null && this . bookVersion == null ) { return ; } else if ( bookVersion == null ) { removeChild ( this . bookVersion ) ; this . bookVersion = null ; } else if ( this . bookVersion == null ) { this . bookVersion = new KeyValueNode < String > ( CommonConstants . CS_BOOK_VERSION_TITLE , bookVersion ) ;... |
public class SqlAgentFactoryImpl { /** * { @ inheritDoc }
* @ see jp . co . future . uroborosql . SqlAgentFactory # setDefaultMapKeyCaseFormat ( jp . co . future . uroborosql . utils . CaseFormat ) */
@ Override public SqlAgentFactory setDefaultMapKeyCaseFormat ( final CaseFormat defaultMapKeyCaseFormat ) { } } | getDefaultProps ( ) . put ( PROPS_KEY_DEFAULT_MAP_KEY_CASE_FORMAT , defaultMapKeyCaseFormat . toString ( ) ) ; return this ; |
public class RecognizerErrorHandler { /** * Simplify error message text for end users .
* @ param e exception that occurred
* @ param msg as formatted by ANTLR
* @ return a more readable error message */
public static String makeUserMsg ( final RecognitionException e , final String msg ) { } } | if ( e instanceof NoViableAltException ) { return msg . replace ( "no viable alternative at" , "unrecognized" ) ; } else if ( e instanceof UnwantedTokenException ) { return msg . replace ( "extraneous input" , "unexpected token" ) ; } else if ( e instanceof MismatchedTokenException ) { if ( msg . contains ( "mismatched... |
public class PlotBoxTLSmall { /** * Get a buffered image of this chart
* @ param width The width of the image
* @ param height The height of the image
* @ return A buffered image of this chart . */
public BufferedImage getBufferedImage ( int width , int height ) { } } | BufferedImage bi = chart . createBufferedImage ( width , height ) ; return bi ; |
public class SettingLoader { /** * 加载设置文件
* @ param urlResource 配置文件URL
* @ return 加载是否成功 */
public boolean load ( UrlResource urlResource ) { } } | if ( urlResource == null ) { throw new NullPointerException ( "Null setting url define!" ) ; } log . debug ( "Load setting file [{}]" , urlResource ) ; InputStream settingStream = null ; try { settingStream = urlResource . getStream ( ) ; load ( settingStream ) ; } catch ( Exception e ) { log . error ( e , "Load settin... |
public class DestinationManager { /** * Returns the topicSpaceName of the foreign topicSpace
* @ param String The busname of the foreign TS
* @ param SIBUuid12 The uuid of the TS on this bus
* @ return String The foreign TS name */
public String getTopicSpaceMapping ( String busName , SIBUuid12 topicSpace ) { } } | if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getTopicSpaceMapping" , new Object [ ] { busName , topicSpace } ) ; VirtualLinkDefinition linkDef = getLinkDefinition ( busName ) ; // this is only called internally so we shall include invisible dests in the lookup
String ... |
public class CoffeeScriptCompilerMojo { /** * Finds and compiles coffeescript files .
* @ throws MojoExecutionException if the compilation failed . */
@ Override public void execute ( ) throws MojoExecutionException { } } | coffee = npm ( this , COFFEE_SCRIPT_NPM_NAME , coffeeScriptVersion ) ; try { if ( getInternalAssetsDirectory ( ) . isDirectory ( ) ) { getLog ( ) . info ( "Compiling CoffeeScript files from " + getInternalAssetsDirectory ( ) . getAbsolutePath ( ) ) ; invokeCoffeeScriptCompiler ( getInternalAssetsDirectory ( ) , getInte... |
public class AssetServicesImpl { /** * Create a new asset ( version 1 ) on the file system . */
public void createAsset ( String path , byte [ ] content ) throws ServiceException { } } | int lastSlash = path . lastIndexOf ( '/' ) ; File assetFile = new File ( assetRoot + "/" + path . substring ( 0 , lastSlash ) . replace ( '.' , '/' ) + path . substring ( lastSlash ) ) ; try { FileHelper . writeToFile ( new ByteArrayInputStream ( content ) , assetFile ) ; AssetRevision rev = new AssetRevision ( ) ; rev... |
public class PostTextResult { /** * A map of key - value pairs representing the session - specific context information .
* @ param sessionAttributes
* A map of key - value pairs representing the session - specific context information .
* @ return Returns a reference to this object so that method calls can be chai... | setSessionAttributes ( sessionAttributes ) ; return this ; |
public class PrcItemSpecificsRetrieve { /** * < p > Process entity request . < / p >
* @ param pReqVars additional request scoped vars
* document in " nextEntity " for farther process
* @ param pRequestData Request Data
* @ param pEntity Entity to process
* @ return Entity processed for farther process or nul... | AItemSpecifics < T , ID > entity = this . prcEntityRetrieve . process ( pReqVars , pEntity , pRequestData ) ; if ( entity . getSpecifics ( ) . getItsType ( ) != null && entity . getSpecifics ( ) . getItsType ( ) . equals ( ESpecificsItemType . BIGDECIMAL ) ) { if ( entity . getNumericValue1 ( ) == null ) { entity . set... |
public class GSMBitPacker { /** * Unpack a byte array according to the GSM bit - packing algorithm .
* Read the full description in the documentation of the
* < code > pack < / code > method .
* @ see # pack ( byte [ ] )
* @ param packed The packed byte array .
* @ return A new byte array containing the unpac... | if ( packed == null ) { return null ; } int unpackedLen = ( packed . length * 8 ) / 7 ; byte [ ] unpacked = new byte [ unpackedLen ] ; int len = unpacked . length ; int current = 0 ; int bitpos = 0 ; for ( int i = 0 ; i < len ; i ++ ) { // remove top bit and assign first half of partial bits
unpacked [ i ] = ( byte ) (... |
public class Stats { /** * Any provider that may be used for StatsComponent can be added here . */
@ DefaultVisibilityForTesting static StatsComponent loadStatsComponent ( @ Nullable ClassLoader classLoader ) { } } | try { // Call Class . forName with literal string name of the class to help shading tools .
return Provider . createInstance ( Class . forName ( "io.opencensus.impl.stats.StatsComponentImpl" , /* initialize = */
true , classLoader ) , StatsComponent . class ) ; } catch ( ClassNotFoundException e ) { logger . log ( Leve... |
public class DateCaster { /** * converts the given string to a date following simple and fast parsing rules ( no international
* formats )
* @ param str
* @ param convertingType one of the following values : - CONVERTING _ TYPE _ NONE : number are not
* converted at all - CONVERTING _ TYPE _ YEAR : integers are... | str = StringUtil . trim ( str , "" ) ; DateString ds = new DateString ( str ) ; // Timestamp
if ( ds . isCurrent ( '{' ) && ds . isLast ( '}' ) ) { return _toDateSimpleTS ( ds , timeZone , defaultValue ) ; } DateTime res = parseDateTime ( str , ds , convertingType , alsoMonthString , timeZone , defaultValue ) ; if ( re... |
public class CommerceSubscriptionEntryPersistenceImpl { /** * Returns a range of all the commerce subscription entries where subscriptionStatus = & # 63 ; .
* Useful when paginating results . Returns a maximum of < code > end - start < / code > instances . < code > start < / code > and < code > end < / code > are not... | return findBySubscriptionStatus ( subscriptionStatus , start , end , null ) ; |
public class SpanContextUtil { /** * Adds logging tags to the provided { @ link Span } and closes it when the log is finished .
* The span cannot be used further after this method has been called . */
public static void closeSpan ( Span span , RequestLog log ) { } } | SpanTags . addTags ( span , log ) ; span . finish ( wallTimeMicros ( log , log . responseEndTimeNanos ( ) ) ) ; |
public class AmazonIdentityManagementClient { /** * Adds or updates an inline policy document that is embedded in the specified IAM role .
* When you embed an inline policy in a role , the inline policy is used as part of the role ' s access ( permissions )
* policy . The role ' s trust policy is created at the sam... | request = beforeClientExecution ( request ) ; return executePutRolePolicy ( request ) ; |
public class MatrixFeatures_DDRM { /** * Checks to see if a matrix is orthogonal or isometric .
* @ param Q The matrix being tested . Not modified .
* @ param tol Tolerance .
* @ return True if it passes the test . */
public static boolean isOrthogonal ( DMatrixRMaj Q , double tol ) { } } | if ( Q . numRows < Q . numCols ) { throw new IllegalArgumentException ( "The number of rows must be more than or equal to the number of columns" ) ; } DMatrixRMaj u [ ] = CommonOps_DDRM . columnsToVector ( Q , null ) ; for ( int i = 0 ; i < u . length ; i ++ ) { DMatrixRMaj a = u [ i ] ; for ( int j = i + 1 ; j < u . l... |
public class FloatArray { /** * ( non - Javadoc )
* @ see java . util . AbstractList # addAll ( int , java . util . Collection ) */
@ Override public boolean addAll ( int index , Collection < ? extends Float > c ) { } } | if ( index < 0 || index > size ) { throw new IndexOutOfBoundsException ( ) ; } ensureCapacity ( size + c . size ( ) ) ; size += c . size ( ) ; for ( int i = size + c . size ( ) - 1 , j = size - 1 ; j >= index ; i -- , j -- ) { elements [ i ] = elements [ j ] ; } for ( float e : c ) { elements [ index ++ ] = e ; } retur... |
public class CPDefinitionInventoryPersistenceImpl { /** * Returns the cp definition inventory where uuid = & # 63 ; and groupId = & # 63 ; or throws a { @ link NoSuchCPDefinitionInventoryException } if it could not be found .
* @ param uuid the uuid
* @ param groupId the group ID
* @ return the matching cp defini... | CPDefinitionInventory cpDefinitionInventory = fetchByUUID_G ( uuid , groupId ) ; if ( cpDefinitionInventory == null ) { StringBundler msg = new StringBundler ( 6 ) ; msg . append ( _NO_SUCH_ENTITY_WITH_KEY ) ; msg . append ( "uuid=" ) ; msg . append ( uuid ) ; msg . append ( ", groupId=" ) ; msg . append ( groupId ) ; ... |
public class AppServiceEnvironmentsInner { /** * Create or update a worker pool .
* Create or update a worker pool .
* @ param resourceGroupName Name of the resource group to which the resource belongs .
* @ param name Name of the App Service Environment .
* @ param workerPoolName Name of the worker pool .
* ... | return ServiceFuture . fromResponse ( beginCreateOrUpdateWorkerPoolWithServiceResponseAsync ( resourceGroupName , name , workerPoolName , workerPoolEnvelope ) , serviceCallback ) ; |
public class StreamRecord { /** * The primary key attribute ( s ) for the DynamoDB item that was modified .
* @ param keys
* The primary key attribute ( s ) for the DynamoDB item that was modified .
* @ return Returns a reference to this object so that method calls can be chained together . */
public StreamRecord... | setKeys ( keys ) ; return this ; |
public class PhoneIntents { /** * Creates an intent that will allow to send an SMS without specifying the phone number
* @ param body The text to send
* @ return the intent */
public static Intent newSmsIntent ( Context context , String body ) { } } | return newSmsIntent ( context , body , ( String [ ] ) null ) ; |
public class LazyReact { /** * Start a reactive flow from a JDK Iterator
* < pre >
* { @ code
* Iterator < Integer > iterator ;
* new LazyReact ( 10,10 ) . from ( iterator )
* . map ( this : : process ) ;
* < / pre >
* @ param iterator SimpleReact will iterate over this iterator concurrently to skip the r... | return fromStream ( StreamSupport . stream ( Spliterators . spliteratorUnknownSize ( iterator , Spliterator . ORDERED ) , false ) ) ; |
public class ILUT { /** * Copies the dense array back into the sparse vector , applying a numerical
* dropping rule and keeping only a given number of entries */
private void gather ( double [ ] z , SparseVector v , double taui , int d ) { } } | // Number of entries in the lower and upper part of the original matrix
int nl = 0 , nu = 0 ; for ( VectorEntry e : v ) { if ( e . index ( ) < d ) nl ++ ; else if ( e . index ( ) > d ) nu ++ ; } v . zero ( ) ; // Entries in the L part of the vector
lower . clear ( ) ; for ( int i = 0 ; i < d ; ++ i ) if ( Math . abs ( ... |
public class AbstractGISTreeSetNode { /** * { @ inheritDoc }
* < p > Caution : This function does not replies the bounding
* object itself , but a copy of it .
* See { @ link # getBounds ( ) } to obtain the object itself .
* @ see # getBounds ( ) */
@ Override @ Pure public Rectangle2d getObjectBounds ( ) { } } | final Rectangle2d b = new Rectangle2d ( ) ; final Rectangle2afp < ? , ? , ? , ? , ? , ? > bb = getBounds ( ) ; if ( bb != null && ! bb . isEmpty ( ) ) { b . set ( bb . getMinX ( ) , bb . getMinY ( ) , bb . getWidth ( ) , bb . getHeight ( ) ) ; } return b ; |
public class RawEmailMarshaller { /** * Marshall the given parameter object . */
public void marshall ( RawEmail rawEmail , ProtocolMarshaller protocolMarshaller ) { } } | if ( rawEmail == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( rawEmail . getData ( ) , DATA_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; } |
public class Expiring { /** * Sets the default expire time and unit */
public Expiring < T > withDefault ( long expireTime , TimeUnit expireUnit ) { } } | checkArgument ( expireTime > 0 ) ; this . defaultExpireTime = Optional . of ( expireTime ) ; this . defaultExpireUnit = Optional . of ( expireUnit ) ; return this ; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.