returns true if there ' s a breakpoint at the current location , with a satisfied condition if relevant

private boolean has breakpoint matched at location ( starlark thread thread , location location ) throws conditional breakpoint exception { / / breakpoints is volatile , so taking a local copy immutable map < starlark debugging protos location , starlark debugging protos breakpoint > breakpoints = this breakpoints ; if ( breakpoints is empty ( ) ) { return false ; } starlark debugging protos location location proto = debug event helper get location proto ( location ) ; if ( location proto = = null ) { return false ; } location proto = location proto to builder ( ) clear column number ( ) build ( ) ; starlark debugging protos breakpoint breakpoint = breakpoints get ( location proto ) ; if ( breakpoint = = null ) { return false ; } string condition = breakpoint get expression ( ) ; if ( condition is empty ( ) ) { return true ; } try { return starlark truth ( do evaluate ( thread , condition ) ) ; } catch ( eval exception e ) { throw new conditional breakpoint exception ( e get message with stack ( ) ) ; } catch ( syntax error exception | interrupted exception e ) { throw new conditional breakpoint exception ( e get message ( ) ) ; } }


returns the appropriate 4xx { @ link http response } for the given { @ link http request }

protected http response reject response ( @ suppress warnings ( " unused " ) http request request ) { return expectation failed retained duplicate ( ) ; }


validate the payload if applicable the default implementation checks for { @ code @ javax validation valid } , spring ' s { @ link validated } , and custom annotations whose name starts with " valid "

protected void validate ( message < ? > message , method parameter parameter , object target ) { if ( this validator = = null ) { return ; } for ( annotation ann : parameter get parameter annotations ( ) ) { validated validated ann = annotation utils get annotation ( ann , validated class ) ; if ( validated ann ! = null | | ann annotation type ( ) get simple name ( ) starts with ( " valid " ) ) { object hints = ( validated ann ! = null ? validated ann value ( ) : annotation utils get value ( ann ) ) ; object [ ] validation hints = ( hints instanceof object [ ] ? ( object [ ] ) hints : new object [ ] { hints } ) ; bean property binding result binding result = new bean property binding result ( target , get parameter name ( parameter ) ) ; if ( ! object utils is empty ( validation hints ) & & this validator instanceof smart validator ) { ( ( smart validator ) this validator ) validate ( target , binding result , validation hints ) ; } else { this validator validate ( target , binding result ) ; } if ( binding result has errors ( ) ) { throw new method argument not valid exception ( message , parameter , binding result ) ; } break ; } } }


get an array of the indices for all the selected rows

public int [ ] get selected rows ( ) { int [ ] selected rows = new int [ get num selected rows ( ) ] ; int new index = 0 ; int num ranges = selection get num ranges ( ) ; for ( int i = 0 ; i < num ranges ; i + + ) { field range range = selection get field range ( i ) ; for ( int temp row = range get start ( ) get index ( ) int value ( ) ; temp row < range get end ( ) get index ( ) int value ( ) ; temp row + + ) { selected rows [ new index + + ] = temp row ; } } return selected rows ; }


