signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class ConfigImpl { /** * Initializes and returns the base URI specified by the " baseUrl " property * in the server - side config JavaScript * @ param cfg * the parsed config JavaScript * @ return the base URI * @ throws URISyntaxException */ protected Location loadBaseURI ( Scriptable cfg ) throws URI...
Object baseObj = cfg . get ( BASEURL_CONFIGPARAM , cfg ) ; Location result ; if ( baseObj == Scriptable . NOT_FOUND ) { result = new Location ( getConfigUri ( ) . resolve ( "." ) ) ; // $ NON - NLS - 1 $ } else { Location loc = loadLocation ( baseObj , true ) ; Location configLoc = new Location ( getConfigUri ( ) , loc...
public class HtmlBaseTag { /** * Sets the onMouseOver javascript event . * @ param onmouseover the onMouseOver event . * @ jsptagref . attributedescription The onMouseOver JavaScript event . * @ jsptagref . databindable false * @ jsptagref . attributesyntaxvalue < i > string _ onMouseOver < / i > * @ netui : ...
AbstractHtmlState tsh = getState ( ) ; tsh . registerAttribute ( AbstractHtmlState . ATTR_JAVASCRIPT , ONMOUSEOVER , onmouseover ) ;
public class Import { /** * helper : create a new KeyValue based on CF rename map */ private static Cell convertKv ( Cell kv , Map < byte [ ] , byte [ ] > cfRenameMap ) { } }
if ( cfRenameMap != null ) { // If there ' s a rename mapping for this CF , create a new KeyValue byte [ ] newCfName = cfRenameMap . get ( CellUtil . cloneFamily ( kv ) ) ; if ( newCfName != null ) { kv = new KeyValue ( kv . getRowArray ( ) , // row buffer kv . getRowOffset ( ) , // row offset kv . getRowLength ( ) , /...
public class DublinCoreMetadata { /** * Get the column from the row for the Dublin Core Type term * @ param row * user row * @ param type * Dublin Core Type * @ param < T > * column type * @ return column */ public static < T extends UserColumn > T getColumn ( UserCoreRow < T , ? > row , DublinCoreType ty...
return getColumn ( row . getTable ( ) , type ) ;
public class MessageProcessor { /** * @ parm key * @ parm command handler */ public void registerCommandHandler ( String key , CommandHandler handler ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "registerCommandHandler" , new Object [ ] { key , handler } ) ; // Add handler to table // Note that if there was already a handler with this key it ' s table // entry will // be overwritten synchronized ( _registeredHandler...
public class RegionDiskTypeClient { /** * Retrieves a list of regional disk types available to the specified project . * < p > Sample code : * < pre > < code > * try ( RegionDiskTypeClient regionDiskTypeClient = RegionDiskTypeClient . create ( ) ) { * ProjectRegionName region = ProjectRegionName . of ( " [ PROJ...
ListRegionDiskTypesHttpRequest request = ListRegionDiskTypesHttpRequest . newBuilder ( ) . setRegion ( region ) . build ( ) ; return listRegionDiskTypes ( request ) ;
public class ByteBufferHashTable { /** * Finds the bucket into which we should insert a key . * @ param keyBuffer key , must have exactly keySize bytes remaining . Will not be modified . * @ param targetTableBuffer Need selectable buffer , since when resizing hash table , * findBucket ( ) is used on the newly all...
// startBucket will never be negative since keyHash is always positive ( see Groupers . hash ) final int startBucket = keyHash % buckets ; int bucket = startBucket ; outer : while ( true ) { final int bucketOffset = bucket * bucketSizeWithHash ; if ( ( targetTableBuffer . get ( bucketOffset ) & 0x80 ) == 0 ) { // Found...
public class ComponentExposedTypeGenerator { /** * Add a method to the ExposedType proto . This allows referencing them as this . _ _ proto _ _ . myMethod * to pass them to Vue . js . This way of referencing works both in GWT2 and Closure . The method MUST * have the @ JsMethod annotation for this to work . */ priv...
String methodName = METHOD_IN_PROTO_PREFIX + methodsInProtoCount ; addMethodToProto ( methodName ) ; methodsInProtoCount ++ ; return methodName ;
public class Canvas { /** * Draws a scaled image at the specified location { @ code ( x , y ) } size { @ code ( w x h ) } . */ public Canvas draw ( Drawable image , float x , float y , float w , float h ) { } }
image . draw ( gc ( ) , x , y , w , h ) ; isDirty = true ; return this ;
public class Filters { /** * The Channel to use as a filter for the metrics returned . Only VOICE is supported . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setChannels ( java . util . Collection ) } or { @ link # withChannels ( java . util . Collection )...
if ( this . channels == null ) { setChannels ( new java . util . ArrayList < String > ( channels . length ) ) ; } for ( String ele : channels ) { this . channels . add ( ele ) ; } return this ;
public class Scope { /** * Specifies the parent scope for this scope . * If a scope cannot resolve a variable , it tries to resolve it using its parent scope . This permits to * share a certain set of variables . * @ param parent the parent scope to use . If < tt > null < / tt > , the common root scope is used wh...
if ( parent == null ) { this . parent = getRootScope ( ) ; } else { this . parent = parent ; } return this ;
public class BDBMap { /** * retrieve the value assoicated with keyStr from persistant storage * @ param keyStr * @ return String value associated with key , or null if no key is found * or an error occurs */ public String get ( String keyStr ) { } }
String result = null ; try { DatabaseEntry key = new DatabaseEntry ( keyStr . getBytes ( "UTF-8" ) ) ; DatabaseEntry data = new DatabaseEntry ( ) ; if ( db . get ( null , key , data , LockMode . DEFAULT ) == OperationStatus . SUCCESS ) { byte [ ] bytes = data . getData ( ) ; result = new String ( bytes , "UTF-8" ) ; } ...
public class AsyncJob { /** * Executes the provided code immediately on a background thread that will be submitted to the * provided ExecutorService * @ param onBackgroundJob Interface that wraps the code to execute * @ param executor Will queue the provided code */ public static FutureTask doInBackground ( final...
FutureTask task = ( FutureTask ) executor . submit ( new Runnable ( ) { @ Override public void run ( ) { onBackgroundJob . doOnBackground ( ) ; } } ) ; return task ;
public class LasCellsTable { /** * Insert cell values in the table * @ throws Exception */ public static void insertLasCell ( ASpatialDb db , int srid , LasCell cell ) throws Exception { } }
String sql = "INSERT INTO " + TABLENAME + " (" + COLUMN_GEOM + "," + COLUMN_SOURCE_ID + "," + COLUMN_POINTS_COUNT + "," + COLUMN_AVG_ELEV + "," + COLUMN_MIN_ELEV + "," + COLUMN_MAX_ELEV + "," + COLUMN_POSITION_BLOB + "," + COLUMN_AVG_INTENSITY + "," + COLUMN_MIN_INTENSITY + "," + COLUMN_MAX_INTENSITY + "," + COLUMN_INT...
public class AddressManager { /** * Get the address to which the passed in message should be sent to . * This can be an address contained in the { @ link RoutingTable } , or a * multicast address calculated from the header content of the message . * @ param message the message for which we want to find an address...
Set < Address > result = new HashSet < > ( ) ; String toParticipantId = message . getRecipient ( ) ; if ( Message . VALUE_MESSAGE_TYPE_MULTICAST . equals ( message . getType ( ) ) ) { handleMulticastMessage ( message , result ) ; } else if ( toParticipantId != null && routingTable . containsKey ( toParticipantId ) ) { ...
public class DRL6Expressions { /** * $ ANTLR start synpred2 _ DRL6Expressions */ public final void synpred2_DRL6Expressions_fragment ( ) throws RecognitionException { } }
// src / main / resources / org / drools / compiler / lang / DRL6Expressions . g : 138:44 : ( LEFT _ SQUARE RIGHT _ SQUARE ) // src / main / resources / org / drools / compiler / lang / DRL6Expressions . g : 138:45 : LEFT _ SQUARE RIGHT _ SQUARE { match ( input , LEFT_SQUARE , FOLLOW_LEFT_SQUARE_in_synpred2_DRL6Express...
public class AuditorModuleConfig { /** * Set the hostname and port of the target audit repository from * a well - formed URI * @ param uri URI containing the hostname and port to set */ public void setAuditRepositoryUri ( URI uri ) { } }
setAuditRepositoryHost ( uri . getHost ( ) ) ; setAuditRepositoryPort ( uri . getPort ( ) ) ; setAuditRepositoryTransport ( uri . getScheme ( ) ) ;
public class ManagedInstanceVulnerabilityAssessmentsInner { /** * Creates or updates the managed instance ' s vulnerability assessment . * @ param resourceGroupName The name of the resource group that contains the resource . You can obtain this value from the Azure Resource Manager API or the portal . * @ param man...
return createOrUpdateWithServiceResponseAsync ( resourceGroupName , managedInstanceName , parameters ) . toBlocking ( ) . single ( ) . body ( ) ;
public class HtmlGroupBaseTag { /** * Sets the default value ( can be an expression ) . * @ param defaultValue the default value * @ jsptagref . attributedescription The String literal or expression to be used as the default value . * @ jsptagref . databindable false * @ jsptagref . attributesyntaxvalue < i > s...
if ( defaultValue == null ) { String s = Bundle . getString ( "Tags_AttrValueRequired" , new Object [ ] { "defaultValue" } ) ; registerTagError ( s , null ) ; return ; } _defaultValue = defaultValue ;
public class PropertyObjectResolver { @ Override public Object resolveForObjectAndContext ( Object self , Context context ) { } }
return ReflectionUtils . getField ( self , this . propertyName ) ;
public class DateTime { /** * Returns the suffix or " units " of the duration as a string . The result will * be ms , s , m , h , d , w , n or y . * @ param duration The duration in the format # units , e . g . 1d or 6h * @ return Just the suffix , e . g . ' d ' or ' h ' * @ throws IllegalArgumentException if t...
if ( duration == null || duration . isEmpty ( ) ) { throw new IllegalArgumentException ( "Duration cannot be null or empty" ) ; } int unit = 0 ; while ( unit < duration . length ( ) && Character . isDigit ( duration . charAt ( unit ) ) ) { unit ++ ; } final String units = duration . substring ( unit ) . toLowerCase ( )...
public class CommerceAvailabilityEstimateLocalServiceBaseImpl { /** * Returns the number of rows matching the dynamic query . * @ param dynamicQuery the dynamic query * @ param projection the projection to apply to the query * @ return the number of rows matching the dynamic query */ @ Override public long dynami...
return commerceAvailabilityEstimatePersistence . countWithDynamicQuery ( dynamicQuery , projection ) ;
public class StringUtils { /** * Computes the Levenshtein ( edit ) distance of the two given Strings . * This method doesn ' t allow transposition , so one character transposed between two strings has a cost of 2 ( one insertion , one deletion ) . * The EditDistance class also implements the Levenshtein distance , ...
// Step 1 int n = s . length ( ) ; // length of s int m = t . length ( ) ; // length of t if ( n == 0 ) { return m ; } if ( m == 0 ) { return n ; } int [ ] [ ] d = new int [ n + 1 ] [ m + 1 ] ; // matrix // Step 2 for ( int i = 0 ; i <= n ; i ++ ) { d [ i ] [ 0 ] = i ; } for ( int j = 0 ; j <= m ; j ++ ) { d [ 0 ] [ j ...
public class FileUploaderEndpoint { /** * optional - Process uploaded file ( s ) depending on the specified technology . Default value is ' false ' */ protected void doPost ( HttpServletRequest request , HttpServletResponse response ) throws ServletException , IOException { } }
String tech = request . getParameter ( PARAMETER_TECH ) ; String workspaceId = request . getParameter ( PARAMETER_WORKSPACE ) ; // specify the unique workspace directory to upload the file ( s ) to . Collection < Part > filePartCollection = request . getParts ( ) ; String serverHostPort = request . getRequestURL ( ) . ...
public class DeviceTypesApi { /** * Get manifest properties * Get a Device Type & # 39 ; s manifest properties for a specific version . * @ param deviceTypeId Device Type ID . ( required ) * @ param version Manifest Version . ( required ) * @ return ApiResponse & lt ; ManifestPropertiesEnvelope & gt ; * @ thr...
com . squareup . okhttp . Call call = getManifestPropertiesValidateBeforeCall ( deviceTypeId , version , null , null ) ; Type localVarReturnType = new TypeToken < ManifestPropertiesEnvelope > ( ) { } . getType ( ) ; return apiClient . execute ( call , localVarReturnType ) ;
public class Ifc2x3tc1PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public EClass getIfcCurveOrEdgeCurve ( ) { } }
if ( ifcCurveOrEdgeCurveEClass == null ) { ifcCurveOrEdgeCurveEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc2x3tc1Package . eNS_URI ) . getEClassifiers ( ) . get ( 947 ) ; } return ifcCurveOrEdgeCurveEClass ;
public class Stats { /** * Round a double value to a specified number of decimal * places . * @ param val the value to be rounded . * @ param places the number of decimal places to round to . * @ return val rounded to places decimal places . */ public static double round ( double val , int places ) { } }
long factor = ( long ) Math . pow ( 10 , places ) ; // Shift the decimal the correct number of places // to the right . val = val * factor ; // Round to the nearest integer . long tmp = Math . round ( val ) ; // Shift the decimal the correct number of places // back to the left . return ( double ) tmp / factor ;
public class AdminfacesAutoConfiguration { /** * This { @ link WebServerFactoryCustomizer } adds a { @ link ServletContextInitializer } to the embedded servlet - container * which is equivalent to adminfaces ' s own { @ code META - INF / web - fragment . xml } . * @ return adminfaces web server factory customizer *...
return factory -> { factory . addErrorPages ( new ErrorPage ( HttpStatus . FORBIDDEN , "/403.jsf" ) , new ErrorPage ( AccessDeniedException . class , "/403.jsf" ) , new ErrorPage ( AccessLocalException . class , "/403.jsf" ) , new ErrorPage ( HttpStatus . NOT_FOUND , "/404.jsf" ) , new ErrorPage ( HttpStatus . INTERNAL...
public class PercentageColumn { /** * The group which the variable will be inside ( mostly for reset ) * @ param group ( may be null ) * @ return */ public String getGroupVariableName ( DJGroup group ) { } }
String columnToGroupByProperty = group . getColumnToGroupBy ( ) . getColumnProperty ( ) . getProperty ( ) ; return "variable-" + columnToGroupByProperty + "_" + getPercentageColumn ( ) . getColumnProperty ( ) . getProperty ( ) + "_percentage" ;
public class BytesArray { /** * Split byte array by a separator byte . * @ param sep the separator * @ return a list of byte arrays */ public List < byte [ ] > split ( byte sep ) { } }
List < byte [ ] > l = new LinkedList < > ( ) ; int start = 0 ; for ( int i = 0 ; i < bytes . length ; i ++ ) { if ( sep == bytes [ i ] ) { byte [ ] b = Arrays . copyOfRange ( bytes , start , i ) ; if ( b . length > 0 ) { l . add ( b ) ; } start = i + 1 ; i = start ; } } l . add ( Arrays . copyOfRange ( bytes , start , ...
public class Image { /** * Scale the image to an absolute width . * @ param newWidth * the new width */ public void scaleAbsoluteWidth ( float newWidth ) { } }
plainWidth = newWidth ; float [ ] matrix = matrix ( ) ; scaledWidth = matrix [ DX ] - matrix [ CX ] ; scaledHeight = matrix [ DY ] - matrix [ CY ] ; setWidthPercentage ( 0 ) ;
public class Change { /** * Returns change ' s info in string format . * @ param preText the text before change info . * @ return change info . */ public String getChangeInfo ( String preText ) { } }
StringBuilder s = new StringBuilder ( ) ; s . append ( preText + "\n" ) ; s . append ( "Subject: " + getSubject ( ) + "\n" ) ; s . append ( "Project: " + getProject ( ) + " " + getBranch ( ) + " " + getId ( ) + "\n" ) ; s . append ( "Link: " + getUrl ( ) + "\n" ) ; return s . toString ( ) ;
public class MetaDataService { /** * Delete entities from entity group . * @ param entityGroupName Entity group name . * @ param entities Entities to replace . @ return { @ code true } if entities added . * @ return is success * @ throws AtsdClientException raised if there is any client problem * @ throws Ats...
checkEntityGroupIsEmpty ( entityGroupName ) ; List < String > entitiesNames = new ArrayList < > ( ) ; for ( Entity entity : entities ) { entitiesNames . add ( entity . getName ( ) ) ; } QueryPart < Entity > query = new Query < Entity > ( "entity-groups" ) . path ( entityGroupName , true ) . path ( "entities/delete" ) ;...
public class LogBuffer { /** * Return next 40 - bit unsigned int from buffer . ( big - endian ) * @ see mysql - 5.6.10 / include / myisampack . h - mi _ uint5korr */ public final long getBeUlong40 ( ) { } }
if ( position + 4 >= origin + limit ) throw new IllegalArgumentException ( "limit excceed: " + ( position - origin + 4 ) ) ; byte [ ] buf = buffer ; return ( ( long ) ( 0xff & buf [ position ++ ] ) << 32 ) | ( ( long ) ( 0xff & buf [ position ++ ] ) << 24 ) | ( ( long ) ( 0xff & buf [ position ++ ] ) << 16 ) | ( ( long...
public class JdbcPatternUtil { /** * 得到sql模式串中的原模原样的key */ protected static List < String > getOriginalKeys ( String sqlFragment ) { } }
List < String > keys = new ArrayList < String > ( ) ; if ( sqlFragment . contains ( "{" ) ) { String key = sqlFragment . substring ( sqlFragment . indexOf ( '{' ) + 1 , sqlFragment . indexOf ( '}' ) ) . trim ( ) ; keys . add ( key ) ; keys . addAll ( getOriginalKeys ( sqlFragment . substring ( sqlFragment . indexOf ( '...
public class AuthorizationImpl { /** * Adds the < code > IPermissionSet < / code > to the entity cache . */ protected void cacheAdd ( IPermissionSet ps ) throws AuthorizationException { } }
try { EntityCachingService . getEntityCachingService ( ) . add ( ps ) ; } catch ( CachingException ce ) { throw new AuthorizationException ( "Problem adding permissions for " + ps + " to cache" , ce ) ; }
public class AttributeKey { /** * Creates a new { @ link ServletContext } - scoped { @ link AttributeKey } . */ public static < T > AttributeKey < T > appScoped ( ) { } }
return new AttributeKey < T > ( ) { public T get ( HttpServletRequest req ) { return ( T ) getContext ( req ) . getAttribute ( name ) ; } public void set ( HttpServletRequest req , T value ) { getContext ( req ) . setAttribute ( name , value ) ; } public void remove ( HttpServletRequest req ) { getContext ( req ) . rem...
public class FastSynchHashTable { /** * This routine returns a snapshot of all the values in the hash table . * CAUTION : The entries returned may no longer be valid , so code that * processes * of the return values should be aware of this . The main reason for * this function is to provide a way of dumping the...
List < Object > values = new ArrayList < Object > ( ) ; FastSyncHashBucket hb = null ; FastSyncHashEntry e = null ; for ( int i = 0 ; i < xVar ; i ++ ) { for ( int j = 0 ; j < yVar ; j ++ ) { hb = mainTable [ i ] [ j ] ; synchronized ( hb ) { e = hb . root ; while ( e != null ) { values . add ( e . value ) ; e = e . ne...
public class CmsCategoryTree { /** * Sorts a list of tree items according to the sort parameter . < p > * @ param items the items to sort * @ param sort the sort parameter */ protected void sort ( List < CmsTreeItem > items , SortParams sort ) { } }
int sortParam = - 1 ; boolean ascending = true ; switch ( sort ) { case tree : m_quickSearch . setFormValueAsString ( "" ) ; m_listView = false ; updateContentTree ( ) ; break ; case title_asc : sortParam = 0 ; break ; case title_desc : sortParam = 0 ; ascending = false ; break ; case path_asc : sortParam = 1 ; break ;...
public class HolidayCalendar { /** * Determine the next time ( in milliseconds ) that is ' included ' by the * Calendar after the given time . * Note that this Calendar is only has full - day precision . */ @ Override public long getNextIncludedTime ( final long nTimeStamp ) { } }
// Call base calendar implementation first long timeStamp = nTimeStamp ; final long baseTime = super . getNextIncludedTime ( timeStamp ) ; if ( ( baseTime > 0 ) && ( baseTime > timeStamp ) ) { timeStamp = baseTime ; } // Get timestamp for 00:00:00 final Calendar day = getStartOfDayJavaCalendar ( timeStamp ) ; while ( i...
public class EhcacheCachingProvider { /** * { @ inheritDoc } */ @ Override public void close ( final URI uri , final ClassLoader classLoader ) { } }
if ( uri == null || classLoader == null ) { throw new NullPointerException ( ) ; } synchronized ( cacheManagers ) { final ConcurrentMap < URI , Eh107CacheManager > map = cacheManagers . get ( classLoader ) ; if ( map != null ) { final Eh107CacheManager cacheManager = map . remove ( uri ) ; if ( cacheManager != null ) {...
public class CodeScriptAction { /** * 编辑 */ public String edit ( ) { } }
Integer codeScriptId = getInt ( "codeScriptId" ) ; CodeScript codeScript = null ; if ( null == codeScriptId ) { codeScript = ( CodeScript ) populate ( CodeScript . class , "codeScript" ) ; } else { codeScript = ( CodeScript ) entityDao . get ( CodeScript . class , codeScriptId ) ; } put ( "codeScript" , codeScript ) ; ...
public class LocaleFormatter { /** * Format the passed value according to the rules specified by the given * locale . All fraction digits of the passed value are displayed . * @ param aValue * The value to be formatted . May not be < code > null < / code > . * @ param aDisplayLocale * The locale to be used . ...
ValueEnforcer . notNull ( aValue , "Value" ) ; ValueEnforcer . notNull ( aDisplayLocale , "DisplayLocale" ) ; final NumberFormat aNF = NumberFormat . getInstance ( aDisplayLocale ) ; aNF . setMaximumFractionDigits ( aValue . scale ( ) ) ; return aNF . format ( aValue ) ;
public class CPMeasurementUnitPersistenceImpl { /** * Removes the cp measurement unit where uuid = & # 63 ; and groupId = & # 63 ; from the database . * @ param uuid the uuid * @ param groupId the group ID * @ return the cp measurement unit that was removed */ @ Override public CPMeasurementUnit removeByUUID_G ( ...
CPMeasurementUnit cpMeasurementUnit = findByUUID_G ( uuid , groupId ) ; return remove ( cpMeasurementUnit ) ;
public class ServletResponseWrapper { /** * Checks ( recursively ) if this ServletResponseWrapper wraps a * { @ link ServletResponse } of the given class type . * @ param wrappedType the ServletResponse class type to * search for * @ return true if this ServletResponseWrapper wraps a * ServletResponse of the ...
if ( ! ServletResponse . class . isAssignableFrom ( wrappedType ) ) { throw new IllegalArgumentException ( "Given class " + wrappedType . getName ( ) + " not a subinterface of " + ServletResponse . class . getName ( ) ) ; } if ( wrappedType . isAssignableFrom ( response . getClass ( ) ) ) { return true ; } else if ( re...
public class UnicodeSet { /** * Close this set over the given attribute . For the attribute * CASE , the result is to modify this set so that : * 1 . For each character or string ' a ' in this set , all strings * ' b ' such that foldCase ( a ) = = foldCase ( b ) are added to this set . * ( For most ' a ' that a...
checkFrozen ( ) ; if ( ( attribute & ( CASE | ADD_CASE_MAPPINGS ) ) != 0 ) { UCaseProps csp = UCaseProps . INSTANCE ; UnicodeSet foldSet = new UnicodeSet ( this ) ; ULocale root = ULocale . ROOT ; // start with input set to guarantee inclusion // CASE : remove strings because the strings will actually be reduced ( fold...
public class CRC32FileDigester { /** * { @ inheritDoc } */ public String calculate ( File file ) throws DigesterException { } }
CheckedInputStream cis ; try { cis = new CheckedInputStream ( new FileInputStream ( file ) , new CRC32 ( ) ) ; } catch ( FileNotFoundException e ) { throw new DigesterException ( "Unable to read " + file . getPath ( ) + ": " + e . getMessage ( ) ) ; } byte [ ] buf = new byte [ STREAMING_BUFFER_SIZE ] ; try { while ( ci...
public class SnapshotTaskClientImpl { /** * { @ inheritDoc } */ @ Override public GetSnapshotListTaskResult getSnapshots ( ) throws ContentStoreException { } }
String taskResult = contentStore . performTask ( SnapshotConstants . GET_SNAPSHOTS_TASK_NAME , "" ) ; return GetSnapshotListTaskResult . deserialize ( taskResult ) ;
public class TimerJobEntityManagerImpl { /** * Removes the job ' s execution ' s reference to this job , if the job has an associated execution . * Subclasses may override to provide custom implementations . */ protected void removeExecutionLink ( TimerJobEntity jobEntity ) { } }
if ( jobEntity . getExecutionId ( ) != null ) { ExecutionEntity execution = getExecutionEntityManager ( ) . findById ( jobEntity . getExecutionId ( ) ) ; if ( execution != null ) { execution . getTimerJobs ( ) . remove ( jobEntity ) ; } }
public class StringUtils { /** * 根据正则表达式提取字符串 * @ param text 源字符串 * @ param regex 正则表达式 * @ return 所以符合正则表达式的字符串的集合 */ public static List < String > getStringsByRegex ( final String text , final String regex ) { } }
Pattern pattern = Pattern . compile ( regex ) ; Matcher matcher = pattern . matcher ( text ) ; List < String > matchedStrings = new ArrayList < String > ( ) ; while ( matcher . find ( ) ) { matchedStrings . add ( matcher . group ( 0 ) ) ; } return matchedStrings ;
public class HiveSessionImplwithUGI { /** * If the session has a delegation token obtained from the metastore , then cancel it */ private void cancelDelegationToken ( ) throws HiveSQLException { } }
if ( delegationTokenStr != null ) { try { Hive . get ( getHiveConf ( ) ) . cancelDelegationToken ( delegationTokenStr ) ; } catch ( HiveException e ) { throw new HiveSQLException ( "Couldn't cancel delegation token" , e ) ; } // close the metastore connection created with this delegation token Hive . closeCurrent ( ) ;...
public class PrepareStatement { /** * Construct a { @ link PrepareStatement } from a select - like { @ link Statement } and give it a name . * Note that passing a { @ link PrepareStatement } or a { @ link PreparedPayload } will reuse the * { @ link PrepareStatement # originalStatement ( ) original statement } but u...
Statement original ; if ( statement instanceof PrepareStatement ) { original = ( ( PrepareStatement ) statement ) . originalStatement ( ) ; } else if ( statement instanceof PreparedPayload ) { original = ( ( PreparedPayload ) statement ) . originalStatement ( ) ; } else { original = statement ; } return new PrepareStat...
public class NullAway { /** * A safe init method is an instance method that is either private or final ( so no overriding is * possible ) * @ param stmt the statement * @ param enclosingClassSymbol symbol for enclosing constructor / initializer * @ param state visitor state * @ return element of safe init fun...
Matcher < ExpressionTree > invokeMatcher = ( expressionTree , s ) -> { if ( ! ( expressionTree instanceof MethodInvocationTree ) ) { return false ; } MethodInvocationTree methodInvocationTree = ( MethodInvocationTree ) expressionTree ; Symbol . MethodSymbol symbol = ASTHelpers . getSymbol ( methodInvocationTree ) ; Set...
public class ConnectResponse { /** * / * ( non - Javadoc ) * @ see tuwien . auto . calimero . knxnetip . servicetype . ServiceType # toByteArray * ( java . io . ByteArrayOutputStream ) */ byte [ ] toByteArray ( ByteArrayOutputStream os ) { } }
os . write ( channelid ) ; os . write ( status ) ; if ( endpt != null && crd != null ) { byte [ ] buf = endpt . toByteArray ( ) ; os . write ( buf , 0 , buf . length ) ; buf = crd . toByteArray ( ) ; os . write ( buf , 0 , buf . length ) ; } return os . toByteArray ( ) ;
public class PredictionsImpl { /** * Predict an image url and saves the result . * @ param projectId The project id * @ param predictImageUrlOptionalParameter the object representing the optional parameters to be set before calling this API * @ throws IllegalArgumentException thrown if parameters fail the validat...
return predictImageUrlWithServiceResponseAsync ( projectId , predictImageUrlOptionalParameter ) . toBlocking ( ) . single ( ) . body ( ) ;
public class CoalescedWriteBehindQueue { /** * Removes the first occurrence of the specified element in this queue * when searching it by starting from the head of this queue . * @ param incoming element to be removed . * @ return < code > true < / code > if removed successfully , < code > false < / code > otherw...
Data incomingKey = ( Data ) incoming . getKey ( ) ; Object incomingValue = incoming . getValue ( ) ; DelayedEntry current = map . get ( incomingKey ) ; if ( current == null ) { return false ; } Object currentValue = current . getValue ( ) ; if ( incomingValue == null && currentValue == null || incomingValue != null && ...
public class LssClient { /** * Resume your live session by live session id . * @ param request The request object containing all parameters for resuming live session . * @ return the response */ public ResumeSessionResponse resumeSession ( ResumeSessionRequest request ) { } }
checkNotNull ( request , "The parameter request should NOT be null." ) ; checkStringNotEmpty ( request . getSessionId ( ) , "The parameter sessionId should NOT be null or empty string." ) ; InternalRequest internalRequest = createRequest ( HttpMethodName . PUT , request , LIVE_SESSION , request . getSessionId ( ) ) ; i...
public class AbstractHalProcessor { /** * Generates and writes java code in one call . * @ param template the relative template name ( w / o path or package name ) * @ param packageName the package name * @ param className the class name * @ param context a function to create the templates ' context */ protecte...
StringBuffer code = generate ( template , context ) ; writeCode ( packageName , className , code ) ;
public class AST { /** * Uses reflection to find the given direct child on the given statement , and replace it with a new child . */ protected boolean replaceStatementInNode ( N statement , N oldN , N newN ) { } }
for ( FieldAccess fa : fieldsOf ( statement . getClass ( ) ) ) { if ( replaceStatementInField ( fa , statement , oldN , newN ) ) return true ; } return false ;
public class JSLocalConsumerPoint { /** * Start this LCP . If there are any synchronous receives waiting , wake them up * If there is a AsynchConsumerCallback registered look on the QP for messages * for asynch delivery . If deliverImmediately is set , this Thread is used to deliver * any initial messages rather ...
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "start" , new Object [ ] { Boolean . valueOf ( deliverImmediately ) , this } ) ; // Register that LCP has been stopped by a request to stop _stoppedByRequest = false ; // Run the private method internalStart ( deliverImmedia...
public class CircuitsExtractorImpl { /** * Check transitions groups , and create compatible circuit on the fly . * @ param circuits The circuits collection . * @ param circuit The circuit found . * @ param map The map reference . * @ param ref The tile ref to add . */ private static void checkTransitionGroups (...
final MapTileGroup mapGroup = map . getFeature ( MapTileGroup . class ) ; final MapTileTransition mapTransition = map . getFeature ( MapTileTransition . class ) ; final String group = mapGroup . getGroup ( ref ) ; for ( final String groupTransition : mapGroup . getGroups ( ) ) { if ( mapTransition . getTransitives ( gr...
public class ExtendedPathView { /** * { @ inheritDoc } */ public String getRelation ( int position ) { } }
if ( position < length - 1 ) return original . getRelation ( position ) ; // Check that the request isn ' t for an invalid index else if ( position >= length ) throw new IllegalArgumentException ( "invalid relation: " + position ) ; else return extension . relation ( ) ;
public class JvmMemberImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public void unsetDeprecated ( ) { } }
boolean oldDeprecated = deprecated ; boolean oldDeprecatedESet = deprecatedESet ; deprecated = DEPRECATED_EDEFAULT ; deprecatedESet = false ; if ( eNotificationRequired ( ) ) eNotify ( new ENotificationImpl ( this , Notification . UNSET , TypesPackage . JVM_MEMBER__DEPRECATED , oldDeprecated , DEPRECATED_EDEFAULT , old...
public class Validate { /** * Checks if a given value has a specific type . * @ param value The value to validate . * @ param type The target type for the given value . * @ throws ParameterException if the type of the given value is not a valid subclass of the target type . */ public static < T , V extends Object...
if ( ! validation ) return ; notNull ( value ) ; notNull ( type ) ; if ( ! type . isAssignableFrom ( value . getClass ( ) ) ) { throw new TypeException ( type . getCanonicalName ( ) ) ; }
public class SimplePicker { /** * Override afterPaint in order to paint the UIContext serialization statistics if the profile button has been * pressed . * @ param renderContext the renderContext to send output to . */ @ Override protected void afterPaint ( final RenderContext renderContext ) { } }
super . afterPaint ( renderContext ) ; if ( profileBtn . isPressed ( ) ) { // UIC serialization stats UicStats stats = new UicStats ( UIContextHolder . getCurrent ( ) ) ; WComponent currentComp = this . getCurrentComponent ( ) ; if ( currentComp != null ) { stats . analyseWC ( currentComp ) ; } if ( renderContext insta...
public class Maps { /** * Returns a { @ link UnaryOperator } that maps a { @ link String } to lower case using { @ code locale } . */ public static UnaryOperator < String > toLowerCase ( final Locale locale ) { } }
return new UnaryOperator < String > ( ) { @ Override public String apply ( String s ) { return s . toLowerCase ( locale ) ; } @ Override public String toString ( ) { return "toLowerCase" ; } } ;
public class LogFileWriter { /** * Read all of the events starting at a specific file offset * @ return All of the UI events */ public List < Pair < UIEvent , Table > > readEvents ( long startOffset ) throws IOException { } }
if ( endStaticInfoOffset >= file . length ( ) ) { return Collections . emptyList ( ) ; } List < Pair < UIEvent , Table > > out = new ArrayList < > ( ) ; try ( RandomAccessFile f = new RandomAccessFile ( file , "r" ) ; FileChannel fc = f . getChannel ( ) ) { f . seek ( startOffset ) ; while ( f . getFilePointer ( ) < f ...
public class JavaLexer { /** * $ ANTLR start " JavaLetter " */ public final void mJavaLetter ( ) throws RecognitionException { } }
try { // src / main / resources / org / drools / compiler / semantics / java / parser / Java . g : 1379:2 : ( ( ' a ' . . ' z ' | ' A ' . . ' Z ' | ' $ ' | ' _ ' ) | { . . . } ? ~ ( ' \ \ u0000 ' . . ' \ \ u007F ' | ' \ \ uD800 ' . . ' \ \ uDBFF ' ) | { . . . } ? ( ' \ \ uD800 ' . . ' \ \ uDBFF ' ) ( ' \ \ uDC00 ' . . ...
public class EntityGroupImpl { /** * Sets the service Name of the group service of origin . */ public void setServiceName ( Name newServiceName ) throws GroupsException { } }
try { getCompositeEntityIdentifier ( ) . setServiceName ( newServiceName ) ; } catch ( javax . naming . InvalidNameException ine ) { throw new GroupsException ( "Problem setting service name" , ine ) ; }
public class SpecifiedIndex { /** * Iterate over a cross product of the * coordinates * @ param indexes the coordinates to iterate over . * Each element of the array should be of opType { @ link SpecifiedIndex } * otherwise it will end up throwing an exception * @ return the generator for iterating over all t...
Generator < List < List < Long > > > gen = Itertools . product ( new SpecifiedIndexesGenerator ( indexes ) ) ; return gen ;
public class MCCImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public void eUnset ( int featureID ) { } }
switch ( featureID ) { case AfplibPackage . MCC__RG : getRg ( ) . clear ( ) ; return ; } super . eUnset ( featureID ) ;
public class GaloisField { /** * Compute power n of a field * @ param x input field * @ param n power * @ return x ^ n */ public int power ( int x , int n ) { } }
assert ( x >= 0 && x < getFieldSize ( ) ) ; if ( n == 0 ) { return 1 ; } if ( x == 0 ) { return 0 ; } x = logTable [ x ] * n ; if ( x < primitivePeriod ) { return powTable [ x ] ; } x = x % primitivePeriod ; return powTable [ x ] ;
public class TargetAssignmentOperations { /** * Create the Assignment Confirmation Tab * @ param actionTypeOptionGroupLayout * the action Type Option Group Layout * @ param maintenanceWindowLayout * the Maintenance Window Layout * @ param saveButtonToggle * The event listener to derimne if save button shoul...
final CheckBox maintenanceWindowControl = maintenanceWindowControl ( i18n , maintenanceWindowLayout , saveButtonToggle ) ; final Link maintenanceWindowHelpLink = maintenanceWindowHelpLinkControl ( uiProperties , i18n ) ; final HorizontalLayout layout = createHorizontalLayout ( maintenanceWindowControl , maintenanceWind...
public class DataModelSerializer { /** * Convert a POJO into Serialized JSON form . * @ param o the POJO to serialize * @ return a String containing the JSON data . * @ throws IOException when there are problems creating the Json . */ public static String serializeAsString ( Object o ) throws IOException { } }
try { JsonStructure builtJsonObject = findFieldsToSerialize ( o ) . mainObject ; return builtJsonObject . toString ( ) ; } catch ( IllegalStateException ise ) { // the reflective attempt to build the object failed . throw new IOException ( "Unable to build JSON for Object" , ise ) ; } catch ( JsonException e ) { throw ...
public class BigMoney { /** * Returns a copy of this monetary value converted into another currency * using the specified conversion rate . * The scale of the result will be the sum of the scale of this money and * the scale of the multiplier . If desired , the scale of the result can be * adjusted to the scale...
MoneyUtils . checkNotNull ( currency , "CurrencyUnit must not be null" ) ; MoneyUtils . checkNotNull ( conversionMultipler , "Multiplier must not be null" ) ; if ( this . currency == currency ) { if ( conversionMultipler . compareTo ( BigDecimal . ONE ) == 0 ) { return this ; } throw new IllegalArgumentException ( "Can...
public class NettyChannelFactory { /** * Converts the given negotiation type to netty ' s negotiation type . * @ param negotiationType The negotiation type to convert . * @ return The converted negotiation type . */ protected static io . grpc . netty . NegotiationType of ( final NegotiationType negotiationType ) { ...
switch ( negotiationType ) { case PLAINTEXT : return io . grpc . netty . NegotiationType . PLAINTEXT ; case PLAINTEXT_UPGRADE : return io . grpc . netty . NegotiationType . PLAINTEXT_UPGRADE ; case TLS : return io . grpc . netty . NegotiationType . TLS ; default : throw new IllegalArgumentException ( "Unsupported Negot...
public class SubscriptionAndPublication { /** * this is used for identification in # toString */ public static void main ( String [ ] args ) { } }
// Listeners are subscribed by passing them to the # subscribe ( ) method bus . subscribe ( new ListenerDefinition . SyncAsyncListener ( ) ) ; // # subscribe ( ) is idem - potent = > Multiple calls to subscribe do NOT add the listener more than once ( set semantics ) Object listener = new ListenerDefinition . SyncAsync...
public class CellConstraints { /** * Decodes an integer string representation and returns the associated Integer or null in case * of an invalid number format . * @ param tokenthe encoded integer * @ return the decoded Integer or null */ private static Integer decodeInt ( String token ) { } }
try { return Integer . decode ( token ) ; } catch ( NumberFormatException e ) { return null ; }
public class RiakNode { /** * Get a Netty channel from the pool . * The first thing this method does is attempt to acquire a permit from the * Semaphore that controls the pool ' s behavior . Depending on whether * { @ code blockOnMaxConnections } is set , this will either block until one * becomes available or ...
stateCheck ( State . RUNNING , State . HEALTH_CHECKING ) ; boolean acquired = false ; if ( blockOnMaxConnections ) { try { logger . debug ( "Attempting to acquire channel permit" ) ; if ( ! permits . tryAcquire ( ) ) { logger . info ( "All connections in use for {}; had to wait for one." , remoteAddress ) ; permits . a...
public class AddTagsToStreamRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( AddTagsToStreamRequest addTagsToStreamRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( addTagsToStreamRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( addTagsToStreamRequest . getStreamName ( ) , STREAMNAME_BINDING ) ; protocolMarshaller . marshall ( addTagsToStreamRequest . getTags ( ) , TAGS_BINDING ) ; } catc...
public class DescribeCacheSecurityGroupsResult { /** * A list of cache security groups . Each element in the list contains detailed information about one group . * @ param cacheSecurityGroups * A list of cache security groups . Each element in the list contains detailed information about one group . */ public void ...
if ( cacheSecurityGroups == null ) { this . cacheSecurityGroups = null ; return ; } this . cacheSecurityGroups = new com . amazonaws . internal . SdkInternalList < CacheSecurityGroup > ( cacheSecurityGroups ) ;
public class VirtualWANsInner { /** * Creates a VirtualWAN resource if it doesn ' t exist else updates the existing VirtualWAN . * @ param resourceGroupName The resource group name of the VirtualWan . * @ param virtualWANName The name of the VirtualWAN being created or updated . * @ param wANParameters Parameters...
if ( this . client . subscriptionId ( ) == null ) { throw new IllegalArgumentException ( "Parameter this.client.subscriptionId() is required and cannot be null." ) ; } if ( resourceGroupName == null ) { throw new IllegalArgumentException ( "Parameter resourceGroupName is required and cannot be null." ) ; } if ( virtual...
public class CPDefinitionLinkUtil { /** * Returns the first cp definition link in the ordered set where uuid = & # 63 ; and companyId = & # 63 ; . * @ param uuid the uuid * @ param companyId the company ID * @ param orderByComparator the comparator to order the set by ( optionally < code > null < / code > ) * @...
return getPersistence ( ) . fetchByUuid_C_First ( uuid , companyId , orderByComparator ) ;
public class SlidingUpPanelLayout { /** * Change panel state to the given state with * @ param state - new panel state */ public void setPanelState ( PanelState state ) { } }
// Abort any running animation , to allow state change if ( mDragHelper . getViewDragState ( ) == ViewDragHelper . STATE_SETTLING ) { Log . d ( TAG , "View is settling. Aborting animation." ) ; mDragHelper . abort ( ) ; } if ( state == null || state == PanelState . DRAGGING ) { throw new IllegalArgumentException ( "Pan...
public class FessMessages { /** * Add the created action message for the key ' errors . design _ file _ name _ is _ invalid ' with parameters . * < pre > * message : The file name is invalid . * < / pre > * @ param property The property name for the message . ( NotNull ) * @ return this . ( NotNull ) */ publi...
assertPropertyNotNull ( property ) ; add ( property , new UserMessage ( ERRORS_design_file_name_is_invalid ) ) ; return this ;
public class AbstractDecoderChannel { /** * Decode Date - Time as sequence of values representing the individual * components of the Date - Time . */ public DateTimeValue decodeDateTimeValue ( DateTimeType type ) throws IOException { } }
int year = 0 , monthDay = 0 , time = 0 , fractionalSecs = 0 ; switch ( type ) { case gYear : // Year , [ Time - Zone ] year = decodeInteger ( ) + DateTimeValue . YEAR_OFFSET ; break ; case gYearMonth : // Year , MonthDay , [ TimeZone ] case date : // Year , MonthDay , [ TimeZone ] year = decodeInteger ( ) + DateTimeVal...
public class AVUser { /** * signUpOrLoginByMobilePhoneInBackground * @ param mobilePhoneNumber * @ param smsCode * @ return */ public static Observable < ? extends AVUser > signUpOrLoginByMobilePhoneInBackground ( String mobilePhoneNumber , String smsCode ) { } }
return signUpOrLoginByMobilePhoneInBackground ( mobilePhoneNumber , smsCode , internalUserClazz ( ) ) ;
public class InfluxDBResultMapper { /** * InfluxDB client returns any number as Double . * See https : / / github . com / influxdata / influxdb - java / issues / 153 # issuecomment - 259681987 * for more information . * @ param object * @ param field * @ param value * @ param precision * @ throws IllegalA...
if ( value == null ) { return ; } Class < ? > fieldType = field . getType ( ) ; try { if ( ! field . isAccessible ( ) ) { field . setAccessible ( true ) ; } if ( fieldValueModified ( fieldType , field , object , value , precision ) || fieldValueForPrimitivesModified ( fieldType , field , object , value ) || fieldValueF...
public class PersistenceUnitMetadata { /** * ( non - Javadoc ) * @ see javax . persistence . spi . PersistenceUnitInfo # getJarFileUrls ( ) */ @ Override public List < URL > getJarFileUrls ( ) { } }
return jarUrls != null ? new ArrayList < URL > ( jarUrls ) : null ;
public class JoynrMessageScope { /** * Call this method to activate the { @ link JoynrMessageScope } for the current thread . It is not valid to call this * method more than once . * @ throws IllegalStateException * if you have already activated this scope for the current thread . */ public void activate ( ) { } ...
if ( entries . get ( ) != null ) { throw new IllegalStateException ( "Scope " + JoynrMessageScope . class . getSimpleName ( ) + " is already active." ) ; } logger . trace ( "Activating {} scope" , JoynrMessageScope . class . getSimpleName ( ) ) ; entries . set ( new HashMap < Key < ? > , Object > ( ) ) ;
public class HelpFrame { /** * Creates the layout . */ private void createLayout ( ) { } }
jlabelTitle = new JLabel ( newLabelHelpText ( ) ) ; getContentPane ( ) . add ( jlabelTitle , BorderLayout . NORTH ) ; // JTextArea Help : jtaHelp = new JTextArea ( 10 , 10 ) ; jtpHelp = new JTextPane ( ) ; jtpHelp . replaceSelection ( helptext ) ; jtaHelp . setText ( helptext ) ; jtaHelp . setCaretPosition ( 0 ) ; jtaH...
public class ObjectByteExtentImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public void eUnset ( int featureID ) { } }
switch ( featureID ) { case AfplibPackage . OBJECT_BYTE_EXTENT__BYTE_EXT : setByteExt ( BYTE_EXT_EDEFAULT ) ; return ; case AfplibPackage . OBJECT_BYTE_EXTENT__BYTE_EXT_HI : setByteExtHi ( BYTE_EXT_HI_EDEFAULT ) ; return ; } super . eUnset ( featureID ) ;
public class PropertyUtils { /** * Get setter name . " setName " - > " name " * @ param m Method object . * @ return Property name of this setter . */ private static String getSetterName ( Method m ) { } }
String name = m . getName ( ) ; if ( name . startsWith ( "set" ) && ( name . length ( ) >= 4 ) && m . getReturnType ( ) . equals ( void . class ) && ( m . getParameterTypes ( ) . length == 1 ) ) { return Character . toLowerCase ( name . charAt ( 3 ) ) + name . substring ( 4 ) ; } return null ;
public class CMStatefulBeanO { /** * Enlist this < code > SessionBeanO < / code > instance in the * given transaction . < p > * @ param tx the < code > ContainerTx < / code > this instance is being * enlisted in < p > */ @ Override public final synchronized boolean enlist ( ContainerTx tx , boolean txEnlist ) // ...
final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "enlist: " + getStateName ( state ) , new Object [ ] { tx , txEnlist } ) ; switch ( state ) { case METHOD_READY : // A thread is about to invoke a method in the context // of the given tran...
public class GenericUtils { /** * Helper method to append a byte to a byte array . * @ param src byte array * @ param b byte to be appended to the src byte array * @ return target byte array */ static public byte [ ] expandByteArray ( byte [ ] src , byte b ) { } }
int srcLength = ( null != src ) ? src . length : 0 ; int totalLen = srcLength + 1 ; byte [ ] rc = new byte [ totalLen ] ; try { if ( null != src ) { System . arraycopy ( src , 0 , rc , 0 , srcLength ) ; } rc [ srcLength ] = b ; } catch ( Exception e ) { // no FFDC required // any error from arraycopy , we ' ll just ret...
public class CassandraEmbeddedStoreManager { /** * This implementation can ' t handle counter columns . * The private method internal _ batch _ mutate in CassandraServer as of 1.2.0 * provided most of the following method after transaction handling . */ @ Override public void mutateMany ( Map < String , Map < Stati...
Preconditions . checkNotNull ( mutations ) ; final MaskedTimestamp commitTime = new MaskedTimestamp ( txh ) ; int size = 0 ; for ( Map < StaticBuffer , KCVMutation > mutation : mutations . values ( ) ) size += mutation . size ( ) ; Map < StaticBuffer , org . apache . cassandra . db . Mutation > rowMutations = new HashM...
public class Schedulable { /** * Distribute the total share among the list of schedulables according to the * PRIORITY model . Note that the eventual intent is to determine if * preemption is necessary . So , we need to assign the most ideal share on * each schedulable beyond which preemption is necessary . * F...
// 1 ) If share < sum ( min ( demand , min _ alloc ) ) then do fair share and quit . double residualShare = assignShareIfUnderAllocated ( total , schedulables ) ; if ( residualShare <= 0.0 ) { return ; } // 2 ) Group schedulables according to priorities . TreeMap < Integer , Vector < Schedulable > > prioritizedSchedula...
public class LineItemSummary { /** * Gets the costPerUnit value for this LineItemSummary . * @ return costPerUnit * The amount of money to spend per impression or click . This * attribute is * required for creating a { @ code LineItem } . */ public com . google . api . ads . admanager . axis . v201808 . Money get...
return costPerUnit ;
public class ProductSearchClient { /** * Lists the Products in a ProductSet , in an unspecified order . If the ProductSet does not exist , * the products field of the response will be empty . * < p > Possible errors : * < p > & # 42 ; Returns INVALID _ ARGUMENT if page _ size is greater than 100 or less than 1. ...
ListProductsInProductSetRequest request = ListProductsInProductSetRequest . newBuilder ( ) . setName ( name == null ? null : name . toString ( ) ) . build ( ) ; return listProductsInProductSet ( request ) ;
public class GitkitClient { /** * Constructs a Gitkit client from a JSON config file * @ param configPath Path to JSON configuration file * @ param proxy the Proxy object to use when using Gitkit client behind a proxy * @ return Gitkit client */ public static GitkitClient createFromJson ( String configPath , Prox...
JSONObject configData = new JSONObject ( StandardCharsets . UTF_8 . decode ( ByteBuffer . wrap ( Files . readAllBytes ( Paths . get ( configPath ) ) ) ) . toString ( ) ) ; if ( ! configData . has ( "clientId" ) && ! configData . has ( "projectId" ) ) { throw new GitkitClientException ( "Missing projectId or clientId in...