signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class IfcGridAxisImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ SuppressWarnings ( "unchecked" ) public EList < IfcGrid > getPartOfV ( ) { } } | return ( EList < IfcGrid > ) eGet ( Ifc2x3tc1Package . Literals . IFC_GRID_AXIS__PART_OF_V , true ) ; |
public class ExceptionalStream { public < R > R __ ( Try . Function < ? super ExceptionalStream < T , E > , R , ? extends E > transfer ) throws E { } } | checkArgNotNull ( transfer , "transfer" ) ; return transfer . apply ( this ) ; |
public class FLAC_MD5 { /** * Add samples to the MD5 hash .
* CURRENTLY ONLY MAY WORK FOR : sample sizes which are divisible by 8 . Need
* to create some audio to test with .
* @ param samples
* @ param count
* @ param channels */
public void addSamplesToMD5 ( int [ ] samples , int count , int channels , int ... | int bytesPerSample = sampleSize / 8 ; if ( sampleSize % 8 != 0 ) bytesPerSample ++ ; if ( _dataMD5 == null || _dataMD5 . length < count * bytesPerSample * channels ) { _dataMD5 = new byte [ count * bytesPerSample * channels ] ; } byte [ ] dataMD5 = _dataMD5 ; splitSamplesToBytes ( samples , count * channels , bytesPerS... |
public class BsWebConfigCB { public WebConfigCB acceptPK ( String id ) { } } | assertObjectNotNull ( "id" , id ) ; BsWebConfigCB cb = this ; cb . query ( ) . docMeta ( ) . setId_Equal ( id ) ; return ( WebConfigCB ) this ; |
public class XMLNodeStruct { /** * used only with java 7 , do not set @ Override */
public Object getUserData ( String key ) { } } | // dynamic load to support jre 1.4 and 1.5
try { Method m = node . getClass ( ) . getMethod ( "getUserData" , new Class [ ] { key . getClass ( ) } ) ; return m . invoke ( node , new Object [ ] { key } ) ; } catch ( Exception e ) { throw new PageRuntimeException ( Caster . toPageException ( e ) ) ; } |
public class StrBuilder { /** * Appends a char array to the string builder .
* Appending null will call { @ link # appendNull ( ) } .
* @ param chars the char array to append
* @ return this , to enable chaining */
public StrBuilder append ( final char [ ] chars ) { } } | if ( chars == null ) { return appendNull ( ) ; } final int strLen = chars . length ; if ( strLen > 0 ) { final int len = length ( ) ; ensureCapacity ( len + strLen ) ; System . arraycopy ( chars , 0 , buffer , len , strLen ) ; size += strLen ; } return this ; |
public class OutputHandler { /** * Style the tag for a particular channel this style
* @ param channel The channel to style
* @ param style The style to use */
public void styleChannel ( String channel , Style style ) { } } | if ( this . channelStyles == null ) { this . channelStyles = new HashMap < String , Style > ( ) ; } this . channelStyles . put ( channel . toLowerCase ( ) , style ) ; |
public class ListerUtils { /** * Parses a usual filter into a regex pattern .
* @ param spec the filter to be parsed
* @ return a regexp pattern corresponding to the filter
* @ throws IllegalArgumentException - If the filter could not be compiled to a pattern */
public static Pattern parseFilter ( final String sp... | StringBuffer sb = new StringBuffer ( ) ; for ( int j = 0 ; j < spec . length ( ) ; j ++ ) { char c = spec . charAt ( j ) ; switch ( c ) { case '.' : sb . append ( "\\." ) ; break ; case '*' : // test for * * ( all directories )
if ( j < spec . length ( ) - 1 && spec . charAt ( j + 1 ) == '*' ) { sb . append ( ".*" ) ; ... |
public class BaseDestinationHandler { /** * MP is stopping . All mediation activity should stop also . */
@ Override public void announceMPStopping ( ) { } } | if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "announceMPStopping" ) ; if ( isPubSub ( ) ) { if ( null != _pubSubRealization ) { // doing a sanity check with checking for not null
// signal to _ pubSubRealization to gracefully exit from deleteMsgsWithNoReferences ( )
_p... |
public class Cells { /** * Returns the { @ code Byte } value of the { @ link Cell } ( associated to { @ code table } ) whose name iscellName , or null
* if this Cells object contains no cell whose name is cellName .
* @ param nameSpace the name of the owning table
* @ param cellName the name of the Cell we want t... | return getValue ( nameSpace , cellName , Byte . class ) ; |
public class BpmnParse { /** * Parses the signals of the given definitions file . Signals are not contained
* within a process element , but they can be referenced from inner process
* elements . */
protected void parseSignals ( ) { } } | for ( Element signalElement : rootElement . elements ( "signal" ) ) { String id = signalElement . attribute ( "id" ) ; String signalName = signalElement . attribute ( "name" ) ; for ( SignalDefinition signalDefinition : signals . values ( ) ) { if ( signalDefinition . getName ( ) . equals ( signalName ) ) { addError ( ... |
public class XbasePackageImpl { /** * Complete the initialization of the package and its meta - model . This
* method is guarded to have no affect on any invocation but its first .
* < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public void initializePackageContents ( ) { } ... | if ( isInitialized ) return ; isInitialized = true ; // Initialize package
setName ( eNAME ) ; setNsPrefix ( eNS_PREFIX ) ; setNsURI ( eNS_URI ) ; // Obtain other dependent packages
TypesPackage theTypesPackage = ( TypesPackage ) EPackage . Registry . INSTANCE . getEPackage ( TypesPackage . eNS_URI ) ; // Create type p... |
public class Attachment { /** * Equivalent to { @ link com . tngtech . jgiven . attachment . Attachment # Attachment ( String , MediaType ) }
* @ throws java . lang . IllegalArgumentException if mediaType is binary */
public static Attachment fromText ( String content , MediaType mediaType ) { } } | if ( mediaType . isBinary ( ) ) { throw new IllegalArgumentException ( "MediaType must not be binary" ) ; } return new Attachment ( content , mediaType ) ; |
public class SignConfig { /** * Creates a keytool request to do a key store generation operation .
* @ param keystoreFile the location of the key store file to generate
* @ return the keytool request */
public KeyToolGenerateKeyPairRequest createKeyGenRequest ( File keystoreFile ) { } } | KeyToolGenerateKeyPairRequest request = new KeyToolGenerateKeyPairRequest ( ) ; request . setAlias ( getAlias ( ) ) ; request . setDname ( getDname ( ) ) ; request . setKeyalg ( getKeyalg ( ) ) ; request . setKeypass ( getKeypass ( ) ) ; request . setKeysize ( getKeysize ( ) ) ; request . setKeystore ( getKeystore ( ) ... |
public class DistanceToAtomDescriptor { /** * This method calculate the 3D distance between two atoms .
* @ param atom The IAtom for which the DescriptorValue is requested
* @ param container Parameter is the atom container .
* @ return The number of bonds on the shortest path between two atoms */
@ Override publ... | double distanceToAtom ; IAtom focus = container . getAtom ( focusPosition ) ; if ( atom . getPoint3d ( ) == null || focus . getPoint3d ( ) == null ) { return new DescriptorValue ( getSpecification ( ) , getParameterNames ( ) , getParameters ( ) , new DoubleResult ( Double . NaN ) , getDescriptorNames ( ) , new CDKExcep... |
public class AmazonGuardDutyClient { /** * Lists the IPSets of the GuardDuty service specified by the detector ID .
* @ param listIPSetsRequest
* @ return Result of the ListIPSets operation returned by the service .
* @ throws BadRequestException
* 400 response
* @ throws InternalServerErrorException
* 500 ... | request = beforeClientExecution ( request ) ; return executeListIPSets ( request ) ; |
public class ManagedObject { /** * ( non - Javadoc )
* @ see SimplifiedSerialization . readObject ( java . io . DataInputStream , ObjectManagerState ) */
protected void readObject ( java . io . DataInputStream dataInputStream , ObjectManagerState objectManagerState ) throws ObjectManagerException , java . io . IOExce... | final String methodName = "readObject" ; if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , methodName , new Object [ ] { dataInputStream , objectManagerState } ) ; try { byte version = dataInputStream . readByte ( ) ; if ( Tracing . isAnyTracingEnabled ( ) && trace .... |
public class SecurityActions { /** * Does not perform { @ link PrivilegedAction } unless necessary .
* @ param javaClass
* @ param fieldName
* @ return a field from the class
* @ throws NoSuchMethodException */
static Field lookupField ( Class < ? > javaClass , String fieldName ) throws NoSuchFieldException { }... | if ( System . getSecurityManager ( ) != null ) { try { return AccessController . doPrivileged ( new FieldLookupAction ( javaClass , fieldName ) ) ; } catch ( PrivilegedActionException e ) { if ( e . getCause ( ) instanceof NoSuchFieldException ) { throw ( NoSuchFieldException ) e . getCause ( ) ; } throw new WeldExcept... |
public class PutConferencePreferenceRequestMarshaller { /** * Marshall the given parameter object . */
public void marshall ( PutConferencePreferenceRequest putConferencePreferenceRequest , ProtocolMarshaller protocolMarshaller ) { } } | if ( putConferencePreferenceRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( putConferencePreferenceRequest . getConferencePreference ( ) , CONFERENCEPREFERENCE_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "... |
public class PrivacyListManager { /** * Returns the name of the effective privacy list .
* The effective privacy list is the one that is currently enforced on the connection . It ' s either the active
* privacy list , or , if the active privacy list is not set , the default privacy list .
* @ return the name of t... | String activeListName = getActiveListName ( ) ; if ( activeListName != null ) { return activeListName ; } return getDefaultListName ( ) ; |
public class GaliosFieldTableOps { /** * Adds two polynomials together . output = polyA + polyB
* < p > Coefficients for largest powers are first , e . g . 2 * x * * 3 + 8 * x * * 2 + 1 = [ 2,8,0,1 ] < / p >
* @ param polyA ( Input ) First polynomial
* @ param polyB ( Input ) Second polynomial
* @ param output ... | output . resize ( Math . max ( polyA . size , polyB . size ) ) ; // compute offset that would align the smaller polynomial with the larger polynomial
int offsetA = Math . max ( 0 , polyB . size - polyA . size ) ; int offsetB = Math . max ( 0 , polyA . size - polyB . size ) ; int N = output . size ; for ( int i = 0 ; i ... |
public class MessageBuilder { /** * Creates a FILE _ RECEIVED message .
* @ param fullPath the path of the received file .
* @ return a protobuf message . */
public static Message buildFileReceived ( String fullPath ) { } } | ZabMessage . FileReceived received = ZabMessage . FileReceived . newBuilder ( ) . setFullPath ( fullPath ) . build ( ) ; return Message . newBuilder ( ) . setType ( MessageType . FILE_RECEIVED ) . setFileReceived ( received ) . build ( ) ; |
public class TextOnlyLayout { /** * Ends the content area of a page . */
@ Override public void endContent ( WebPage page , ChainWriter out , WebSiteRequest req , HttpServletResponse resp , int [ ] contentColumnSpans ) throws IOException , SQLException { } } | int totalColumns = 0 ; for ( int c = 0 ; c < contentColumnSpans . length ; c ++ ) { if ( c > 0 ) totalColumns += 1 ; totalColumns += contentColumnSpans [ c ] ; } out . print ( " <tr><td" ) ; if ( totalColumns != 1 ) out . print ( " colspan='" ) . print ( totalColumns ) . print ( '\'' ) ; out . print ( "><hr /></td></t... |
public class RNAUtils { /** * method to check if the MonomerNotationUnitRNA contains modification
* @ param monomerNotation
* MonomerNotationUnitRNA
* @ return true , if the MonomerNotationUnitRNA contains modification , false
* otherwise */
private static boolean hasModification ( MonomerNotationUnitRNA monome... | if ( monomerNotation . getUnit ( ) . contains ( "[" ) || monomerNotation . getUnit ( ) . contains ( "(X)" ) || monomerNotation . getUnit ( ) . endsWith ( ")" ) ) { return true ; } return false ; |
public class ComQuery { /** * Statement . executeBatch ( ) rewritten multiple ( concatenate with " ; " ) according to
* max _ allowed _ packet )
* @ param writer outputstream
* @ param firstQuery first query
* @ param queries queries
* @ param currentIndex currentIndex
* @ return current index
* @ throws ... | writer . startPacket ( 0 ) ; writer . write ( Packet . COM_QUERY ) ; // index is already set to 1 for first one
writer . write ( firstQuery . getBytes ( "UTF-8" ) ) ; int index = currentIndex ; // add query with " ; "
while ( index < queries . size ( ) ) { byte [ ] sqlByte = queries . get ( index ) . getBytes ( "UTF-8"... |
public class CoreAsync { /** * Bind the given collection of stages to the target completable , which if cancelled , or failed
* will do the corresponding to their collection of stages .
* @ param target The completable to cancel , and fail on .
* @ param stages The stages to cancel , when { @ code target } is can... | target . whenCancelled ( ( ) -> { for ( final Stage < ? > f : stages ) { f . cancel ( ) ; } } ) ; |
public class HttpCookie { /** * Parse header string to cookie object .
* @ param header header string ; should contain only one NAME = VALUE pair
* @ return an HttpCookie being extracted
* @ throws IllegalArgumentException if header string violates the cookie
* specification */
private static HttpCookie parseIn... | HttpCookie cookie = null ; String namevaluePair = null ; StringTokenizer tokenizer = new StringTokenizer ( header , ";" ) ; // there should always have at least on name - value pair ;
// it ' s cookie ' s name
try { namevaluePair = tokenizer . nextToken ( ) ; int index = namevaluePair . indexOf ( '=' ) ; if ( index != ... |
public class AmqpTransporter { /** * - - - CONNECT - - - */
@ Override public void connect ( ) { } } | try { // Create client connection
disconnect ( ) ; String uri = url ; if ( uri . indexOf ( ':' ) == - 1 ) { uri = uri + ":5672" ; } if ( url . indexOf ( "://" ) == - 1 ) { if ( sslContextFactory != null ) { uri = "amqps://" + uri ; } else { uri = "amqp://" + uri ; } } factory . setHeartbeatExecutor ( scheduler ) ; fact... |
public class MBeanProvider { /** * Deregisters MBeans / MXBeans . */
public static void unpopulateMBeanServer ( ) { } } | if ( ! populated ) return ; synchronized ( lock ) { populated = false ; if ( storageManager != null && storageManager . getPublicName ( ) != null ) { logger . info ( "Unregistering the StorageManager MXBean" ) ; try { storageManager . deregister ( ) ; storageManager . awaitJobTermination ( 2 * 60 ) ; } catch ( Exceptio... |
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link Boolean } { @ code > } */
@ XmlElementDecl ( namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/" , name = "includeAllowableActions" , scope = GetChildren . class ) public JAXBElement < Boolean > createGe... | return new JAXBElement < Boolean > ( _GetObjectOfLatestVersionIncludeAllowableActions_QNAME , Boolean . class , GetChildren . class , value ) ; |
public class EventServicesImpl { /** * Returns the activity instances by process name , activity logical ID , and master request ID .
* @ param processName
* @ param activityLogicalId
* @ param masterRequestId
* @ return the list of activity instances . If the process definition or the activity
* with the giv... | TransactionWrapper transaction = null ; EngineDataAccessDB edao = new EngineDataAccessDB ( ) ; try { Process procdef = ProcessCache . getProcess ( processName , 0 ) ; if ( procdef == null ) return null ; Activity actdef = procdef . getActivityByLogicalId ( activityLogicalId ) ; if ( actdef == null ) return null ; trans... |
public class BaseTangramEngine { /** * Parse original data with type { @ link O } into model data with type { @ link BaseCell }
* @ param parent the parent group to hold parsed object .
* @ param data Original data .
* @ return Parsed data .
* @ since 3.0.0 */
public BaseCell parseSingleComponent ( @ Nullable C... | return mDataParser . parseSingleComponent ( data , parent , this , componentInfoMap ) ; |
public class CommerceCountryUtil { /** * Returns all the commerce countries where groupId = & # 63 ; and billingAllowed = & # 63 ; and active = & # 63 ; .
* @ param groupId the group ID
* @ param billingAllowed the billing allowed
* @ param active the active
* @ return the matching commerce countries */
public ... | return getPersistence ( ) . findByG_B_A ( groupId , billingAllowed , active ) ; |
public class SourceHandler { /** * Gets multiple data elements from the underlying { @ link com . merakianalytics . datapipelines . sources . DataSource } , provides them to the appropriate
* { @ link com . merakianalytics . datapipelines . SinkHandler } s , converts them and returns them
* @ param query
* a quer... | if ( ! streaming ) { final List < A > collector = new LinkedList < > ( ) ; try ( CloseableIterator < A > result = source . getMany ( acquiredType , query , context ) ) { if ( result == null ) { return null ; } while ( result . hasNext ( ) ) { collector . add ( result . next ( ) ) ; } } catch ( final Exception e ) { LOG... |
public class SweepLruEvictionStrategy { /** * Cancel the Scheduled Future object */
public void cancel ( ) { } } | // d583637 , F73234
synchronized ( ivCancelLock ) { // d601399
ivIsCanceled = true ; if ( ivScheduledFuture != null ) ivScheduledFuture . cancel ( false ) ; ivCache = null ; ivElements = null ; } |
public class ManagedClustersInner { /** * Reset AAD Profile of a managed cluster .
* Update the AAD Profile for a managed cluster .
* @ param resourceGroupName The name of the resource group .
* @ param resourceName The name of the managed cluster resource .
* @ param parameters Parameters supplied to the Reset... | return ServiceFuture . fromResponse ( beginResetAADProfileWithServiceResponseAsync ( resourceGroupName , resourceName , parameters ) , serviceCallback ) ; |
public class Solo { /** * Waits for a View matching the specified class . Default timeout is 20 seconds .
* @ param viewClass the { @ link View } class to wait for
* @ return { @ code true } if the { @ link View } is displayed and { @ code false } if it is not displayed before the timeout */
public < T extends View... | if ( config . commandLogging ) { Log . d ( config . commandLoggingTag , "waitForView(" + viewClass + ")" ) ; } return waiter . waitForView ( viewClass , 0 , Timeout . getLargeTimeout ( ) , true ) ; |
public class Strman { /** * Inserts ' substr ' into the ' value ' at the ' index ' provided .
* @ param value The input String
* @ param substr The String to insert
* @ param index The index to insert substr
* @ return String with substr added */
public static String insert ( final String value , final String s... | validate ( value , NULL_STRING_PREDICATE , NULL_STRING_MSG_SUPPLIER ) ; validate ( substr , NULL_STRING_PREDICATE , NULL_STRING_MSG_SUPPLIER ) ; if ( index > value . length ( ) ) { return value ; } return append ( value . substring ( 0 , index ) , substr , value . substring ( index ) ) ; |
public class JDK14LoggerAdapter { /** * Log a message object at level FINEST .
* @ param msg
* - the message object to be logged */
public void trace ( String msg ) { } } | if ( logger . isLoggable ( Level . FINEST ) ) { log ( SELF , Level . FINEST , msg , null ) ; } |
public class AAFCon { /** * Use this API when you have permission to have your call act as the end client ' s ID .
* Your calls will get 403 errors if you do not have this permission . it is a special setup , rarely given .
* @ param apiVersion
* @ param req
* @ return
* @ throws CadiException */
public Rcli ... | Rcli < CLIENT > cl = client ( apiVersion ) ; return cl . forUser ( transferSS ( ( ( HttpServletRequest ) req ) . getUserPrincipal ( ) ) ) ; |
public class AsyncClient { /** * Start the QPS Client . */
public void run ( ) throws Exception { } } | if ( config == null ) { return ; } SimpleRequest req = newRequest ( ) ; List < ManagedChannel > channels = new ArrayList < > ( config . channels ) ; for ( int i = 0 ; i < config . channels ; i ++ ) { channels . add ( config . newChannel ( ) ) ; } // Do a warmup first . It ' s the same as the actual benchmark , except t... |
public class Match { /** * Creates a state used for actually matching a token .
* @ since 2.3 */
public MatchState createState ( Synthesizer synthesizer , AnalyzedTokenReadings token ) { } } | MatchState state = new MatchState ( this , synthesizer ) ; state . setToken ( token ) ; return state ; |
public class NormalDistributionTypeImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ Override public void eSet ( int featureID , Object newValue ) { } } | switch ( featureID ) { case BpsimPackage . NORMAL_DISTRIBUTION_TYPE__MEAN : setMean ( ( Double ) newValue ) ; return ; case BpsimPackage . NORMAL_DISTRIBUTION_TYPE__STANDARD_DEVIATION : setStandardDeviation ( ( Double ) newValue ) ; return ; } super . eSet ( featureID , newValue ) ; |
public class Allure { /** * Process TestCaseEvent . You can change current testCase context
* using this method .
* @ param event to process */
public void fire ( TestCaseEvent event ) { } } | TestCaseResult testCase = testCaseStorage . get ( ) ; event . process ( testCase ) ; notifier . fire ( event ) ; |
public class MediaApi { /** * Transfer an interaction
* Transfer the interaction to the specified agent .
* @ param mediatype The media channel . ( required )
* @ param id The ID of the interaction . ( required )
* @ param transferData ( required )
* @ return ApiSuccessResponse
* @ throws ApiException If fa... | ApiResponse < ApiSuccessResponse > resp = transferAgentWithHttpInfo ( mediatype , id , transferData ) ; return resp . getData ( ) ; |
public class BetterRecyclerAdapter { /** * Check if we should show the empty view */
private void checkIfEmpty ( ) { } } | if ( emptyView != null ) { emptyView . setVisibility ( getItemCount ( ) > 0 ? View . GONE : View . VISIBLE ) ; } |
public class JsUtils { /** * Use the method in the gquery class .
* $ ( elem ) . cur ( prop , force ) ; */
@ Deprecated public static double cur ( Element elem , String prop , boolean force ) { } } | return GQuery . $ ( elem ) . cur ( prop , force ) ; |
public class CommerceWarehouseLocalServiceUtil { /** * Deletes the commerce warehouse from the database . Also notifies the appropriate model listeners .
* @ param commerceWarehouse the commerce warehouse
* @ return the commerce warehouse that was removed */
public static com . liferay . commerce . model . Commerce... | return getService ( ) . deleteCommerceWarehouse ( commerceWarehouse ) ; |
public class AppsImpl { /** * Imports an application to LUIS , the application ' s structure should be included in in the request body .
* @ param luisApp A LUIS application structure .
* @ param importMethodOptionalParameter the object representing the optional parameters to be set before calling this API
* @ th... | return importMethodWithServiceResponseAsync ( luisApp , importMethodOptionalParameter ) . toBlocking ( ) . single ( ) . body ( ) ; |
public class IfcSurfaceTextureImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ SuppressWarnings ( "unchecked" ) @ Override public EList < IfcSurfaceStyleWithTextures > getUsedInStyles ( ) { } } | return ( EList < IfcSurfaceStyleWithTextures > ) eGet ( Ifc4Package . Literals . IFC_SURFACE_TEXTURE__USED_IN_STYLES , true ) ; |
public class SoyValueConverter { /** * Creates a Soy dictionary from a Java string map . While this is O ( n ) in the map ' s shallow size ,
* the Java values are converted into Soy values lazily and only once . */
public SoyDict newDictFromMap ( Map < String , ? > javaStringMap ) { } } | // Create a dictionary backed by a map which has eagerly converted each value into a lazy
// value provider . Specifically , the map iteration is done eagerly so that the lazy value
// provider can cache its value .
ImmutableMap . Builder < String , SoyValueProvider > builder = ImmutableMap . builder ( ) ; for ( Map . ... |
public class UniverseApi { /** * Get factions Get a list of factions - - - This route expires daily at 11:05
* @ param acceptLanguage
* Language to use in the response ( optional , default to en - us )
* @ param datasource
* The server name you would like data from ( optional , default to
* tranquility )
* ... | com . squareup . okhttp . Call call = getUniverseFactionsValidateBeforeCall ( acceptLanguage , datasource , ifNoneMatch , language , null ) ; Type localVarReturnType = new TypeToken < List < FactionsResponse > > ( ) { } . getType ( ) ; return apiClient . execute ( call , localVarReturnType ) ; |
public class CmsToolTipHandler { /** * Removes this tool - tip handler completely . This instance will not be reusable . < p > */
public void removeHandler ( ) { } } | clearShowing ( ) ; if ( m_overHandlerRegistration != null ) { m_overHandlerRegistration . removeHandler ( ) ; m_overHandlerRegistration = null ; } m_target = null ; |
public class BioVerb { /** * getter for matchedText - gets
* @ generated
* @ return value of the feature */
public String getMatchedText ( ) { } } | if ( BioVerb_Type . featOkTst && ( ( BioVerb_Type ) jcasType ) . casFeat_matchedText == null ) jcasType . jcas . throwFeatMissing ( "matchedText" , "ch.epfl.bbp.uima.types.BioVerb" ) ; return jcasType . ll_cas . ll_getStringValue ( addr , ( ( BioVerb_Type ) jcasType ) . casFeatCode_matchedText ) ; |
public class ComponentFactoryDecorator { /** * { @ inheritDoc } */
@ Override public JComboBox createListValueModelComboBox ( ValueModel selectedItemValueModel , ValueModel selectableItemsListHolder , String renderedPropertyPath ) { } } | return this . getDecoratedComponentFactory ( ) . createListValueModelComboBox ( selectedItemValueModel , selectableItemsListHolder , renderedPropertyPath ) ; |
public class AddCommunicationToCaseRequest { /** * The email addresses in the CC line of an email to be added to the support case .
* @ return The email addresses in the CC line of an email to be added to the support case . */
public java . util . List < String > getCcEmailAddresses ( ) { } } | if ( ccEmailAddresses == null ) { ccEmailAddresses = new com . amazonaws . internal . SdkInternalList < String > ( ) ; } return ccEmailAddresses ; |
public class ContainerBase { /** * { @ inheritDoc }
* @ see org . jboss . shrinkwrap . api . Archive # shallowCopy ( Filter ) */
@ Override public Archive < T > shallowCopy ( Filter < ArchivePath > filter ) { } } | Validate . notNull ( filter , "Filter must be specified" ) ; // Get the actual class type and make a shallow copy of the the underlying archive ,
// using the same underlying configuration
final Class < T > actualClass = this . getActualClass ( ) ; final Archive < ? > underlyingArchive = this . getArchive ( ) ; final C... |
public class CmsJspStandardContextBean { /** * Returns a lazy initialized Map which allows access to the dynamic function beans using the JSP EL . < p >
* When given a key , the returned map will look up the corresponding dynamic function bean in the module configuration . < p >
* @ return a lazy initialized Map wh... | if ( m_function == null ) { Transformer transformer = new Transformer ( ) { @ Override public Object transform ( Object input ) { try { CmsDynamicFunctionBean dynamicFunction = readDynamicFunctionBean ( ( String ) input ) ; CmsDynamicFunctionBeanWrapper wrapper = new CmsDynamicFunctionBeanWrapper ( m_cms , dynamicFunct... |
public class CmsBeanTableBuilder { /** * Creates a default cell style generator which just returns the value of the styleName attribute in a Column annotation for cells in that column . < p >
* @ return the default cell style generator */
public CellStyleGenerator getDefaultCellStyleGenerator ( ) { } } | return new CellStyleGenerator ( ) { private static final long serialVersionUID = 1L ; @ SuppressWarnings ( "synthetic-access" ) public String getStyle ( Table source , Object itemId , Object propertyId ) { for ( ColumnBean colBean : m_columns ) { if ( colBean . getProperty ( ) . getName ( ) . equals ( propertyId ) ) { ... |
public class TsfileDatabaseMetadata { /** * recommend using getMetadataInJson ( ) instead of toString ( ) */
public String getMetadataInJson ( ) throws SQLException { } } | try { return getMetadataInJsonFunc ( ) ; } catch ( TException e ) { boolean flag = connection . reconnect ( ) ; this . client = connection . client ; if ( flag ) { try { return getMetadataInJsonFunc ( ) ; } catch ( TException e2 ) { throw new SQLException ( "Failed to fetch all metadata in json " + "after reconnecting.... |
public class Sort { /** * internal method to sort the array with quick sort algorithm
* @ param arr an array of Comparable Items
* @ param left the left - most index of the subarray
* @ param right the right - most index of the subarray */
private static < T extends Comparable < ? super T > > void quicksort ( T [... | if ( left + CUTOFF <= right ) { // find the pivot
T pivot = median ( arr , left , right ) ; // start partitioning
int i = left , j = right - 1 ; for ( ; ; ) { while ( arr [ ++ i ] . compareTo ( pivot ) < 0 ) ; while ( arr [ -- j ] . compareTo ( pivot ) > 0 ) ; if ( i < j ) { swapReferences ( arr , i , j ) ; } else { br... |
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link TINReliefType } { @ code > }
* @ param value
* Java instance representing xml element ' s value .
* @ return
* the new instance of { @ link JAXBElement } { @ code < } { @ link TINReliefType } { @ code > } */
@ ... | return new JAXBElement < TINReliefType > ( _TINRelief_QNAME , TINReliefType . class , null , value ) ; |
public class CheckpointCoordinator { /** * Try to complete the given pending checkpoint .
* < p > Important : This method should only be called in the checkpoint lock scope .
* @ param pendingCheckpoint to complete
* @ throws CheckpointException if the completion failed */
private void completePendingCheckpoint (... | final long checkpointId = pendingCheckpoint . getCheckpointId ( ) ; final CompletedCheckpoint completedCheckpoint ; // As a first step to complete the checkpoint , we register its state with the registry
Map < OperatorID , OperatorState > operatorStates = pendingCheckpoint . getOperatorStates ( ) ; sharedStateRegistry ... |
public class PartialResponseChangesTypeImpl { /** * Returns all < code > update < / code > elements
* @ return list of < code > update < / code > */
public List < PartialResponseUpdateType < PartialResponseChangesType < T > > > getAllUpdate ( ) { } } | List < PartialResponseUpdateType < PartialResponseChangesType < T > > > list = new ArrayList < PartialResponseUpdateType < PartialResponseChangesType < T > > > ( ) ; List < Node > nodeList = childNode . get ( "update" ) ; for ( Node node : nodeList ) { PartialResponseUpdateType < PartialResponseChangesType < T > > type... |
public class SolrManager { /** * Create a Solr core from a configuration set directory . By default , the configuration set directory is located
* inside the folder server / solr / configsets .
* @ param coreName Core name
* @ param configSet Configuration set name
* @ throws SolrException Exception */
public v... | try { logger . debug ( "Creating core: host={}, core={}, configSet={}" , host , coreName , configSet ) ; CoreAdminRequest . Create request = new CoreAdminRequest . Create ( ) ; request . setCoreName ( coreName ) ; request . setConfigSet ( configSet ) ; request . process ( solrClient ) ; } catch ( Exception e ) { throw ... |
public class RabinKarpHash { /** * Take rolling hash of last ' block ' characters . Start from the end of the string .
* @ param str
* @ return */
private int reverseHash ( String str ) { } } | int hash = 0 ; int len = str . length ( ) ; for ( int i = 0 ; i < _block ; i ++ ) { char c = str . charAt ( len - i - 1 ) ; hash = A * hash + CHAR_HASHES [ c ] ; } return hash ; |
public class GenericExtendedSet { /** * { @ inheritDoc } */
@ SuppressWarnings ( "unchecked" ) @ Override public boolean containsAll ( Collection < ? > c ) { } } | if ( isEmpty ( ) || c == null || c . isEmpty ( ) ) return false ; if ( this == c ) return true ; if ( elements instanceof List < ? > && c instanceof GenericExtendedSet < ? > && ( ( GenericExtendedSet < ? > ) c ) . elements instanceof List < ? > ) { Iterator < T > thisItr = elements . iterator ( ) ; Iterator < T > other... |
public class NodeGroupClient { /** * Deletes specified nodes from the node group .
* < p > Sample code :
* < pre > < code >
* try ( NodeGroupClient nodeGroupClient = NodeGroupClient . create ( ) ) {
* ProjectZoneNodeGroupName nodeGroup = ProjectZoneNodeGroupName . of ( " [ PROJECT ] " , " [ ZONE ] " , " [ NODE ... | DeleteNodesNodeGroupHttpRequest request = DeleteNodesNodeGroupHttpRequest . newBuilder ( ) . setNodeGroup ( nodeGroup == null ? null : nodeGroup . toString ( ) ) . setNodeGroupsDeleteNodesRequestResource ( nodeGroupsDeleteNodesRequestResource ) . build ( ) ; return deleteNodesNodeGroup ( request ) ; |
public class UserTaskServicesClientImpl { /** * task basic queries */
@ Override public TaskInstance findTaskByWorkItemId ( Long workItemId ) { } } | if ( config . isRest ( ) ) { Map < String , Object > valuesMap = new HashMap < String , Object > ( ) ; valuesMap . put ( WORK_ITEM_ID , workItemId ) ; return makeHttpGetRequestAndCreateCustomResponse ( build ( loadBalancer . getUrl ( ) , QUERY_URI + "/" + TASK_BY_WORK_ITEM_ID_GET_URI , valuesMap ) , TaskInstance . clas... |
public class CmsCmisTypeManager { /** * Gets the descendants of a type . < p >
* @ param typeId the parent type id
* @ param depth the depth up to which the descendant types should be collected
* @ param includePropertyDefinitions true if the property definitions should be included
* @ return the descendants of... | refresh ( ) ; List < TypeDefinitionContainer > result = new ArrayList < TypeDefinitionContainer > ( ) ; // check depth
int d = ( depth == null ? - 1 : depth . intValue ( ) ) ; if ( d == 0 ) { throw new CmisInvalidArgumentException ( "Depth must not be 0!" ) ; } if ( typeId == null ) { result . add ( getTypeDescendants ... |
public class A_CmsListItemSelectDialog { /** * Makes sure the item with the given structure id is checked . < p >
* @ param structureId the structure id */
protected void ensureChecked ( CmsUUID structureId ) { } } | CmsRadioButton button = ( CmsRadioButton ) m_listPanel . getItem ( String . valueOf ( structureId ) ) . getDecorationWidgets ( ) . get ( 0 ) ; if ( ! button . isChecked ( ) ) { button . setChecked ( true ) ; } |
public class EConv { /** * / * rb _ econv _ insert _ output */
public int insertOutput ( byte [ ] str , int strP , int strLen , byte [ ] strEncoding ) { } } | byte [ ] insertEncoding = encodingToInsertOutput ( ) ; byte [ ] insertBuf = null ; started = true ; if ( strLen == 0 ) return 0 ; final byte [ ] insertStr ; final int insertP ; final int insertLen ; if ( caseInsensitiveEquals ( insertEncoding , strEncoding ) ) { insertStr = str ; insertP = 0 ; insertLen = strLen ; } el... |
public class CmsGallerySearchParameters { /** * Sets the search scope .
* @ param cms The current CmsObject object . */
private void setSearchScopeFilter ( CmsObject cms ) { } } | final List < String > searchRoots = CmsSearchUtil . computeScopeFolders ( cms , this ) ; // If the resource types contain the type " function " also
// add " / system / modules / " to the search path
if ( ( null != getResourceTypes ( ) ) && containsFunctionType ( getResourceTypes ( ) ) ) { searchRoots . add ( "/system/... |
public class MathRandom { /** * Returns a random decimal number in the range of [ min , max ] .
* @ param min
* minimum value for generated number
* @ param max
* maximum value for generated number */
public double getDouble ( final double min , final double max ) { } } | return min ( min , max ) + getDouble ( abs ( max - min ) ) ; |
public class MapLoader { /** * Creates a new instance of the class this map loader is governing and loads it
* with values .
* @ param args only one argument is expected , a { @ link Map } with attribute names
* as keys and object values for those attributes as values */
public T load ( Object ... args ) { } } | try { T item = target . newInstance ( ) ; Map vals = ( Map ) args [ 0 ] ; load ( item , vals ) ; return item ; } catch ( InstantiationException e ) { throw new CacheManagementException ( e ) ; } catch ( IllegalAccessException e ) { throw new CacheManagementException ( e ) ; } |
public class DefaultSources { /** * Add resources of name { # link ConfigConstants . CONFIG _ PROPERTIES } to a List of sources using
* the classloader ' s loadResources method to locate resources .
* @ param classloader
* @ param sources */
public static List < ConfigSource > getPropertiesFileConfigSources ( Cla... | ArrayList < ConfigSource > sources = new ArrayList < > ( ) ; try { Enumeration < URL > propsResources = classloader . getResources ( ConfigConstants . CONFIG_PROPERTIES ) ; if ( propsResources != null ) { while ( propsResources . hasMoreElements ( ) ) { URL prop = propsResources . nextElement ( ) ; ConfigSource source ... |
public class MultipartBuilder { /** * Adds a named attachment .
* @ param is an stream to read the attachment
* @ param filename the filename to give to the attachment
* @ return this builder */
public MultipartBuilder attachment ( InputStream is , String filename ) { } } | return bodyPart ( new StreamDataBodyPart ( ATTACHMENT_NAME , is , filename ) ) ; |
public class JpaRepository { /** * Queries the entities in the repository and returns a subset of them .
* The collection is created by building a query from the received
* { @ code QueryData } and executing it .
* @ param query
* the query user to acquire the entities
* @ return the queried subset of entitie... | checkNotNull ( query , "Received a null pointer as the query" ) ; // Processes the query
return buildQuery ( query ) . getResultList ( ) ; |
public class VariantContextToVariantProtoConverter { /** * method to set Varaint Annotation Parameters
* @ return variantAnnotation */
private VariantAnnotationProto . VariantAnnotation setVaraintAnnotationParams ( ) { } } | VariantAnnotationProto . VariantAnnotation . Builder variantAnnotation = VariantAnnotationProto . VariantAnnotation . newBuilder ( ) ; /* * set AdditionalAttributes map type parameter */
// additionalAttributesMap . put ( null , null ) ;
HashMap < String , VariantAnnotationProto . VariantAnnotation . AdditionalAttribut... |
public class ObjectOffsetImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ Override public Object eGet ( int featureID , boolean resolve , boolean coreType ) { } } | switch ( featureID ) { case AfplibPackage . OBJECT_OFFSET__OBJ_TPE : return getObjTpe ( ) ; case AfplibPackage . OBJECT_OFFSET__OBJ_OSET : return getObjOset ( ) ; case AfplibPackage . OBJECT_OFFSET__OBJ_OST_HI : return getObjOstHi ( ) ; } return super . eGet ( featureID , resolve , coreType ) ; |
public class ConnectionData { /** * A convenience method to create a new { @ link URI } out of a protocol , host and port , hiding the
* { @ link URISyntaxException } behind a { @ link RuntimeException } .
* @ param protocol the protocol such as http
* @ param host hostname or IP address
* @ param port port num... | try { return new URI ( protocol , null , host , port , null , null , null ) ; } catch ( URISyntaxException e ) { throw new RuntimeException ( e ) ; } |
public class H2ONode { /** * also ACKACK ' d . */
RPC . RPCCall record_task ( RPC . RPCCall rpc ) { } } | // Task removal ( and roll - up ) suffers from classic race - condition , which we
// fix by a classic Dekker ' s algo ; a task # is always in either the _ work
// HashMap , or rolled - up in the _ removed _ task _ ids counter , or both ( for
// short intervals during the handoff ) . We can never has a cycle where
// i... |
public class UIViewParameter { /** * < p class = " changed _ added _ 2_0 " > Because this class has no { @ link
* Renderer } , leverage the one from the standard HTML _ BASIC { @ link
* RenderKit } with < code > component - family : javax . faces . Input < / code >
* and < code > renderer - type : javax . faces .... | return getInputTextRenderer ( context ) . getConvertedValue ( context , this , submittedValue ) ; |
public class XMLShredder { /** * Create a new StAX reader on a string .
* @ param paramString
* the XML file as a string to parse
* @ return an { @ link XMLEventReader }
* @ throws IOException
* if I / O operation fails
* @ throws XMLStreamException
* if any parsing error occurs */
public static synchroni... | final XMLInputFactory factory = XMLInputFactory . newInstance ( ) ; factory . setProperty ( XMLInputFactory . SUPPORT_DTD , false ) ; final InputStream in = new ByteArrayInputStream ( paramString . getBytes ( ) ) ; return factory . createXMLEventReader ( in ) ; |
public class PolynomialOps { /** * Returns a real root to the cubic polynomial : 0 = c0 + c1 * x + c2 * x ^ 2 + c3 * c ^ 3 . There can be other
* real roots .
* WARNING : This technique is much less stable than using one of the RootFinder algorithms
* @ param c0 Polynomial coefficient for power 0
* @ param c1 P... | // convert it into this format : r + q * x + p * x ^ 2 + x ^ 3 = 0
double p = c2 / c3 ; double q = c1 / c3 ; double r = c0 / c3 ; // reduce by substitution x = y - p / 3 which results in y ^ 3 + a * y + b = 0
double a = ( 3 * q - p * p ) / 3.0 ; double b = ( 2 * p * p * p - 9 * p * q + 27 * r ) / 27.0 ; double left = -... |
public class JZUtils { /** * if url = = null , clear all progress
* @ param context context
* @ param url if url ! = null clear this url progress */
public static void clearSavedProgress ( Context context , Object url ) { } } | if ( url == null ) { SharedPreferences spn = context . getSharedPreferences ( "JZVD_PROGRESS" , Context . MODE_PRIVATE ) ; spn . edit ( ) . clear ( ) . apply ( ) ; } else { SharedPreferences spn = context . getSharedPreferences ( "JZVD_PROGRESS" , Context . MODE_PRIVATE ) ; spn . edit ( ) . putLong ( "newVersion:" + ur... |
public class CSSToken { /** * Considers text as content of URI token ,
* and models view at this text as an common string ,
* that is removed { @ code ' url ( ' } from the beginning
* and { @ code ' ) ' } from the and . If result of this operation
* is STRING , remove even quotation marks
* @ param uri Conten... | String ret = uri . substring ( 4 , uri . length ( ) - 1 ) . trim ( ) ; // trim string
if ( ret . length ( ) > 0 && ( ret . charAt ( 0 ) == '\'' || ret . charAt ( 0 ) == '"' ) ) ret = ret . substring ( 1 , ret . length ( ) - 1 ) ; return ret ; |
public class SectionLoader { /** * Returns the file offset for the given RVA . Returns absent if file offset
* is not within file .
* @ param rva
* the relative virtual address that shall be converted to a
* plain file offset
* @ return file offset */
public Optional < Long > maybeGetFileOffset ( long rva ) {... | Optional < SectionHeader > section = maybeGetSectionHeaderByRVA ( rva ) ; // standard value if rva doesn ' t point into a section
long fileOffset = rva ; // rva is located within a section , so calculate offset
if ( section . isPresent ( ) ) { long virtualAddress = section . get ( ) . get ( VIRTUAL_ADDRESS ) ; long poi... |
public class Launcher { /** * Returns a decorated { @ link Launcher } that puts the given set of arguments as a prefix to any commands
* that it invokes .
* @ param prefix Prefixes to be appended
* @ since 1.299 */
@ Nonnull public final Launcher decorateByPrefix ( final String ... prefix ) { } } | final Launcher outer = this ; return new Launcher ( outer ) { @ Override public boolean isUnix ( ) { return outer . isUnix ( ) ; } @ Override public Proc launch ( ProcStarter starter ) throws IOException { starter . commands . addAll ( 0 , Arrays . asList ( prefix ) ) ; boolean [ ] masks = starter . masks ; if ( masks ... |
public class ControlFileHandler { /** * Called when a new blank record is required for the table / query .
* If the file is empty , this does an addNew , otherwise , the first record
* is read .
* @ param bDisplayOption If true , display any changes . */
public void doNewRecord ( boolean bDisplayOption ) { } } | super . doNewRecord ( bDisplayOption ) ; try { if ( this . getOwner ( ) . isOpen ( ) ) // Don ' t do first time !
{ boolean bOldEnableState = this . isEnabledListener ( ) ; this . setEnabledListener ( false ) ; // Just in case AddNew decides to call this
this . getOwner ( ) . close ( ) ; if ( this . getOwner ( ) . hasN... |
public class Probe { /** * Add a URL that specifies where the Responder should send the response .
* Provide a label as a hint to the Responder about why this URL was included .
* For example : give a " internal " label for a respondToURL that is only
* accessible from inside a NATed network .
* @ param label -... | // Sanity check on the respondToURL
// The requirement for the respondToURL is a REST POST call , so that means
// only HTTP and HTTPS schemes .
// Localhost is allowed as well as a valid response destination
String [ ] schemes = { "http" , "https" } ; UrlValidator urlValidator = new UrlValidator ( schemes , UrlValidat... |
public class DebugAuthActivity { /** * Called when the activity is first created . */
@ Override public void onCreate ( Bundle savedInstanceState ) { } } | super . onCreate ( savedInstanceState ) ; String title = this . getIntent ( ) . getStringExtra ( TITLE_EXTRA ) ; if ( title == null ) title = getApplicationName ( this ) ; CredentialView credentialView = new CredentialView ( this , title ) ; DivideDrawer . attach ( this , credentialView ) ; BackendServices . addLoginLi... |
public class SqlgEdge { /** * TODO this needs optimizing , an edge created in the transaction need not go to the db to load itself again */
@ Override protected void load ( ) { } } | // recordId can be null when in batchMode
if ( this . recordId != null && this . properties . isEmpty ( ) ) { this . sqlgGraph . tx ( ) . readWrite ( ) ; if ( this . sqlgGraph . getSqlDialect ( ) . supportsBatchMode ( ) && this . sqlgGraph . tx ( ) . getBatchManager ( ) . isStreaming ( ) ) { throw new IllegalStateExcep... |
public class BackupEnginesInner { /** * The backup management servers registered to a Recovery Services vault . This returns a pageable list of servers .
* @ param nextPageLink The NextLink from the previous successful call to List operation .
* @ throws IllegalArgumentException thrown if parameters fail the valida... | return getNextSinglePageAsync ( nextPageLink ) . concatMap ( new Func1 < ServiceResponse < Page < BackupEngineBaseResourceInner > > , Observable < ServiceResponse < Page < BackupEngineBaseResourceInner > > > > ( ) { @ Override public Observable < ServiceResponse < Page < BackupEngineBaseResourceInner > > > call ( Servi... |
public class XMPScanner { /** * Scans the given input for an XML metadata packet .
* The scanning process involves reading every byte in the file , while searching for an XMP packet .
* This process is very inefficient , compared to reading a known file format .
* < em > NOTE : The XMP Specification says this met... | ImageInputStream stream = pInput instanceof ImageInputStream ? ( ImageInputStream ) pInput : ImageIO . createImageInputStream ( pInput ) ; // TODO : Consider if BufferedIIS is a good idea
if ( ! ( stream instanceof BufferedImageInputStream ) ) { stream = new BufferedImageInputStream ( stream ) ; } // TODO : Might be mo... |
public class SchemaUsageAnalyzer { /** * Counts each property for which there is a statement in the given item
* document , ignoring the property thisPropertyIdValue to avoid properties
* counting themselves .
* @ param statementDocument
* @ param usageRecord
* @ param thisPropertyIdValue */
private void coun... | for ( StatementGroup sg : statementDocument . getStatementGroups ( ) ) { if ( ! sg . getProperty ( ) . equals ( thisPropertyIdValue ) ) { Integer propertyId = getNumId ( sg . getProperty ( ) . getId ( ) , false ) ; if ( ! usageRecord . propertyCoCounts . containsKey ( propertyId ) ) { usageRecord . propertyCoCounts . p... |
public class AnnotationExtensions { /** * Gets all annotated classes that belongs from the given package path and the given list with
* annotation classes .
* @ param packagePath
* the package path
* @ param annotationClasses
* the list with the annotation classes
* @ return the all classes
* @ throws Cla... | final List < File > directories = ClassExtensions . getDirectoriesFromResources ( packagePath , true ) ; final Set < Class < ? > > classes = new HashSet < > ( ) ; for ( final File directory : directories ) { classes . addAll ( scanForAnnotatedClassesFromSet ( directory , packagePath , annotationClasses ) ) ; } return c... |
public class BatchUnit { /** * 组件业务执行方法
* @ param msg 具体的消息 */
@ Override public void execute ( UnitRequest msg , Handler < UnitResponse > handler ) { } } | Single < UnitResponse > result ; boolean flush = msg . get ( FLUSH , Boolean . class , false ) ; // 是否马上提交
msg . getArgMap ( ) . remove ( FLUSH ) ; // 判断是否需要批量操作
if ( getBatchSize ( ) >= MIN_BATCH_SIZE ) { recordCacheList . add ( msg . getArgMap ( ) ) ; // 判断是否达到批量执行的数量阈值 , 或者业务需要立即执行
if ( recordCacheList . size ( ) >=... |
public class ObjectProfiler { /** * Computes the " shallow " size of an array instance . */
private static int sizeofArrayShell ( final int length , final Class componentType ) { } } | // this ignores memory alignment issues by design :
final int slotSize = componentType . isPrimitive ( ) ? sizeofPrimitiveType ( componentType ) : OBJREF_SIZE ; return OBJECT_SHELL_SIZE + INT_FIELD_SIZE + OBJREF_SIZE + length * slotSize ; |
public class AcroFields { /** * Sets the field value .
* @ param name the fully qualified field name or the partial name in the case of XFA forms
* @ param value the field value
* @ throws IOException on error
* @ throws DocumentException on error
* @ return < CODE > true < / CODE > if the field was found and... | return setField ( name , value , null ) ; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.