add protobuf based protocol to the { @ link rpc server } this engine uses protobuf 2 5 0 recommended to upgrade to protobuf 3 x from hadoop - thirdparty and use { @ link d f s util # add p b protocol ( configuration , class , blocking service , rpc server ) }

public static void add p b protocol ( configuration conf , class < ? > protocol , com google protobuf blocking service service , rpc server server ) throws i o exception { rpc set protocol engine ( conf , protocol , protobuf rpc engine class ) ; server add protocol ( rpc rpc kind rpc protocol buffer , protocol , service ) ; }


public static smtp request rcpt ( char sequence recipient , char sequence rcpt parameters ) { object util check not null ( recipient , " recipient " ) ; if ( rcpt parameters = = null | | rcpt parameters length = = 0 ) { return new default smtp request ( smtp command rcpt , " to : < " + recipient + ' > ' ) ; } else { list < char sequence > params = new array list < char sequence > ( rcpt parameters length + 1 ) ; params add ( " to : < " + recipient + ' > ' ) ; collections add all ( params , rcpt parameters ) ; return new default smtp request ( smtp command rcpt , params ) ; } }


list blobs in the specific bucket under the specified path the path root is removed

map < string , blob metadata > list blobs ( string path ) throws i o exception { return list blobs by prefix ( path , " " ) ; }


perform the least expensive check for a pointcut match

public static boolean matches ( pointcut pointcut , method method , class < ? > target class , object args ) { assert not null ( pointcut , " pointcut must not be null " ) ; if ( pointcut = = pointcut true ) { return true ; } if ( pointcut get class filter ( ) matches ( target class ) ) { / / only check if it gets past first hurdle method matcher mm = pointcut get method matcher ( ) ; if ( mm matches ( method , target class ) ) { / / we may need additional runtime ( argument ) check return ( ! mm is runtime ( ) | | mm matches ( method , target class , args ) ) ; } } return false ; }


acquires any required resources { @ link # release ( ) } must be called to ensure the acquired resources are released after releasing , an instance may be re - prepared

default void prepare ( ) { / / do nothing }


return the object represented by the code

private static auth method value of ( byte code ) { final int i = ( code & 0xff ) - first code ; return i < 0 | | i > = values ( ) length ? null : values ( ) [ i ] ; }


called when data is removed from the back of a media buffer , typically so that it can be re - buffered in a different format

default void on upstream discarded ( int window index , media period id media period id , media load data media load data ) { }


convert the given object to string with each line indented by 4 spaces ( except the first line )

private string to indented string ( object o ) { if ( o = = null ) { return " null " ; } return o to string ( ) replace ( " \ n " , " \ n " ) ; }


create a tableau print style with given max column width , null column , change mode indicator and a flag to indicate whether the column width is derived from type ( true ) or content ( false ) , which prints the result schema and content as tableau form

static print style tableau ( int max column width , string null column , boolean derive column width by type , boolean print row kind ) { preconditions check argument ( max column width > 0 , " max column width should be greater than 0 " ) ; preconditions check not null ( null column , " null column should not be null " ) ; return new tableau style ( max column width , null column , derive column width by type , print row kind ) ; }


test array for parameterized test runs aws client throttle onoff page size

public static collection < object [ ] > params ( ) { return arrays as list ( new object [ ] [ ] { { false , small , small reqs } , { false , maximum , maximum reqs } , { true , small , small reqs } , { true , maximum , maximum reqs } , } ) ; }


returns a properly escaped { @ link string } url that can be used to make httphttps requests

public string to string url ( ) { return get safe string url ( ) ; }


， $ { prefix } $ { random next long ( ) } $ { suffix }

public static path create temp file ( string prefix , string suffix ) throws i o exception { return files create temp file ( prefix , suffix ) ; }


the ' root ' process instance when using call activity for example , the process instance set will not always be the root this method returns the topmost process instance

string get root process instance id ( ) ;


test that program diff can determine the memory reference differences between program 1 and program 2 with mnemonic reference only in p1

public void test mem ref p 1 mnemonic diff ( ) throws exception { / / 0x 1 0 0 2cfc : p 1 has mem ref on mnemonic and p 2 doesn ' t / / 0x 1 0 0 2d 0 3 : p 2 has mem ref on mnemonic and p 1 doesn ' t program builder 1 create memory reference ( " 0x 1 0 0 2cfc " , " 0x 1 0 0 6 4 8 8 " , ref type read , source type user defined , - 1 ) ; program builder 2 create memory reference ( " 0x 1 0 0 2d 0 3 " , " 0x 1 0 0 6 4 8 8 " , ref type read , source type user defined , - 1 ) ; program diff = new program diff ( p 1 , p 2 ) ; address set as = new address set ( addr ( 0x 1 0 0 2cfc ) , addr ( 0x 1 0 0 2cfc ) ) ; as add ( addr ( 0x 1 0 0 2d 0 3 ) , addr ( 0x 1 0 0 2d 0 3 ) ) ; program diff set filter ( new program diff filter ( program diff filter reference diffs ) ) ; assert equals ( as , program diff get differences ( program diff get filter ( ) , null ) ) ; }


convert the given object to serialized form , possibly using a { @ link org springframework messaging converter message converter } , wrap it as a message , apply the given post processor , and send the resulting message to the given destination

void convert and send ( string destination name , object payload , message post processor post processor ) throws messaging exception ;


to test \ & quot ; client \ & quot ; model to test \ & quot ; client \ & quot ; model < b > 200 < b > - successful operation

public mono < client > test client model ( client body ) throws web client response exception { object post body = body ; / / verify the required parameter ' body ' is set if ( body = = null ) { throw new web client response exception ( " missing the required parameter ' body ' when calling test client model " , http status bad request value ( ) , http status bad request get reason phrase ( ) , null , null , null ) ; } / / create path and map variables final map < string , object > path params = new hash map < string , object > ( ) ; final multi value map < string , string > query params = new linked multi value map < string , string > ( ) ; final http headers header params = new http headers ( ) ; final multi value map < string , string > cookie params = new linked multi value map < string , string > ( ) ; final multi value map < string , object > form params = new linked multi value map < string , object > ( ) ; final string [ ] local var accepts = { " application / json " } ; final list < media type > local var accept = api client select header accept ( local var accepts ) ; final string [ ] local var content types = { " application / json " } ; final media type local var content type = api client select header content type ( local var content types ) ; string [ ] local var auth names = new string [ ] { } ; parameterized type reference < client > local var return type = new parameterized type reference < client > ( ) { } ; return api client invoke a p i ( " / fake " , http method patch , path params , query params , post body , header params , cookie params , form params , local var accept , local var content type , local var auth names , local var return type ) ; }


determine if the { @ code value } ( or one of the { @ code values } ) in the supplied { @ link if profile value & # 064 ; if profile value } annotation is enabled in the current environment

private static boolean is test enabled in this environment ( profile value source profile value source , @ nullable if profile value if profile value ) { if ( if profile value = = null ) { return true ; } string environment value = profile value source get ( if profile value name ( ) ) ; string [ ] annotated values = if profile value values ( ) ; if ( string utils has length ( if profile value value ( ) ) ) { assert is true ( annotated values length = = 0 , ( ) - > " setting both the ' value ' and ' values ' attributes " + " of @ if profile value is not allowed : choose one or the other " ) ; annotated values = new string [ ] { if profile value value ( ) } ; } for ( string value : annotated values ) { if ( object utils null safe equals ( value , environment value ) ) { return true ; } } return false ; }


protected abstract resource get plan resources ( plan plan , queue queue , resource cluster resources ) ;


creates a new tuple and assigns the given values to the tuple ' s fields this is more convenient than using the constructor , because the compiler can infer the generic type arguments implicitly for example : { @ code tuple 3 of ( n , x , s ) } instead of { @ code new tuple 3 < integer , double , string > ( n , x , s ) }

public static < t0 , t1 > tuple 2 < t0 , t1 > of ( t0 value 0 , t1 value 1 ) { return new tuple 2 < > ( value 0 , value 1 ) ; }


returns whether network round - trips should be minimized when executing cross - cluster search requests defaults to < code > true < code > , unless < code > min compatible shard node < code > is set in which case it ' s set to < code > false < code >

public boolean is ccs minimize roundtrips ( ) { return ccs minimize roundtrips ; }


multiplies the vector by the transpose of the given matrix

public vector 3 tra mul ( matrix 3 matrix ) { final float l mat [ ] = matrix val ; return set ( x * l mat [ matrix 3 m00 ] + y * l mat [ matrix 3 m10 ] + z * l mat [ matrix 3 m20 ] , x * l mat [ matrix 3 m01 ] + y * l mat [ matrix 3 m11 ] + z * l mat [ matrix 3 m21 ] , x * l mat [ matrix 3 m02 ] + y * l mat [ matrix 3 m12 ] + z * l mat [ matrix 3 m22 ] ) ; }


generate a directed r mat graph tests are usually run on a graph with scale = 10 and edge factor = 16 but algorithms generating very large data sets require smaller input graphs the examples program can write this graph as a csv file for verifying algorithm results with external libraries : binflink run examplesflink - gelly - examples jar - - algorithm edge list \ - - input r mat graph - - type long - - simplify directed - - scale $ scale - - edge factor $ edge factor \ - - output csv - - filename directed r mat graph csv

protected graph < long value , null value , null value > directed r mat graph ( int scale , int edge factor ) throws exception { long vertex count = 1l < < scale ; long edge count = edge factor * vertex count ; return new r mat graph < > ( env , new j d k random generator factory ( ) , vertex count , edge count ) generate ( ) run ( new org apache flink graph asm simple directed simplify < > ( ) ) ; }


find the fields constant that matches name , or null if its not found

public static fields find by name ( string name ) { return by name get ( name ) ; }


public static void ensure service access is allowed ( final service service , final registered service registered service ) { ensure service access is allowed ( service ! = null ? service get id ( ) : " unknown " , registered service ) ; }


get the location that corresponds to the entry point of the function if there is only a single location , assume it applies to whole function

private static d w a r f location get top location ( list < d w a r f location > loc list , long func addr ) { if ( loc list size ( ) = = 1 ) { return loc list get ( 0 ) ; } for ( d w a r f location loc : loc list ) { if ( loc get range ( ) get from ( ) = = func addr ) { return loc ; } } return null ; }


apply an action animation on top of the current animation

public animation desc action ( final string id , float offset , float duration , int loop count , float speed , final animation listener listener , float transition time ) { return action ( obtain ( id , offset , duration , loop count , speed , listener ) , transition time ) ; }


shutdown the output portion of the corresponding { @ link channel } for example this will clean up the { @ link channel outbound buffer } and not allow any more writes

private void shutdown output ( final channel promise promise , throwable cause ) { if ( ! promise set uncancellable ( ) ) { return ; } final channel outbound buffer outbound buffer = this outbound buffer ; if ( outbound buffer = = null ) { promise set failure ( new closed channel exception ( ) ) ; return ; } this outbound buffer = null ; / / disallow adding any messages and flushes to outbound buffer final throwable shutdown cause = cause = = null ? new channel output shutdown exception ( " channel output shutdown " ) : new channel output shutdown exception ( " channel output shutdown " , cause ) ; executor close executor = prepare to close ( ) ; if ( close executor ! = null ) { close executor execute ( new runnable ( ) { @ override public void run ( ) { try { / / execute the shutdown do shutdown output ( ) ; promise set success ( ) ; } catch ( throwable err ) { promise set failure ( err ) ; } finally { / / dispatch to the event loop event loop ( ) execute ( new runnable ( ) { @ override public void run ( ) { close outbound buffer for shutdown ( pipeline , outbound buffer , shutdown cause ) ; } } ) ; } } } ) ; } else { try { / / execute the shutdown do shutdown output ( ) ; promise set success ( ) ; } catch ( throwable err ) { promise set failure ( err ) ; } finally { close outbound buffer for shutdown ( pipeline , outbound buffer , shutdown cause ) ; } } }


reads a line of text a line is considered to be terminated by any one of a carriage return ( ' \ r ' ) , a line feed ( ' \ n ' ) , or a carriage return followed immediately by a line feed ( ' \ r \ n ' ) the utf - 8 charset is used this method discards leading utf - 8 byte order marks , if present

public string read line ( ) { if ( bytes left ( ) = = 0 ) { return null ; } int line limit = position ; while ( line limit < limit & & ! util is linebreak ( data [ line limit ] ) ) { line limit + + ; } if ( line limit - position > = 3 & & data [ position ] = = ( byte ) 0x e f & & data [ position + 1 ] = = ( byte ) 0x b b & & data [ position + 2 ] = = ( byte ) 0x b f ) { / / there ' s a utf - 8 byte order mark at the start of the line discard it position + = 3 ; } string line = util from utf 8 bytes ( data , position , line limit - position ) ; position = line limit ; if ( position = = limit ) { return line ; } if ( data [ position ] = = ' \ r ' ) { position + + ; if ( position = = limit ) { return line ; } } if ( data [ position ] = = ' \ n ' ) { position + + ; } return line ; }


public void property test ( ) { / / todo : test property }


removes the indicated range of values from the list this will remove any ranges or portion of ranges that overlap the indicated range

public void remove range ( int min , int max ) { range key = new range ( min , min ) ; sorted set < range > head set = set head set ( key ) ; if ( ! head set is empty ( ) ) { range last = head set last ( ) ; if ( last max > = min ) { if ( max < last max ) { set add ( new range ( max + 1 , last max ) ) ; last max = math min ( last max , min - 1 ) ; return ; } last max = math min ( last max , min - 1 ) ; } } iterator < range > it = set tail set ( key ) iterator ( ) ; while ( it has next ( ) ) { range next = it next ( ) ; if ( next min > max ) { break ; } else if ( next max > max ) { next min = max + 1 ; break ; } it remove ( ) ; } }


convert the given object to string with each line indented by 4 spaces ( except the first line )

private string to indented string ( object o ) { if ( o = = null ) { return " null " ; } return o to string ( ) replace ( " \ n " , " \ n " ) ; }


true if we have manually unmounted content ( e g via unmount all items ) which means that while we may not have a new render tree , the mounted content does not match what the viewport for the litho view may be

public boolean needs remount ( ) { return m needs remount ; }


whether the contained type has any exception mappings

public boolean has exception mappings ( ) { return ! this mapped methods is empty ( ) ; }


set the maximum number of undoable checkpoints maintained by buffer manager existing redo checkpoints are cleared and the stack of undo checkpoints will be reduced if max undos is less than the current setting

public void set max undos ( int max undos ) { synchronized ( snapshot lock ) { synchronized ( this ) { max checkpoints = max undos < 0 ? default checkpoint count : ( max undos + 1 ) ; while ( checkpoint heads size ( ) > max checkpoints ) { pack checkpoints ( ) ; } dispose redo checkpoints ( ) ; } } }


show the given tooltip with the specified offsets from the bottom - left corner of the component with the given anchor key

public static void show tooltip ( component context c , final popup window popup window , @ nullable string anchor key , int x offset , int y offset ) { show tooltip ( c , new litho tooltip ( ) { @ override public void show litho tooltip ( view container , rect anchor bounds , int x offset , int y offset ) { popup window show as drop down ( container , anchor bounds left + x offset , anchor bounds bottom + y offset ) ; } } , anchor key , x offset , y offset ) ; }


returns true if we ' ve parsed a complete frame

public boolean is complete ( ) { return is complete ; }


copies the contents of src to dst , starting from src [ src offset ] , copying num elements elements the { @ link buffer } instance ' s { @ link buffer # position ( ) } is used to define the offset into the buffer itself the position and limit will stay the same < b > the buffer must be a direct buffer with native byte order no error checking is performed < b >

public static void copy ( float [ ] src , int src offset , int num elements , buffer dst ) { float buffer buffer = as float buffer ( dst ) ; int old position = buffer position ( ) ; buffer put ( src , src offset , num elements ) ; buffer position ( old position ) ; }


create mount links as follows hdfs : localhost : xxx h d f s user - - > hdfs : localhost : xxx h d f s user hdfs : localhost : xxxlocal - - > file : test root d i rroot fallback - - > hdfs : localhost : xxx h d f s user creating file or directory at non root level should succeed with fallback links

public void test with link fall back ( ) throws exception { final path hdfs target path = new path ( default f s u r i + hdfs user folder ) ; add mount links ( default f s u r i get authority ( ) , new string [ ] { hdfs user folder , local folder , constants config viewfs link fallback } , new string [ ] { hdfs target path to uri ( ) to string ( ) , local target dir to u r i ( ) to string ( ) , hdfs target path to uri ( ) to string ( ) } , conf ) ; try ( file system fs = file system get ( conf ) ) { fs create new file ( new path ( " / non mount / myfile " ) ) ; file status [ ] ls = fs list status ( new path ( " / non mount " ) ) ; assert assert equals ( 1 , ls length ) ; assert assert equals ( path get path without scheme and authority ( ls [ 0 ] get path ( ) ) get name ( ) , " myfile " ) ; } }


tests making random changes to an object , calculating diffs for these changes , sending this diffs over the wire and appling these diffs on the other side

public static < t extends diffable < t > > void test diffable serialization ( supplier < t > test instance , function < t , t > modifier , named writeable registry named writeable registry , reader < t > reader , reader < diff < t > > diff reader ) throws i o exception { t remote instance = test instance get ( ) ; t local instance = assert serialization ( remote instance , named writeable registry , reader ) ; for ( int runs = 0 ; runs < number of diff test runs ; runs + + ) { t remote changes = modifier apply ( remote instance ) ; diff < t > remote diffs = remote changes diff ( remote instance ) ; diff < t > local diffs = copy instance ( remote diffs , named writeable registry , diff reader ) ; local instance = assert diff application ( remote changes , local instance , local diffs ) ; remote instance = remote changes ; } }


deletes this file or directory and all children , recursively @ throw gdx runtime exception if this file handle is a { @ link file type # classpath } or { @ link file type # internal } file

public boolean delete directory ( ) { if ( type = = file type classpath ) throw new gdx runtime exception ( " cannot delete a classpath file : " + file ) ; if ( type = = file type internal ) throw new gdx runtime exception ( " cannot delete an internal file : " + file ) ; return delete directory ( file ( ) ) ; }


starts playback of the item at the given index

private void set current item ( int item index ) { maybe set current item and notify ( item index ) ; if ( current player get current timeline ( ) get window count ( ) ! = media queue size ( ) ) { / / this only happens with the cast player the receiver app in the cast device clears the / / timeline when the last item of the timeline has been played to end current player set media items ( media queue , item index , c time unset ) ; } else { current player seek to ( item index , c time unset ) ; } current player set play when ready ( true ) ; }


split the contents of this leaf node ; placing the right half of the records into the empty leaf node provided

private void split data ( var key record node right node ) { int split index = get split index ( ) ; int count = key count - split index ; int start = get record key offset ( key count - 1 ) ; / / start of block to be moved int end = get record key offset ( split index - 1 ) ; / / end of block to be moved int split len = end - start ; / / length of block to be moved int right offset = buffer length ( ) - split len ; / / data offset within new leaf node / / copy data to new leaf node data buffer new buf = right node buffer ; new buf copy ( right offset , buffer , start , split len ) ; new buf copy ( header size , buffer , header size + ( split index * entry size ) , count * entry size ) ; / / fix record offsets in new leaf node int offset correction = buffer length ( ) - end ; for ( int i = 0 ; i < count ; i + + ) { right node put record key offset ( i , right node get record key offset ( i ) + offset correction ) ; } / / adjust key counts set key count ( key count - count ) ; right node set key count ( count ) ; }


specify whether or not the configured initializer method is the default the default value is { @ code true } for a locally specified init method but switched to { @ code false } for a shared setting in a defaults section ( e g { @ code bean init - method } versus { @ code beans default - init - method } level in xml ) which might not apply to all contained bean definitions

public void set enforce init method ( boolean enforce init method ) { this enforce init method = enforce init method ; }


note that this can get called before test setup

protected configuration create scale configuration ( ) { configuration conf = super create scale configuration ( ) ; partition size = ( int ) get test property bytes ( conf , key huge partition size , default huge partition size ) ; assert true ( " partition size too small : " + partition size , partition size > = multipart min size ) ; conf set long ( socket send buffer , 1mb ) ; conf set long ( socket recv buffer , 1mb ) ; conf set long ( min multipart threshold , partition size ) ; conf set int ( multipart size , partition size ) ; conf set ( user agent prefix , " s test s 3 a huge file create " ) ; conf set ( fast upload buffer , get block output buffer name ( ) ) ; s 3 a test utils disable filesystem caching ( conf ) ; return conf ; }


visits a while statement with error checking for an extraneous loop checks : control flow

public void visit while ( s while user while node , semantic scope semantic scope ) { semantic scope = semantic scope new local scope ( ) ; a expression user condition node = user while node get condition node ( ) ; semantic scope set condition ( user condition node , read class ) ; semantic scope put decoration ( user condition node , new target type ( boolean class ) ) ; checked visit ( user condition node , semantic scope ) ; decorate with cast ( user condition node , semantic scope ) ; s block user block node = user while node get block node ( ) ; boolean continuous = false ; if ( user condition node instanceof e boolean constant ) { continuous = ( ( e boolean constant ) user condition node ) get bool ( ) ; if ( continuous = = false ) { throw user while node create error ( new illegal argument exception ( " extraneous while loop " ) ) ; } else { semantic scope set condition ( user while node , continuous loop class ) ; } if ( user block node = = null ) { throw user while node create error ( new illegal argument exception ( " no paths escape from while loop " ) ) ; } } if ( user block node ! = null ) { semantic scope set condition ( user block node , begin loop class ) ; semantic scope set condition ( user block node , in loop class ) ; visit ( user block node , semantic scope ) ; if ( semantic scope get condition ( user block node , loop escape class ) & & semantic scope get condition ( user block node , any continue class ) = = false ) { throw user while node create error ( new illegal argument exception ( " extraneous while loop " ) ) ; } if ( continuous & & semantic scope get condition ( user block node , any break class ) = = false ) { semantic scope set condition ( user while node , method escape class ) ; semantic scope set condition ( user while node , all escape class ) ; } } }


return true to trigger { @ literal @ } on exited range method defined in the component , do nothing otherwise

boolean should exit range ( int position , int first visible index , int last visible index , int first fully visible index , int last fully visible index ) ;


the event definition on which the timer is based takes in an optional execution , if missing the { @ link no execution variable scope } will be used ( eg timer start event )

public static timer job entity create timer entity for timer event definition ( timer event definition timer event definition , boolean is interrupting timer , execution entity execution entity , string job handler type , string job handler config ) { process engine configuration impl process engine configuration = context get process engine configuration ( ) ; string business calendar ref = null ; expression expression = null ; expression manager expression manager = process engine configuration get expression manager ( ) ; / / act - 1415 : timer - declaration on start - event may contain expressions not / / evaluating variables but other context , evaluating should happen nevertheless variable scope scope for expression = execution entity ; if ( scope for expression = = null ) { scope for expression = no execution variable scope get shared instance ( ) ; } if ( string utils is not empty ( timer event definition get time date ( ) ) ) { business calendar ref = due date business calendar name ; expression = expression manager create expression ( timer event definition get time date ( ) ) ; } else if ( string utils is not empty ( timer event definition get time cycle ( ) ) ) { business calendar ref = cycle business calendar name ; expression = expression manager create expression ( timer event definition get time cycle ( ) ) ; } else if ( string utils is not empty ( timer event definition get time duration ( ) ) ) { business calendar ref = duration business calendar name ; expression = expression manager create expression ( timer event definition get time duration ( ) ) ; } if ( string utils is not empty ( timer event definition get calendar name ( ) ) ) { business calendar ref = timer event definition get calendar name ( ) ; expression business calendar expression = expression manager create expression ( business calendar ref ) ; business calendar ref = business calendar expression get value ( scope for expression ) to string ( ) ; } if ( expression = = null ) { throw new activiti exception ( " timer needs configuration ( either time date , time cycle or time duration is needed ) ( " + timer event definition get id ( ) + " ) " ) ; } business calendar business calendar = process engine configuration get business calendar manager ( ) get business calendar ( business calendar ref ) ; string due date string = null ; date duedate = null ; object due date value = expression get value ( scope for expression ) ; if ( due date value instanceof string ) { due date string = ( string ) due date value ; } else if ( due date value instanceof date ) { duedate = ( date ) due date value ; } else if ( due date value instanceof date time ) { / / joda time support duedate = ( ( date time ) due date value ) to date ( ) ; } else if ( due date value ! = null ) { throw new activiti exception ( " timer ' " + execution entity get activity id ( ) + " ' was not configured with a valid duration / time , either hand in a java util date or a string in format ' yyyy - mm - dd ' t ' hh : mm : ss ' " ) ; } if ( duedate = = null & & due date string ! = null ) { duedate = business calendar resolve duedate ( due date string ) ; } timer job entity timer = null ; if ( duedate ! = null ) { timer = context get command context ( ) get timer job entity manager ( ) create ( ) ; timer set job type ( job entity job type timer ) ; timer set revision ( 1 ) ; timer set job handler type ( job handler type ) ; timer set job handler configuration ( job handler config ) ; timer set exclusive ( true ) ; timer set retries ( process engine configuration get async executor number of retries ( ) ) ; timer set duedate ( duedate ) ; if ( execution entity ! = null ) { timer set execution ( execution entity ) ; timer set process definition id ( execution entity get process definition id ( ) ) ; timer set process instance id ( execution entity get process instance id ( ) ) ; / / inherit tenant identifier ( if applicable ) if ( execution entity get tenant id ( ) ! = null ) { timer set tenant id ( execution entity get tenant id ( ) ) ; } } } if ( string utils is not empty ( timer event definition get time cycle ( ) ) ) { / / see act - 1427 : a boundary timer with a cancel activity = ' true ' , doesn ' t need to repeat itself boolean repeat = ! is interrupting timer ; / / act - 1951 : intermediate catching timer events shouldn ' t repeat according to spec if ( execution entity ! = null ) { flow element current element = execution entity get current flow element ( ) ; if ( current element instanceof intermediate catch event ) { repeat = false ; } } if ( repeat ) { string prepared = prepare repeat ( due date string ) ; timer set repeat ( prepared ) ; } } if ( timer ! = null & & execution entity ! = null ) { timer set execution ( execution entity ) ; timer set process definition id ( execution entity get process definition id ( ) ) ; / / inherit tenant identifier ( if applicable ) if ( execution entity get tenant id ( ) ! = null ) { timer set tenant id ( execution entity get tenant id ( ) ) ; } } return timer ; }


perform actual logging : might throw exception if things go wrong

private static void do logging ( ) throws i o exception { string builder msg = new string builder ( ) ; for ( network interface nic : network utils get interfaces ( ) ) { msg append ( system line separator ( ) ) ; / / ordinary name msg append ( nic get name ( ) ) ; msg append ( system line separator ( ) ) ; / / display name ( e g on windows ) if ( ! nic get name ( ) equals ( nic get display name ( ) ) ) { msg append ( indent ) ; msg append ( nic get display name ( ) ) ; msg append ( system line separator ( ) ) ; } / / addresses : v 4 first , then v 6 list < interface address > addresses = nic get interface addresses ( ) ; for ( interface address address : addresses ) { if ( address get address ( ) instanceof inet 6 address = = false ) { msg append ( indent ) ; msg append ( format address ( address ) ) ; msg append ( system line separator ( ) ) ; } } for ( interface address address : addresses ) { if ( address get address ( ) instanceof inet 6 address ) { msg append ( indent ) ; msg append ( format address ( address ) ) ; msg append ( system line separator ( ) ) ; } } / / hardware address byte hardware [ ] = nic get hardware address ( ) ; if ( hardware ! = null ) { msg append ( indent ) ; msg append ( " hardware " ) ; for ( int i = 0 ; i < hardware length ; i + + ) { if ( i > 0 ) { msg append ( " : " ) ; } msg append ( string format ( locale root , " % 02x " , hardware [ i ] ) ) ; } msg append ( system line separator ( ) ) ; } / / attributes msg append ( indent ) ; msg append ( format flags ( nic ) ) ; msg append ( system line separator ( ) ) ; } logger debug ( " configuration : { } { } " , system line separator ( ) , msg ) ; }


returns the max inactive interval time of the generated tokens

protected long get max inactive interval ( ) { return max inactive interval / 1000 ; }


exit a parse tree produced by { @ link sql base parser # when clause }

void exit when clause ( sql base parser when clause context ctx ) ;


protected void process tasks ( ) { collection < object > keys = get all task keys ( ) ; for ( object task key : keys ) { abstract delay task task = remove task ( task key ) ; if ( null = = task ) { continue ; } nacos task processor processor = get processor ( task key ) ; if ( null = = processor ) { get engine log ( ) error ( " processor not found for task , so discarded " + task ) ; continue ; } try { / / re add task if process failed if ( ! processor process ( task ) ) { retry failed task ( task key , task ) ; } } catch ( throwable e ) { get engine log ( ) error ( " nacos task execute error : " + e to string ( ) , e ) ; retry failed task ( task key , task ) ; } } }


public void test number only ( ) { / / todo : test number only }


void verify max dir items ( i node directory parent , string parent path ) throws max directory items exceeded exception { final int count = parent get children list ( current state id ) size ( ) ; if ( count > = max dir items ) { final max directory items exceeded exception e = new max directory items exceeded exception ( parent path , max dir items , count ) ; if ( namesystem is image loaded ( ) ) { throw e ; } else { / / do not throw if edits log is still being processed name node log error ( " f s directory verify max dir items : " + e get localized message ( ) ) ; } } }


todo ( b 1 4 4 7 3 1 6 0 ) : remove when deps are no longer implicitly exported returns true if the rule ( possibly ) relies on the implicit dep exports behavior if this returns true , then the rule is exporting deps implicitly , and does not have any srcs or locally - used resources consuming the deps else , this rule either is not using deps or has another deps - consuming attribute ( src , locally - used resources )

private static boolean uses deprecated implicit export ( rule context rule context ) throws rule error exception { attribute map attrs = rule context attributes ( ) ; if ( ! attrs is attribute value explicitly specified ( " deps " ) | | attrs get ( " deps " , build type label list ) is empty ( ) ) { return false ; } string [ ] label list attrs = { " srcs " , " idl srcs " , " assets " , " resource files " } ; for ( string attr : label list attrs ) { if ( attrs is attribute value explicitly specified ( attr ) & & ! attrs get ( attr , build type label list ) is empty ( ) ) { return false ; } } boolean has manifest = attrs is attribute value explicitly specified ( " manifest " ) ; boolean has assets dir = attrs is attribute value explicitly specified ( " assets dir " ) ; boolean has inline consts = attrs is attribute value explicitly specified ( " inline constants " ) & & attrs get ( " inline constants " , type boolean ) ; boolean has exports manifest = attrs is attribute value explicitly specified ( " exports manifest " ) & & attrs get ( " exports manifest " , build type tristate ) = = tri state yes ; return ! ( has manifest | | has inline consts | | has assets dir | | has exports manifest ) ; }


utility method for retrieving the project metadata object having the id specified in the " project " url parameter

protected project metadata get project metadata ( http servlet request request ) throws servlet exception { if ( request = = null ) { throw new illegal argument exception ( " parameter ' request ' should not be null " ) ; } try { project metadata pm = project manager singleton get project metadata ( long parse long ( request get parameter ( " project " ) ) ) ; if ( pm ! = null ) { return pm ; } } catch ( exception e ) { / / ignore } throw new servlet exception ( " can ' t find project metadata : missing or bad url parameter " ) ; }


get the value of the < code > name < code > property as a trimmed < code > string < code > , < code > null < code > if no such property exists if the key is deprecated , it returns the value of the first key which replaces the deprecated key and is not null values are processed for < a href = " # variable expansion " > variable expansion before being returned

public string get trimmed ( string name ) { string value = get ( name ) ; if ( null = = value ) { return null ; } else { return value trim ( ) ; } }


find the first callback of a specific type in the list and returns it

static < t extends callback > t get first callback of type ( class < t > callback class , callback [ ] callback array ) { if ( callback array = = null ) { return null ; } for ( callback cb : callback array ) { if ( callback class = = cb get class ( ) ) { return callback class cast ( cb ) ; } } return null ; }


initiates a left outer join transformation an outer join transformation joins two elements of two { @ link data set data sets } on key equality and provides multiple ways to combine joining elements into one data set elements of the < b > left < b > data set ( i e { @ code this } ) that do not have a matching element on the other side are joined with { @ code null } and emitted to the resulting data set

public < r > join operator sets base < t , r > left outer join ( data set < r > other , join hint strategy ) { switch ( strategy ) { case optimizer chooses : case repartition sort merge : case repartition hash first : case repartition hash second : case broadcast hash second : return new join operator sets base < > ( this , other , strategy , join type left outer ) ; default : throw new invalid program exception ( " invalid join hint for left outer join : " + strategy ) ; } }


public alts server builder fallback handler registry ( handler registry fallback registry ) { delegate fallback handler registry ( fallback registry ) ; return this ; }


gets the script description as an array of lines

public string [ ] get script description ( ) { return script description text get text ( ) split ( " \ \ n " ) ; }


get the global singleton instance of this { @ link charset info }

public static charset info get instance ( ) { return singleton instance ; }


test for block size of 2gb + 512b this test can take a rather long time to complete on windows ( reading the file back can be slow ) so we use a larger timeout here

public void test large block size ( ) throws i o exception { final long block size = 2l * 1024l * 1024l * 1024l + 512l ; / / 2gb + 512b run test ( block size ) ; }


find pet by id ( asynchronously ) returns a single pet

public okhttp 3 call get pet by id async ( long pet id , final api callback < pet > callback ) throws api exception { okhttp 3 call local var call = get pet by id validate before call ( pet id , callback ) ; type local var return type = new type token < pet > ( ) { } get type ( ) ; local var api client execute async ( local var call , local var return type , callback ) ; return local var call ; }


visits a dependence of the current module

public void visit require ( final string module , final int access , final string version ) { if ( mv ! = null ) { mv visit require ( module , access , version ) ; } }


get the base offset contained in this record batch for magic version prior to 2 , the base offset will always be the offset of the first message in the batch this generally requires deep iteration and will return the offset of the first record in the record batch for magic version 2 and above , this will return the first offset of the original record batch ( i e prior to compaction ) for non - compacted topics , the behavior is equivalent because this requires deep iteration for older magic versions , this method should be used with caution generally { @ link # last offset ( ) } is safer since access is efficient for all magic versions


receives an object sent by { @ link # write object ( object ) }

public < t > t read object ( ) throws i o exception , class not found exception { object input stream ois = new object input stream ex ( in , get class ( ) get class loader ( ) , class filter default ) ; return ( t ) ois read object ( ) ; }


sets the { @ link track name provider } used to generate the user visible name of each track and updates the view with track names queried from the specified provider

public track selection dialog builder set track name provider ( @ nullable track name provider track name provider ) { this track name provider = track name provider ; return this ; }


public static void main ( string [ ] args ) { spring application run ( price application class , args ) ; }


public static string read raw 2 string ( @ raw res final int res id , final string charset name ) { input stream is = utils get app ( ) get resources ( ) open raw resource ( res id ) ; byte [ ] bytes = utils bridge input stream 2 bytes ( is ) ; if ( bytes = = null ) return null ; if ( utils bridge is space ( charset name ) ) { return new string ( bytes ) ; } else { try { return new string ( bytes , charset name ) ; } catch ( unsupported encoding exception e ) { e print stack trace ( ) ; return " " ; } } }


returns the full stacktrace of the exception that occurs when the { @ link timer job entity } with the given id was last executed returns null when the job has no exception stacktrace

string get timer job exception stacktrace ( string job id ) ;


public string get name ( ) { return internals get name ( ) ; }


public final vec 2 get vertex ( final int index ) { assert ( 0 < = index & & index < m count ) ; return m vertices [ index ] ; }


returns the header for the given key or < code > null < code > if not present

public string get header ( string key ) { string value = thread local get ( ) request headers get ( key ) ; if ( value = = null ) { return default header get ( key ) ; } return value ; }


public void start parsing member ( byte array bytes , int offset , string name , string descriptor ) { if ( descriptor index of ( ' ( ' ) < 0 ) { / / it ' s a field , not a method return ; } if ( ! should dump method ( name ) ) { return ; } / / reset the dump cursor to the start of the method set at ( bytes , offset ) ; suppress dump = false ; if ( first ) { first = false ; } else { parsed ( bytes , offset , 0 , " \ n " ) ; } parsed ( bytes , offset , 0 , " method " + name + " " + descriptor ) ; suppress dump = true ; }


parses the required attribute as a decimal number , returning its integer value

public static int parse bounded int attr ( element ele , string attr name , int min value , int max value ) throws number format exception { try { return parse bounded int ( ele get attribute value ( attr name ) , min value , max value ) ; } catch ( number format exception nfe ) { throw new number format exception ( " attribute ' " + attr name + " ' bad value : " + nfe get message ( ) + " in " + to string ( ele ) ) ; } }


reads up to the next nul byte ( or the limit ) as utf - 8 characters

public string read null terminated string ( ) { if ( bytes left ( ) = = 0 ) { return null ; } int string limit = position ; while ( string limit < limit & & data [ string limit ] ! = 0 ) { string limit + + ; } string string = util from utf 8 bytes ( data , position , string limit - position ) ; position = string limit ; if ( position < limit ) { position + + ; } return string ; }


public void kill task ( task attempt i d task id , boolean should fail ) throws i o exception ;


expert : get the compression higher values improve accuracy but also memory usage only relevant when using { @ link percentiles method # tdigest } deprecated : get compression by inspecting the { @ link percentiles config } returned from { @ link percentiles aggregation builder # percentiles config ( ) } instead

public double compression ( ) { if ( percentiles config ! = null & & percentiles config get method ( ) equals ( percentiles method tdigest ) ) { return ( ( percentiles config t digest ) percentiles config ) get compression ( ) ; } throw new illegal state exception ( " percentiles [ method ] has not been configured yet , or is a hdr histogram " ) ; }


if this recognizer was generated , it will have a serialized atn representation of the grammar for interpreters , we don ' t know their serialized atn despite having created the interpreter from it

public string get serialized a t n ( ) { throw new unsupported operation exception ( " there is no serialized atn " ) ; }


the hash code equals the value { @ code arrays as list ( left value ( ) , right value ( ) ) hash code ( ) }


returns the size of this header , including filename , and extra data ( if any )

public final int get size ( ) { return size + get ( locnam ) + get ( locext ) ; }


returns the number of classes contained in the descriptor this is the number of class names that the enumeration will return

public int class count ( ) { int count = 0 ; reset ( ) ; next fluff ( ) ; while ( has more class names ( ) ) { count + + ; next class name ( ) ; next fluff ( ) ; } reset ( ) ; return count ; }


an interceptor throws a checked exception not on the method signature for efficiency , we don ' t bother unifying java lang reflect and org springframework cglib undeclared throwable exception

public void test undeclared checked exception ( ) throws throwable { final exception unexpected exception = new exception ( ) ; / / test return value method interceptor mi = new method interceptor ( ) { @ override public object invoke ( method invocation invocation ) throws throwable { throw unexpected exception ; } } ; advised support pc = new advised support ( i test bean class ) ; pc add advice ( expose invocation interceptor instance ) ; pc add advice ( mi ) ; / / we don ' t care about the object pc set target ( new test bean ( ) ) ; aop proxy aop = create aop proxy ( pc ) ; i test bean tb = ( i test bean ) aop get proxy ( ) ; assert that exception of type ( undeclared throwable exception class ) is thrown by ( tb : : get age ) satisfies ( ex - > assert that ( ex get undeclared throwable ( ) ) is equal to ( unexpected exception ) ) ; }


public string get message ( string code , @ nullable object [ ] args , string default message , boolean html escape ) { string msg = this message source get message ( code , args , default message , this locale ) ; if ( msg = = null ) { return " " ; } return ( html escape ? html utils html escape ( msg ) : msg ) ; }


is this logger instance enabled for level severe ?

public boolean is error enabled ( ) { return logger is loggable ( level severe ) ; }


post fakeouternumber test serialization of outer number types

default response entity < big decimal > fake outer number serialize ( @ api param ( value = " input number as post body " ) @ valid @ request body ( required = false ) big decimal body ) { return new response entity < > ( http status not implemented ) ; }


public void date time test ( ) { / / todo : test date time }


return the application object main process get app by utils file provider , and other process get app by reflect

public static application get app ( ) { if ( s app ! = null ) return s app ; init ( utils bridge get application by reflect ( ) ) ; if ( s app = = null ) throw new null pointer exception ( " reflect failed " ) ; log i ( " utils " , utils bridge get current process name ( ) + " reflect app success " ) ; return s app ; }


get fake : to test enum parameters to test enum parameters

default response entity < void > test enum parameters ( @ api param ( value = " header parameter enum test ( string array ) " , allowable values = " > , $ " ) @ request header ( value = " enum header string array " , required = false ) list < string > enum header string array , @ api param ( value = " header parameter enum test ( string ) " , allowable values = " abc , - efg , ( xyz ) " , default value = " - efg " ) @ request header ( value = " enum header string " , required = false ) string enum header string , @ api param ( value = " query parameter enum test ( string array ) " , allowable values = " > , $ " ) @ valid @ request param ( value = " enum query string array " , required = false ) list < string > enum query string array , @ api param ( value = " query parameter enum test ( string ) " , allowable values = " abc , - efg , ( xyz ) " , default value = " - efg " ) @ valid @ request param ( value = " enum query string " , required = false , default value = " - efg " ) string enum query string , @ api param ( value = " query parameter enum test ( double ) " , allowable values = " 1 , - 2 " ) @ valid @ request param ( value = " enum query integer " , required = false ) integer enum query integer , @ api param ( value = " query parameter enum test ( double ) " , allowable values = " 1 1 , - 1 2 " ) @ valid @ request param ( value = " enum query double " , required = false ) double enum query double , @ api param ( value = " form parameter enum test ( string array ) " , allowable values = " > , $ " ) @ valid @ request part ( value = " enum form string array " , required = false ) list < string > enum form string array , @ api param ( value = " form parameter enum test ( string ) " , allowable values = " abc , - efg , ( xyz ) " , default value = " - efg " ) @ valid @ request part ( value = " enum form string " , required = false ) string enum form string ) { return new response entity < > ( http status not implemented ) ; }


public void add ( iterator < e > iterator ) { assert state ( ! this in use , " you can no longer add iterators to a composite iterator that ' s already in use " ) ; if ( this iterators contains ( iterator ) ) { throw new illegal argument exception ( " you cannot add the same iterator twice " ) ; } this iterators add ( iterator ) ; }


query tenant info ( namespace ) existence based by tenant id

int tenant info count by tenant id ( string tenant id ) ;


public big decimal get name number ( ) { return name number ; }


callback before a given method is invoked

void before ( method method , object [ ] args , @ nullable object target ) throws throwable ;


sets up the server transport and blocks while waiting for an incoming connection

static debug server transport create and wait for client ( event handler event handler , server socket server socket , boolean verbose logging ) throws i o exception { / / todo ( bazel - team ) : reject all connections after the first event handler handle ( event progress ( " waiting for debugger " ) ) ; socket client socket = server socket accept ( ) ; event handler handle ( event info ( " debugger connection successfully established " ) ) ; return new debug server transport ( event handler , server socket , client socket , client socket get input stream ( ) , client socket get output stream ( ) , verbose logging ) ; }


tests that idle task managers time out after the configured timeout a timed out task manager will be removed from the slot manager and the resource manager will be notified about the timeout , if it can be released

public void test task manager timeout ( ) throws exception { check task manager timeout ( 0 ) ; }


return the transfer data with the given data flavor

public synchronized object get transfer data ( data flavor f ) throws unsupported flavor exception , i o exception { if ( f equals ( local component provider flavor ) ) { return provider ; } throw new unsupported flavor exception ( f ) ; }


gets type literal from super class ' s type parameter

static type literal < ? > from superclass type parameter ( class < ? > subclass ) { return new type literal < object > ( get superclass type parameter ( subclass ) ) ; }


adds a mapping from the specified key to the specified value , replacing the previous mapping from the specified key if there was one

public void put ( int key , e value ) { int i = container helpers binary search ( m keys , m size , key ) ; if ( i > = 0 ) { m values [ i ] = value ; } else { i = ~ i ; if ( i < m size & & m values [ i ] = = deleted ) { m keys [ i ] = key ; m values [ i ] = value ; return ; } if ( m garbage & & m size > = m keys length ) { gc ( ) ; / / search again because indices may have changed i = ~ container helpers binary search ( m keys , m size , key ) ; } if ( m size > = m keys length ) { int n = container helpers ideal int array size ( m size + 1 ) ; int [ ] nkeys = new int [ n ] ; object [ ] nvalues = new object [ n ] ; / / log e ( " sparse array " , " grow " + m keys length + " to " + n ) ; system arraycopy ( m keys , 0 , nkeys , 0 , m keys length ) ; system arraycopy ( m values , 0 , nvalues , 0 , m values length ) ; m keys = nkeys ; m values = nvalues ; } if ( m size - i ! = 0 ) { / / log e ( " sparse array " , " move " + ( m size - i ) ) ; system arraycopy ( m keys , i , m keys , i + 1 , m size - i ) ; system arraycopy ( m values , i , m values , i + 1 , m size - i ) ; } m keys [ i ] = key ; m values [ i ] = value ; m size + + ; } }


public static void put ( @ non null final string key , final j s o n array value , final int save time , @ non null final cache disk utils cache disk utils ) { cache disk utils put ( key , value , save time ) ; }


protected service resolve service from authentication request ( final service service ) { return webflow event resolution configuration context get authentication request service selection strategies ( ) resolve service ( service ) ; }


adds the remaining values to the specified array

public int array to array ( int array array ) { while ( has next ) array add ( next ( ) ) ; return array ; }


notifies all field mouselisteners that the cursor position changed

private void notify field mouse listeners ( final mouse event ev ) { final field location loc = new field location ( cursor position ) ; final field field = cursor handler get current field ( ) ; system utilities run swing later ( ( ) - > { for ( field mouse listener l : field mouse listeners ) { l button pressed ( loc , field , ev ) ; } } ) ; }


merges two given instances of { @ link branch coverage } calling { @ code line number ( ) } , { @ code block number ( ) } and { @ code branch number ( ) } must return the same values for { @ code first } and { @ code second }

static branch coverage merge ( branch coverage first , branch coverage second ) { verify ( first line number ( ) = = second line number ( ) , " branch line numbers must match " ) ; verify ( first block number ( ) equals ( second block number ( ) ) , " branch block numbers must match " ) ; verify ( first branch number ( ) equals ( second branch number ( ) ) , " branch branch numbers must match " ) ; return first block number ( ) is empty ( ) ? merge with no block and branch ( first , second ) : merge with block and branch ( first , second ) ; }


a convenience method that allows clients that have created a new child node to select that node in the tree , without having to lookup the actual g tree node implementation

public void set seleted node by name ( g tree node parent node , string child name ) { tree path tree path = parent node get tree path ( ) ; tree path path with child = tree path path by adding child ( child name ) ; set selected node by path name ( path with child ) ; }


find the fields constant that matches field id , throwing an exception if it is not found

public static fields find by thrift id or throw ( int field id ) { fields fields = find by thrift id ( field id ) ; if ( fields = = null ) throw new illegal argument exception ( " field " + field id + " doesn ' t exist ! " ) ; return fields ; }


this is a best effort automatic test for method forwarding between a delegate and its wrapper , where the wrapper class is a subtype of the delegate this ignores methods that are inherited from object

public static < d , w , i extends d > void test method forwarding ( class < d > delegate class , function < i , w > wrapper factory , supplier < i > delegate object supplier ) throws no such method exception , illegal access exception , invocation target exception { test method forwarding ( delegate class , wrapper factory , delegate object supplier , collections empty set ( ) ) ; }


alternative to assertion error ( string , throwable ) , which doesn ' t exist in java 1 6

private static assertion error new assertion error ( string message , throwable cause ) { assertion error e = new assertion error ( message ) ; e init cause ( cause ) ; return e ; }


display an warning string prefaced with the command name

public void display warning ( string message ) { err println ( get name ( ) + " : " + message ) ; }


set constraints via the key that was used to register its factory in { @ link job manager configuration ) } ;

public @ non null builder set constraints ( @ non null list < string > constraint keys ) { this constraint keys clear ( ) ; this constraint keys add all ( constraint keys ) ; return this ; }


register a listener that will be called when this model visibility has changed the listener will contribute to this model ' s hash code state per the { @ link com airbnb epoxy epoxy attribute option # do not hash } rules

public generated model suffix view suffix on visibility changed ( on model visibility changed listener < generated model suffix view suffix , generated model suffix view > listener ) { on mutation ( ) ; this on model visibility changed listener epoxy generated model = listener ; return this ; }


sets the loader to use for imports , as well as any loader - specific arguments a null loader will attempt " best - guess " if possible loader arguments are not supported if a " best - guess " is made

public void set loader ( string loader name , list < pair < string , string > > loader args ) throws invalid input exception { if ( loader name ! = null ) { this loader class = loader service get loader class by name ( loader name ) ; if ( this loader class = = null ) { throw new invalid input exception ( " invalid loader name specified : " + loader name ) ; } this loader args = loader args ; } else { if ( loader args ! = null & & loader args size ( ) > 0 ) { throw new invalid input exception ( " loader arguments defined without a loader being specified " ) ; } this loader class = null ; this loader args = null ; } }


public integer get name integer ( ) { return name integer ; }


remove the specified child from this directory the basic remove method which actually calls children remove ( )

public boolean remove child ( final i node child ) { final int i = search children ( child get local name bytes ( ) ) ; if ( i < 0 ) { return false ; } final i node removed = children remove ( i ) ; preconditions check state ( removed equals ( child ) ) ; return true ; }


returns a hash of various properties of a rule which might contribute to the rule ' s " affectedness " this includes , but is not limited to , attribute values and error - state

static string compute ( rule rule , map < attribute , build attribute > serialized attributes , object extra data for attr hash , hash function hash function ) { hashing output stream hashing output stream = new hashing output stream ( hash function , byte streams null output stream ( ) ) ; coded output stream coded out = coded output stream new instance ( hashing output stream ) ; rule class rule class = rule get rule class object ( ) ; if ( rule class is starlark ( ) ) { try { coded out write byte array no tag ( preconditions check not null ( rule class get rule definition environment digest ( ) , rule ) ) ; } catch ( i o exception e ) { throw new illegal state exception ( " unexpected io failure writing to digest stream " , e ) ; } } raw attribute mapper raw attribute mapper = raw attribute mapper of ( rule ) ; for ( attribute attr : rule get attributes ( ) ) { string attr name = attr get name ( ) ; if ( attr name equals ( " generator location " ) ) { / / generator location can be ignored for the purpose of telling if a rule has changed continue ; } object value to hash = raw attribute mapper get raw attribute value ( rule , attr ) ; if ( value to hash instanceof computed default ) { / / configured defaults need special handling to detect changes in evaluated values computed default computed default = ( computed default ) value to hash ; if ( ! computed default dependencies ( ) is empty ( ) ) { / / todo ( b / 29038463 ) : we ' re skipping computed defaults that depend on other configurable / / attributes because there currently isn ' t a way to evaluate such a computed default ; / / there isn ' t * one * value it evaluates to continue ; } try { value to hash = computed default get default ( raw attribute mapper ) ; } catch ( illegal argument exception e ) { / / todo ( mschaller ) : catching illegal argument exception isn ' t ideal it ' s thrown by / / abstract attribute mapper # get if the attribute ' s type doesn ' t match its value , which / / would happen if a computed default function accessed an attribute whose value was / / configurable we check whether the computed default declared any configurable / / attribute dependencies above , but someone could make a mistake and fail to declare / / something there ' s no mechanism that enforces correct declaration right now / / this allows us to recover from such an error by skipping an attribute , as opposed to / / crashing logger at warning ( ) log ( " recovering from failed evaluation of computed default attribute value : " + e ) ; continue ; } } build attribute attr pb ; if ( value to hash instanceof selector list < ? > | | ! serialized attributes contains key ( attr ) ) { / / we didn ' t already serialize the attribute or it ' s a selector list latter may / / have been flattened while we want the full representation , so we start from scratch attr pb = attribute formatter get attribute proto ( attr , value to hash , / * explicitly specified = * / false , / / we care about value , not how it was set / * encode boolean and tri state as integer and string = * / false ) ; } else { attr pb = serialized attributes get ( attr ) ; } try { attr pb write to ( coded out ) ; } catch ( i o exception e ) { throw new illegal state exception ( " unexpected io failure writing to digest stream " , e ) ; } } try { / / rules can be considered changed when the containing package goes in / out of error coded out write bool no tag ( rule get package ( ) contains errors ( ) ) ; } catch ( i o exception e ) { throw new illegal state exception ( " unexpected io failure writing to digest stream " , e ) ; } try { / / include a summary of any package - wide data that applies to this target ( e g custom make / / variables aka ` vardef ` ) coded out write string no tag ( ( string ) extra data for attr hash ) ; } catch ( i o exception e ) { throw new illegal state exception ( " unexpected io failure writing to digest stream " , e ) ; } try { / / flush coded out to make sure all bytes make it to the underlying digest stream coded out flush ( ) ; } catch ( i o exception e ) { throw new illegal state exception ( " unexpected flush failure " , e ) ; } return base encoding base 6 4 ( ) encode ( hashing output stream hash ( ) as bytes ( ) ) ; }


populates the attributes table of the new { @ link rule } with the values in the { @ code attribute values } map and with default values provided by this { @ link rule class } and the { @ code pkg builder } errors are reported on { @ code event handler }

private < t > void populate rule attribute values ( rule rule , package builder pkg builder , attribute values < t > attribute values , event handler event handler ) throws interrupted exception , cannot precompute defaults exception { bit set defined attr indices = populate defined rule attribute values ( rule , pkg builder get repository mapping ( ) , attribute values , pkg builder get list interner ( ) , pkg builder get converted labels in package ( ) , event handler ) ; populate default rule attribute values ( rule , pkg builder , defined attr indices , event handler ) ; / / now that all attributes are bound to values , collect and store configurable attribute keys populate config dependencies attribute ( rule ) ; }


publish the volume on a node manager , the volume will be mounted to the local file system and become visible for clients

node publish volume response node publish volume ( node publish volume request request ) throws yarn exception , i o exception ;


register this particular solver with the general expression solver

protected void register ( recursive descent solver general ) { this solver = general ; general register ( tcls , this ) ; }


convert the given object to string with each line indented by 4 spaces ( except the first line )

private string to indented string ( object o ) { if ( o = = null ) { return " null " ; } return o to string ( ) replace ( " \ n " , " \ n " ) ; }


sets the input row from left table , which will be used to cross join with the result of right table

public void set input ( object input ) { this input = input ; }


create a readable and parseable audit log string for a successful event

public static void log success ( string user , string operation , string target ) { if ( log is info enabled ( ) ) { log info ( create success log ( user , operation , target , null , null , null , null ) ) ; } }


adds the given button to the button table

public dialog button ( button button ) { return button ( button , null ) ; }


append a key to a set the key must be strictly greater than the previous key added to the set

public void append ( writable comparable key ) throws i o exception { append ( key , null writable get ( ) ) ; }


over a period of several ' windows ' a single attempt will be made and fail and then finally succeed and close the circuit ensure the circuit is kept open through the entire testing period and that only the single attempt in each window is made

public void test multiple time window retries before closing circuit ( ) { string key = " cmd - h " ; try { int sleep window = 200 ; hystrix command < boolean > cmd 1 = new failure command ( key , 60 ) ; hystrix circuit breaker cb = cmd 1 circuit breaker ; / / this should start as allowing requests assert true ( cb allow request ( ) ) ; assert false ( cb is open ( ) ) ; cmd 1 execute ( ) ; hystrix command < boolean > cmd 2 = new failure command ( key , 1 ) ; cmd 2 execute ( ) ; hystrix command < boolean > cmd 3 = new failure command ( key , 1 ) ; cmd 3 execute ( ) ; hystrix command < boolean > cmd 4 = new timeout command ( key ) ; cmd 4 execute ( ) ; / / everything has failed in the test window so we should return false now system out println ( " ! ! ! ! 1 : 4 failures , circuit will open on recalc " ) ; thread sleep ( 100 ) ; assert true ( cb is open ( ) ) ; / / wait for sleep window to pass system out println ( " ! ! ! ! 2 : sleep window starting where all commands fail - fast " ) ; thread sleep ( sleep window + 50 ) ; system out println ( " ! ! ! ! 3 : sleep window over , should allow single test ( ) " ) ; / / but the circuit should still be open assert true ( cb is open ( ) ) ; / / we should now allow 1 request , and upon failure , should not affect the circuit breaker , which should remain open hystrix command < boolean > cmd 5 = new failure command ( key , 60 ) ; observable < boolean > async result 5 = cmd 5 observe ( ) ; system out println ( " ! ! ! ! 4 : kicked off the single - test " ) ; / / and further requests are still blocked while the single test command is in flight assert false ( cb allow request ( ) ) ; system out println ( " ! ! ! ! 5 : confirmed that no other requests go out during single - test " ) ; async result 5 to blocking ( ) single ( ) ; system out println ( " ! ! ! ! 6 : single test just completed " ) ; / / all requests should still be blocked , because the single test failed assert false ( cb allow request ( ) ) ; assert false ( cb allow request ( ) ) ; assert false ( cb allow request ( ) ) ; / / wait for sleep window to pass system out println ( " ! ! ! ! 2nd sleep window start " ) ; thread sleep ( sleep window + 50 ) ; system out println ( " ! ! ! ! 2nd sleep window over " ) ; / / we should now allow 1 request , and upon failure , should not affect the circuit breaker , which should remain open hystrix command < boolean > cmd 6 = new failure command ( key , 60 ) ; observable < boolean > async result 6 = cmd 6 observe ( ) ; system out println ( " 2nd single test just kicked off " ) ; / / and further requests are still blocked while the single test command is in flight assert false ( cb allow request ( ) ) ; system out println ( " confirmed that 2nd singletest only happened once " ) ; async result 6 to blocking ( ) single ( ) ; system out println ( " 2nd single test now over " ) ; / / all requests should still be blocked , because the single test failed assert false ( cb allow request ( ) ) ; assert false ( cb allow request ( ) ) ; assert false ( cb allow request ( ) ) ; / / wait for sleep window to pass thread sleep ( sleep window + 50 ) ; / / but the circuit should still be open assert true ( cb is open ( ) ) ; / / we should now allow 1 request , and upon success , should cause the circuit to be closed hystrix command < boolean > cmd 7 = new success command ( key , 60 ) ; observable < boolean > async result 7 = cmd 7 observe ( ) ; / / and further requests are still blocked while the single test command is in flight assert false ( cb allow request ( ) ) ; async result 7 to blocking ( ) single ( ) ; / / all requests should be open again assert true ( cb allow request ( ) ) ; assert true ( cb allow request ( ) ) ; assert true ( cb allow request ( ) ) ; / / and the circuit should be closed again assert false ( cb is open ( ) ) ; / / and the circuit should be closed again assert false ( cb is open ( ) ) ; } catch ( exception e ) { e print stack trace ( ) ; fail ( " error occurred : " + e get message ( ) ) ; } }


creates a 2 - d array of editor tiles with stone as the floor block

private void create tiles ( int width , int height ) { tiles tiles = world resize ( width , height ) ; for ( int x = 0 ; x < width ; x + + ) { for ( int y = 0 ; y < height ; y + + ) { tiles set ( x , y , new editor tile ( x , y , blocks stone id , ( short ) 0 , ( short ) 0 ) ) ; } } }


the string pool containing source paths referenced throughout the resource table this does not end up in the final binary arsc file < code > optional aapt pb string pool source pool = 1 ; < code >

public com android aapt resources string pool get source pool ( ) { return source pool = = null ? com android aapt resources string pool get default instance ( ) : source pool ; }


returns the deprecations provided by the update site

public map < string , deprecation > get deprecations ( ) { return this deprecations ; }


the time that the datafeed should end this value is exclusive if you do not specify an end time , the datafeed runs continuously

public void set end ( string end ) { this end = end ; }


return a composed routing function that routes to the given handler function if this route does not match and the given request predicate applies this method is a convenient combination of { @ link # and ( router function ) } and { @ link router functions # route ( request predicate , handler function ) }

default router function < t > and route ( request predicate predicate , handler function < t > handler function ) { return and ( router functions route ( predicate , handler function ) ) ; }


discards every partial match that started before emitted match ended

public static skip past last strategy skip past last event ( ) { return skip past last strategy instance ; }


returns the root of the traversal ; see { @ link direct traversal root }

public abstract direct traversal root get root ( ) ;


called when the audio session id becomes known the default implementation is a no - op one reason for overriding this method would be to instantiate and enable a { @ link virtualizer } in order to spatialize the audio channels for this use case , any { @ link virtualizer } instances should be released in { @ link # on disabled ( ) } ( if not before ) see { @ link audio sink listener # on audio session id ( int ) }

protected void on audio session id ( int audio session id ) { / / do nothing }


the origin influences { @ link # set position ( float , float ) } , { @ link # set rotation ( float ) } and the expansion direction of scaling { @ link # set scale ( float , float ) }

public float get origin x ( ) { return origin x ; }


tests that with { @ link high availability mode # zookeeper } distributed corrupted j a rs are recognised during the download via a { @ link org apache flink runtime blob blob server }

public void test blob server corrupted file ( ) throws exception { org apache flink configuration configuration config = new org apache flink configuration configuration ( ) ; config set string ( high availability options ha mode , " zookeeper " ) ; config set string ( blob server options storage directory , temporary folder new folder ( ) get absolute path ( ) ) ; config set string ( high availability options ha storage path , hdfs u r i ) ; blob store service blob store service = blob utils create blob store from config ( config ) ; try { blob server corruption test test get fails from corrupt file ( config , blob store service , exception ) ; } finally { blob store service close and cleanup all data ( ) ; } }


test { @ link reporter } ' s progress for a map - only job this will make sure that only the map phase decides the attempt ' s progress

public void test reporter progress for map only job ( ) throws i o exception { path test = new path ( test root temp dir , " test reporter progress for map only job " ) ; job conf conf = new job conf ( ) ; conf set mapper class ( progress tester mapper class ) ; conf set map output key class ( text class ) ; / / fail early conf set max map attempts ( 1 ) ; conf set max reduce attempts ( 0 ) ; running job job = utils for tests run job ( conf , new path ( test , " in " ) , new path ( test , " out " ) , 1 , 0 , input ) ; job wait for completion ( ) ; assert true ( " job failed " , job is successful ( ) ) ; }


public static void main ( string [ ] args ) throws exception { var aqfc = new app queue fail cases ( ) ; / / aqfc queue payment task database unavailable case ( ) ; / / aqfc queue message task database unavailable case ( ) ; / / aqfc queue employee db task database unavailable case ( ) ; aqfc queue success case ( ) ; }


scan the class path for candidate components

public set < bean definition > find candidate components ( string base package ) { if ( this components index ! = null & & index supports include filters ( ) ) { return add candidate components from index ( this components index , base package ) ; } else { return scan candidate components ( base package ) ; } }


return a { @ code request predicate } that tests the request path against the given path pattern

public static request predicate path ( string pattern ) { assert not null ( pattern , " ' pattern ' must not be null " ) ; if ( ! pattern is empty ( ) & & ! pattern starts with ( " / " ) ) { pattern = " / " + pattern ; } return path predicates ( path pattern parser default instance ) apply ( pattern ) ; }


calculates the squared radius of the bounding sphere around the specified center for the specified part

public float calculate radius ( final float center x , final float center y , final float center z , int offset , int count ) { return calculate radius ( center x , center y , center z , offset , count , null ) ; }


get the configuration properties of the job

public job properties get job properties ( ) { return job properties ; }


construct a single automaton to represent the set of { @ code granted fields } except for the { @ code denied fields }

public static automaton build permitted fields automaton ( final string [ ] granted fields , final string [ ] denied fields ) { automaton granted fields automaton ; if ( granted fields = = null | | arrays stream ( granted fields ) any match ( regex : : is match all pattern ) ) { granted fields automaton = automatons match all ; } else { / / an automaton that includes metadata fields , including join fields created by the parent field such / / as parent # type automaton meta fields automaton = operations concatenate ( automata make char ( ' ' ) , automata make any string ( ) ) ; granted fields automaton = operations union ( automatons patterns ( granted fields ) , meta fields automaton ) ; } automaton denied fields automaton ; if ( denied fields = = null | | denied fields length = = 0 ) { denied fields automaton = automatons empty ; } else { denied fields automaton = automatons patterns ( denied fields ) ; } granted fields automaton = minimization operations minimize ( granted fields automaton , operations default max determinized states ) ; denied fields automaton = minimization operations minimize ( denied fields automaton , operations default max determinized states ) ; if ( subset of ( denied fields automaton , granted fields automaton ) = = false ) { throw new elasticsearch security exception ( " exceptions for field permissions must be a subset of the " + " granted fields but " + strings array to comma delimited string ( denied fields ) + " is not a subset of " + strings array to comma delimited string ( granted fields ) ) ; } granted fields automaton = automatons minus and minimize ( granted fields automaton , denied fields automaton ) ; return granted fields automaton ; }


variant of { @ link # set await termination seconds } with millisecond precision

public void set await termination millis ( long await termination millis ) { this await termination millis = await termination millis ; }


set the name of a subscription to create to be applied in case of a topic ( pub - sub domain ) with a shared or durable subscription the subscription name needs to be unique within this client ' s jms client id default is the class name of the specified message listener note : only 1 concurrent consumer ( which is the default of this message listener container ) is allowed for each subscription , except for a shared subscription ( which requires jms 2 0 )

public void set subscription name ( @ nullable string subscription name ) { this subscription name = subscription name ; }


get list of date values collected within a thread execution

public list < date > get date list ( ) { return date list ; }


public synchronized void activate queue ( string queue name ) throws yarn exception { scheduler queue < t > queue = queue manager get queue ( queue name ) ; if ( queue = = null ) { throw new yarn exception ( " the specified queue : " + queue name + " does not exist ! " ) ; } queue active queue ( ) ; }


returns a new , mutable copy of this array ' s values , as a primitive { @ code int [ ] }

public int [ ] to array ( ) { return arrays copy of range ( array , start , end ) ; }


test serialization of outer string types

public void fake outer string serialize ( string body , handler < async result < string > > result handler ) { fake outer string serialize ( body , null , result handler ) ; }


returns true if this actor is the { @ link stage # get scroll focus ( ) scroll focus } actor

public boolean has scroll focus ( ) { stage stage = get stage ( ) ; return stage ! = null & & stage get scroll focus ( ) = = this ; }


returns whether the given visitor accepter has been marked as being used in this context , the visitor accepter will be an attribute object

static boolean is used ( visitor accepter visitor accepter ) { return visitor accepter get visitor info ( ) = = used ; }


return the string ranging from the start of the current partition to the current scanning position some rules (

public string get scanned partition string ( ) { try { return f document get ( f partition offset , f offset - f partition offset ) ; } catch ( exception e ) { / / do nothing } return " " ; }


returns true if the only uses of this register form a circle of operations with no side effects

private boolean is circular no side effect ( int reg v , bit set set ) { if ( ( set ! = null ) & & set get ( reg v ) ) { return true ; } for ( ssa insn use : use list [ reg v ] ) { if ( has side effect ( use ) ) { return false ; } } if ( set = = null ) { set = new bit set ( reg count ) ; } / / this register is only used in operations that have no side effect set set ( reg v ) ; for ( ssa insn use : use list [ reg v ] ) { register spec result = use get result ( ) ; if ( result = = null | | ! is circular no side effect ( result get reg ( ) , set ) ) { return false ; } } return true ; }


test json serialization of form data < b > 200 < b > - successful operation

public void test json form data ( string param , string param 2 ) throws rest client exception { test json form data with http info ( param , param 2 ) ; }


resets all custom offsets set via set view port offsets ( ) method allows the chart to again calculate all offsets automatically

public void reset view port offsets ( ) { m custom view port enabled = false ; calculate offsets ( ) ; }


like { @ link # parse dts audio sample count ( byte [ ] ) } but reads from a { @ link byte buffer } the buffer ' s position is not modified

public static int parse dts audio sample count ( byte buffer buffer ) { / / see etsi ts 102 114 subsection 5 4 1 int position = buffer position ( ) ; int nblks ; switch ( buffer get ( position ) ) { case first byte le : nblks = ( ( buffer get ( position + 5 ) & 0x 0 1 ) < < 6 ) | ( ( buffer get ( position + 4 ) & 0x f c ) > > 2 ) ; break ; case first byte 14b le : nblks = ( ( buffer get ( position + 4 ) & 0x 0 7 ) < < 4 ) | ( ( buffer get ( position + 7 ) & 0x 3 c ) > > 2 ) ; break ; case first byte 14b be : nblks = ( ( buffer get ( position + 5 ) & 0x 0 7 ) < < 4 ) | ( ( buffer get ( position + 6 ) & 0x 3 c ) > > 2 ) ; break ; default : / / we blindly assume first byte be if none of the others match nblks = ( ( buffer get ( position + 4 ) & 0x 0 1 ) < < 6 ) | ( ( buffer get ( position + 5 ) & 0x f c ) > > 2 ) ; } return ( nblks + 1 ) * 32 ; }


provides a hint to clients for a suitable length to use with { @ link blob container # read blob ( string , long , long ) } some blob containers have nontrivial costs attached to each read blob call , so it is a good idea for consumers to speculatively request more data than they need right now and to re - use this stream for future needs if possible also , some blob containers return streams that are expensive to close before the stream has been fully consumed , and the cost may depend on the length of the data that was left unconsumed for these containers it ' s best to bound the cost of a partial read by bounding the length of the data requested

default long read blob preferred length ( ) { throw new unsupported operation exception ( ) ; / / norelease }


public event type get event type ( ) { return event type map attempt finished ; }


{ @ inherit doc } the default implementation does nothing

@ override public void exit arithmetic unary ( eql base parser arithmetic unary context ctx ) { }


fills { @ link # sample encryption data } from the provided source

public void fill encryption data ( parsable byte array source ) { source read bytes ( sample encryption data get data ( ) , 0 , sample encryption data limit ( ) ) ; sample encryption data set position ( 0 ) ; sample encryption data needs fill = false ; }


see { @ link audio sink listener # on position discontinuity ( ) }

protected void on position discontinuity ( ) { / / we are out of sync so allow current position us to jump backwards allow position discontinuity = true ; }


read an address for elasticsearch suitable for the jdbc driver from the system properties

public static string elasticsearch address ( ) { string cluster = system get property ( " tests rest cluster " ) ; / / jdbc only supports a single node at a time so we just give it one return cluster split ( " , " ) [ 0 ] ; / * this doesn ' t include " jdbc : es : / / " because we want the example in * es jdbc to be obvious and because we want to use get protocol to add * https if we are running against https * / }


copy bytes from an < code > input stream < code > to an < code > output stream < code > this method buffers the input internally , so there is no need to use a < code > buffered input stream < code > large streams ( over 2gb ) will return a bytes copied value of < code > - 1 < code > after the copy has completed since the correct number of bytes cannot be returned as an int for large streams use the < code > copy large ( input stream , output stream ) < code > method

public static int copy ( input stream input , output stream output ) throws i o exception { long count = copy large ( input , output ) ; if ( count > integer max value ) { return - 1 ; } return ( int ) count ; }


return the full version string of the present spring codebase , or { @ code null } if it cannot be determined

public static string get version ( ) { package pkg = spring version class get package ( ) ; return ( pkg ! = null ? pkg get implementation version ( ) : null ) ; }


returns the { @ link hash code } based on the data read from this stream the result is unspecified if this method is called more than once on the same instance

public hash code hash ( ) { return hasher hash ( ) ; }


shortcut for call { @ link # write ( object ) } and { @ link # flush ( ) }

channel future write and flush ( object msg ) ;


does this instance have an encryption key ?

public boolean has encryption key ( ) { return string utils is not empty ( encryption key ) ; }


get the aggregated value for a method for all nameservices

private int get nameservice aggregated int ( to int function < membership stats > f ) { try { return get active namenode registrations ( ) stream ( ) map ( membership state : : get stats ) collect ( collectors summing int ( f ) ) ; } catch ( i o exception e ) { log error ( " unable to extract metrics : { } " , e get message ( ) ) ; return 0 ; } }


find the fields constant that matches field id , or null if its not found

public static fields find by thrift id ( int field id ) { switch ( field id ) { case 1 : / / name return name ; case 2 : / / times return times ; default : return null ; } }


returns the index { @ link settings } for this index

public settings get settings ( ) { return index settings get settings ( ) ; }


void set root expression ( expression expression ) { this root expression = expression ; }


returns true if field corresponding to field i d is set ( has been assigned a value ) and false otherwise

public boolean is set ( fields field ) { if ( field = = null ) { throw new illegal argument exception ( ) ; } switch ( field ) { case millis : return is set millis ( ) ; } throw new illegal state exception ( ) ; }


obtain metadata for this bean definition ' s factory method , if any

method metadata get factory method metadata ( ) ;


convert the given object to string with each line indented by 4 spaces ( except the first line )

private string to indented string ( object o ) { if ( o = = null ) { return " null " ; } return o to string ( ) replace ( " \ n " , " \ n " ) ; }


public void binary test ( ) { / / todo : test binary }


returns a { @ link function } that invokes { @ link # escape ( string ) } on this escaper

public final function < string , string > as function ( ) { return as function ; }


creates a metadata column from metadata of the given column name allows to specify whether the column is virtual or not

public static metadata column metadata ( string name , data type type , boolean is virtual ) { return metadata ( name , type , null , is virtual ) ; }


sets the transformation matrix to identity

public void identity ( ) { transform matrix idt ( ) ; matrix dirty = true ; }


public void id test ( ) { / / todo : test id }


parses an expression - used only in tests

public expression create expression ( string expression , list < sql typed param value > params ) { if ( log is debug enabled ( ) ) { log debug ( " parsing as expression : { } " , expression ) ; } return invoke parser ( expression , params , utc , sql base parser : : single expression , ast builder : : expression ) ; }


public byte get cpu flag ( ) { return o cpuflag ; }


specify the language and address without binding to a program

public void set language location ( language lang , long addr ) { this program = null ; this addr = lang get default space ( ) get address ( addr ) ; this existing = null ; this assembler = assemblers get assembler ( lang ) ; }


called once a write operation is made the write operation will write the messages through the { @ link channel pipeline } those are then ready to be flushed to the actual { @ link channel } once { @ link channel # flush ( ) } is called

void write ( channel handler context ctx , object msg , channel promise promise ) throws exception ;


capitalize a { @ code string } , changing the first letter to upper case as per { @ link character # to upper case ( char ) } no other letters are changed

public static string capitalize ( string str ) { return change first character case ( str , true ) ; }


get stored value by key from the headless analyzer instance this method , along with the ' stored headless value ' method , is useful for debugging and testing the headless analyzer ( when the user has directly instantiated the headless analyzer instead of running it from analyze headless sh or analyze headless bat ) this method is intended to allow a headless script to store variables that reflect the current state of processing ( at the time the script is being run ) storing variables in the headless analyzer instance may be the only way to access the state of processing during cases when the user is forced to run in - read only mode , or if there is a value that is only accessible at the scripts stage

public object get stored headless value ( string key ) throws improper use exception { check headless status ( ) ; return headless get variable from storage ( key ) ; }


encodes exceptions where " - ca - " should encode to s instead of k including cases where the cedilla has not been used

boolean encode ca to s ( ) { / / special case : ' caesar ' / / also , where cedilla not used , as in " linguica " = > lnks if ( ( ( m current = = 0 ) & & string at ( m current , 4 , " caes " , " caec " , " caem " , " " ) ) | | string at ( 0 , 8 , " francais " , " francaix " , " linguica " , " " ) | | string at ( 0 , 6 , " facade " , " " ) | | string at ( 0 , 9 , " goncalves " , " provencal " , " " ) ) { metaph add ( " s " ) ; advance counter ( 2 , 1 ) ; return true ; } return false ; }


see { @ link gif drawable # get loop count ( ) }

public int get loop count ( ) { return m gif info handle get loop count ( ) ; }


processes the three arguments given to determine if the arguments are ( i ) three valid strings , ( ii ) three valid integers , ( iii ) two valid strings and a valid integer , ( iv ) a valid string and two valid integers or ( v ) invalid arguments in this case , all valid strings can only contain a single argument

private object create range with three given arguments ( object [ ] args ) { object first arg = args [ 0 ] ; object second arg = args [ 1 ] ; object third arg = args [ 2 ] ; / / deal with negative integers first if ( first arg ! = null & & first arg instanceof double & & ( double ) first arg % 1 = = 0 ) { first arg = ( ( double ) first arg ) int value ( ) ; } if ( second arg ! = null & & second arg instanceof double & & ( double ) second arg % 1 = = 0 ) { second arg = ( ( double ) second arg ) int value ( ) ; } if ( third arg ! = null & & third arg instanceof double & & ( double ) third arg % 1 = = 0 ) { third arg = ( ( double ) third arg ) int value ( ) ; } try { int range start = integer parse int ( string value of ( first arg ) trim ( ) ) ; int range end = integer parse int ( string value of ( second arg ) trim ( ) ) ; int range step = integer parse int ( string value of ( third arg ) trim ( ) ) ; return create range ( range start , range end , range step ) ; } catch ( number format exception nfe ) { return new eval error ( control function registry get function name ( this ) + " expects a string of the form ' a , b , c ' or integers a , b , c where a and b " + " are the start and the end of the range respectively and c is the step ( increment ) " ) ; } }


gets the value of the option with the given name from the given list of options

public static < t > t get option ( string option name , list < option > options , t default value ) { if ( options ! = null ) { for ( option option : options ) { if ( option get name ( ) equals ( option name ) ) { return ( t ) option get value ( ) ; } } } return default value ; }


protected event finalize response event ( final request context request context , final web application service service , final response response ) { web utils put service response into request scope ( request context , response ) ; web utils put service original url into request scope ( request context , service ) ; val event id = get final response event id ( service , response , request context ) ; return new event factory support ( ) event ( this , event id ) ; }


adjusts glide ' s current and maximum memory usage based on the given { @ link memory category } the default { @ link memory category } is { @ link memory category # normal } { @ link memory category # high } increases glide ' s maximum memory usage by up to 50 % and { @ link memory category # low } decreases glide ' s maximum memory usage by 50 % this method should be used to temporarily increase or decrease memory usage for a single activity or part of the app use { @ link glide builder # set memory cache ( memory cache ) } to put a permanent memory size if you want to change the default

public memory category set memory category ( @ non null memory category memory category ) { / / engine asserts this anyway when removing resources , fail faster and consistently util assert main thread ( ) ; / / memory cache needs to be trimmed before bitmap pool to trim re - pooled bitmaps too see # 687 memory cache set size multiplier ( memory category get multiplier ( ) ) ; bitmap pool set size multiplier ( memory category get multiplier ( ) ) ; memory category old category = this memory category ; this memory category = memory category ; return old category ; }