required the ports associated with the external service if the endpoints are unix domain socket addresses , there must be exactly one port < code > repeated istio networking v 1alpha 3 port ports = 3 ; < code >

public java util list < com alibaba nacos istio model port > get ports list ( ) { if ( ports builder = = null ) { return java util collections unmodifiable list ( ports ) ; } else { return ports builder get message list ( ) ; } }


get the aggregate of all the allocations count

public long get aggregate allocation count ( ) { return get aggregate operation count ( operation allocation ) ; }


public spout declarer set spout ( string id , i rich spout spout ) { return set spout ( id , spout , null ) ; }


a sequence of requests followed by one response ( streamed upload ) the server returns the aggregated size of client payload as the result

public io grpc stub stream observer < io grpc testing integration messages streaming input call request > streaming input call ( io grpc stub stream observer < io grpc testing integration messages streaming input call response > response observer ) { return io grpc stub server calls async unimplemented streaming call ( get streaming input call method ( ) , response observer ) ; }


test the config value separated by delimiter

@ test public void test delimiter conf ( ) { string filename = get test filename ( " test - metrics 2 - delimiter " ) ; new config builder ( ) add ( " p 1 foo " , " p 1foo 1 , p 1foo 2 , p 1foo 3 " ) save ( filename ) ; metrics config mc = metrics config create ( " p 1 " , filename ) ; configuration expected = new config builder ( ) add ( " foo " , " p 1foo 1 " ) add ( " foo " , " p 1foo 2 " ) add ( " foo " , " p 1foo 3 " ) config ; assert eq ( expected , mc ) ; }


returns a recyclable m p point f instance calculates the position around a center point , depending on the distance from the center , and the angle of the position around the center

public static m p point f get position ( m p point f center , float dist , float angle ) { m p point f p = m p point f get instance ( 0 , 0 ) ; get position ( center , dist , angle , p ) ; return p ; }


returns whether to wait to make absolutely certain that all snapshots have been deleted

protected boolean wait for all snapshots wiped ( ) { return false ; }


send a message to the given user by default headers are interpreted as native headers ( e g stomp ) and are saved under a special key in the resulting spring { @ link org springframework messaging message message } in effect when the message leaves the application , the provided headers are included with it and delivered to the destination ( e g the stomp client or broker ) if the map already contains the key { @ link org springframework messaging support native message header accessor # native headers " native headers " } or was prepared with { @ link org springframework messaging simp simp message header accessor simp message header accessor } then the headers are used directly a common expected case is providing a content type ( to influence the message conversion ) and native headers this may be done as follows : < pre class = " code " > simp message header accessor accessor = simp message header accessor create ( ) ; accessor set content type ( mime type utils text plain ) ; accessor set native header ( " foo " , " bar " ) ; accessor set leave mutable ( true ) ; message headers headers = accessor get message headers ( ) ; messaging template convert and send to user ( user , destination , payload , headers ) ; note : if the { @ code message headers } are mutable as in the above example , implementations of this interface should take notice and update the headers in the same instance ( rather than copy or re - create it ) and then set it immutable before sending the final message

void convert and send to user ( string user , string destination , object payload , map < string , object > headers ) throws messaging exception ;


public string to string ( ) { string buffer sb = new string buffer ( 100 ) ; sb append ( get class ( ) get name ( ) ) ; sb append ( items ) ; return sb to string ( ) ; }


return a future which can be used to check the result for a given partition

public kafka future < void > partition result ( final topic partition partition ) { if ( ! partitions contains ( partition ) ) { throw new illegal argument exception ( " partition " + partition + " was not included in the original request " ) ; } final kafka future impl < void > result = new kafka future impl < > ( ) ; this future when complete ( ( topic partitions , throwable ) - > { if ( throwable ! = null ) { result complete exceptionally ( throwable ) ; } else if ( ! maybe complete exceptionally ( topic partitions , partition , result ) ) { result complete ( null ) ; } } ) ; return result ; }


return reference column of referrer association ( fk ) assumes that columns in both constraints are in the same order

public static d b s entity attribute get reference attribute ( @ not null d b r progress monitor monitor , @ not null d b s entity association association , @ not null d b s entity attribute table column , boolean reference ) throws d b exception { final d b s entity constraint ref constr = association get referenced constraint ( ) ; if ( association instanceof d b s entity referrer & & ref constr instanceof d b s entity referrer ) { final collection < ? extends d b s entity attribute ref > own attrs = ( ( d b s entity referrer ) association ) get attribute references ( monitor ) ; final collection < ? extends d b s entity attribute ref > ref attrs = ( ( d b s entity referrer ) ref constr ) get attribute references ( monitor ) ; if ( own attrs = = null | | ref attrs = = null | | own attrs size ( ) ! = ref attrs size ( ) ) { log error ( " invalid internal state of referrer association " ) ; return null ; } final iterator < ? extends d b s entity attribute ref > own iterator = own attrs iterator ( ) ; final iterator < ? extends d b s entity attribute ref > ref iterator = ref attrs iterator ( ) ; while ( own iterator has next ( ) ) { d b s entity attribute ref own attr = own iterator next ( ) ; if ( reference ) { if ( own attr instanceof d b s table foreign key column & & ( ( d b s table foreign key column ) own attr ) get referenced column ( ) = = table column ) { return ref iterator next ( ) get attribute ( ) ; } } else if ( own attr get attribute ( ) = = table column ) { return ref iterator next ( ) get attribute ( ) ; } ref iterator next ( ) ; } } return null ; }


parse string literal to expression object , which can be reused

public static expression parse ( final string expression ) { compiler configuration cc = new compiler configuration ( ) ; cc set script base class ( delegating script class get name ( ) ) ; groovy shell sh = new groovy shell ( new binding ( ) , cc ) ; delegating script script = ( delegating script ) sh parse ( expression ) ; return new expression ( expression , script ) ; }


copies bytes from the array of byte buffers into the destination buffer the number of bytes copied is limited by the bytes available to copy and the space remaining in the destination byte buffer

public static long copy bytes ( byte buffer [ ] source , byte buffer destination ) { long bytes copied = 0 ; for ( int i = 0 ; i < source length & & destination has remaining ( ) ; i + + ) { byte buffer buffer = source [ i ] ; bytes copied + = copy bytes ( buffer , destination ) ; } return bytes copied ; }


creates a radio button with the given attributes

private j radio button create search r b ( abstract action action , string name , string tooltip ) { g radio button button = new g radio button ( action ) ; button set text ( name ) ; button set tool tip text ( tooltip ) ; button set alignment x ( component left alignment ) ; return button ; }


return true if this simple quadrilateral object is equal to o

public boolean equals ( object o ) { if ( this = = o ) { return true ; } if ( o = = null | | get class ( ) ! = o get class ( ) ) { return false ; } simple quadrilateral simple quadrilateral = ( simple quadrilateral ) o ; return objects equals ( this shape type , simple quadrilateral shape type ) & & objects equals ( this quadrilateral type , simple quadrilateral quadrilateral type ) & & objects equals ( this additional properties , simple quadrilateral additional properties ) ; }


in memory web authn credential repository

static web authn credential repository in memory ( ) { return new in memory web authn ( ) ; }


submit an input buffer that is potentially encrypted for decoding the { @ code index } must be an input buffer index that has been obtained from a previous call to { @ link # dequeue input buffer index ( ) } this method behaves like { @ link media codec # queue secure input buffer } , with the difference that { @ code info } is of type { @ link crypto info } and not { @ link android media media codec crypto info }

void queue secure input buffer ( int index , int offset , crypto info info , long presentation time us , int flags ) ;


notification when the memory map changes if we are segemented , we need to update our list of address ranges used for address normalization

public synchronized void memory map changed ( memory map d b mem ) { if ( ! ( addr factory get default address space ( ) instanceof segmented address space ) ) { segmented ranges = null ; return ; / / if not segmented , we don ' t care } memory block [ ] blocks = mem get blocks ( ) ; segmented ranges = new array list < address range > ( blocks length ) ; for ( memory block block : blocks ) { segmented ranges add ( new address range impl ( block get start ( ) , block get end ( ) ) ) ; } }


public boolean exists ( final path f ) throws i o exception { try { return get file status ( f ) ! = null ; } catch ( file not found exception | file conflict exception e ) { return false ; } }


get the body transform for the body ' s origin

public transform get transform ( ) { org jbox 2d common transform trans = body get transform ( ) ; transform vals [ transform pos x ] = trans p x ; transform vals [ transform pos y ] = trans p y ; transform vals [ transform cos ] = trans q c ; transform vals [ transform sin ] = trans q s ; return transform ; }


sets the < code > enum string required < code > property

public void set enum string required ( enum string required enum enum string required ) { this enum string required = enum string required ; }


gets whether to decode all the frames and store them in memory this should only ever be used for animations that are known to be small ( e g stickers ) caching dozens of large bitmaps in memory for general g i fs or web p ' s will not fit in memory

public boolean get decode all frames ( ) { return m decode all frames ; }


returns true if this is the dynamic symbol table

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


returns the { @ link servlet context } to be injected or { @ code null } this method can be overridden by subclasses when a context is obtained after the post - processor has been registered

protected servlet context get servlet context ( ) { if ( this servlet context = = null & & get servlet config ( ) ! = null ) { return get servlet config ( ) get servlet context ( ) ; } return this servlet context ; }


public void set start ( float start ) { this start = start ; }


d f s input stream reports checksum failure for replicated blocks , we have the following logic : case i : client has tried multiple data nodes and at least one of the attempts has succeeded we report the other failures as corrupted block to namenode case ii : client has tried out all data nodes , but all failed we only report if the total number of replica is 1 we do not report otherwise since this maybe due to the client is a handicapped client ( who can not read ) for erasure - coded blocks , each block in corrupted block map is an internal block in a block group , and there is usually only one data node corresponding to each internal block for this case we simply report the corrupted blocks to name node and ignore the above logic

protected void report check sum failure ( corrupted blocks corrupted blocks , int data node count , boolean is striped ) { map < extended block , set < datanode info > > corrupted block map = corrupted blocks get corruption map ( ) ; if ( corrupted block map = = null ) { return ; } list < located block > report list = new array list < > ( corrupted block map size ( ) ) ; for ( map entry < extended block , set < datanode info > > entry : corrupted block map entry set ( ) ) { extended block blk = entry get key ( ) ; set < datanode info > dn set = entry get value ( ) ; if ( is striped | | ( ( dn set size ( ) < data node count ) & & ( dn set size ( ) > 0 ) ) | | ( ( data node count = = 1 ) & & ( dn set size ( ) = = data node count ) ) ) { datanode info [ ] locs = new datanode info [ dn set size ( ) ] ; int i = 0 ; for ( datanode info dn : dn set ) { locs [ i + + ] = dn ; } report list add ( new located block ( blk , locs ) ) ; } } if ( report list size ( ) > 0 ) { dfs client report checksum failure ( src , report list to array ( new located block [ report list size ( ) ] ) ) ; } corrupted block map clear ( ) ; }


extract a map from the given { @ link map message }

protected map < string , object > extract map from message ( map message message ) throws j m s exception { map < string , object > map = new hash map < > ( ) ; enumeration < string > en = message get map names ( ) ; while ( en has more elements ( ) ) { string key = en next element ( ) ; map put ( key , message get object ( key ) ) ; } return map ; }


post fakeinline - additional properties : test inline additional properties

default response entity < void > test inline additional properties ( @ api param ( value = " request body " , required = true ) @ valid @ request body map < string , string > param ) { return get delegate ( ) test inline additional properties ( param ) ; }


a shard id to index snapshot shard status map

public map < integer , snapshot index shard status > get shards ( ) { return this index shards ; }


calculates the size of output for this task

private long calculate output size ( ) throws i o exception { if ( ! is map or reduce ( ) ) { return - 1 ; } if ( is map task ( ) & & conf get num reduce tasks ( ) > 0 ) { try { path map output = map output file get output file ( ) ; file system local f s = file system get local ( conf ) ; return local f s get file status ( map output ) get len ( ) ; } catch ( i o exception e ) { log warn ( " could not find output size " , e ) ; } } return - 1 ; }


template method that subclasses may override to construct the object returned by this factory the default implementation returns a properties with the content of all resources invoked lazily the first time { @ link # get object ( ) } is invoked in case of a shared singleton ; else , on each { @ link # get object ( ) } call

protected properties create properties ( ) { properties result = collection factory create string adapting properties ( ) ; process ( ( properties , map ) - > result put all ( properties ) ) ; return result ; }


unwraps a { @ link internal log id } to return a { @ code long }

public static long id ( internal with log id with log id ) { return with log id get log id ( ) get id ( ) ; }


public string get response body ( ) { return response body ; }


reads a constant package constant pool entry in this { @ link class reader } this method is intended for { @ link attribute } sub classes , and is normally not needed by class generators or adapters

public string read package ( final int offset , final char [ ] char buffer ) { return read stringish ( offset , char buffer ) ; }


create user this can only be done by the logged in user

public void create user test ( ) throws api exception { user user = null ; api create user ( user ) ; / / todo : test validations }


gets default encryption settings for the bucket or returns null if default encryption is disabled

private get bucket encryption result get default encryption ( ) throws i o exception { s 3 a file system fs = get file system ( ) ; amazon s 3 s 3 = fs get amazon s 3 client for testing ( " check default encryption " ) ; try { return invoker once ( " get bucket encryption ( ) " , fs get bucket ( ) , ( ) - > s 3 get bucket encryption ( fs get bucket ( ) ) ) ; } catch ( file not found exception e ) { return null ; } }


public map < string , object > get params ( ) { return params ; }


called when a function has been added looks at address for call reference

public boolean added ( program prog , address set view set , task monitor monitor , message log log ) throws cancelled exception { try { this program = prog ; this monitor = monitor ; this reason list = new array list < > ( ) ; last get next func address = null ; monitor set message ( " no return - finding non - returning functions " ) ; address set no return set = new address set ( ) ; boolean had other suspicious functions = detect no return ( program , no return set , set ) ; / / run again with the new known no return set if ( had other suspicious functions ) { detect no return ( program , no return set , set ) ; } / / mark all detected non - returning functions address iterator noreturns = no return set get addresses ( true ) ; for ( address address : noreturns ) { monitor check canceled ( ) ; set function non returning ( program , address ) ; monitor set message ( " no return - clearing fallthrough at : " + address ) ; set no fall thru ( program , address ) ; monitor set message ( " no return - fixup function bodies for : " + address ) ; fix calling function body ( program , address ) ; } / / repair the damage for all non - returning functions if ( repair damage enabled ) { address set clear inst set = new address set ( ) ; noreturns = no return set get addresses ( true ) ; for ( address address : noreturns ) { clear inst set add ( find potential damaged locations ( program , address ) ) ; } repair damaged locations ( monitor , clear inst set ) ; } } finally { this program = null ; this monitor = null ; this reason list = null ; } return true ; }


runs an instance of this command on the given executor , waits for it to start and returns a command state which can be used to control and assert on the status of that command

command state run in ( executor service executor , blaze command dispatcher dispatcher , boolean expect interruption ) throws interrupted exception , execution exception { settable future < command state > new handoff = settable future create ( ) ; if ( ! command state handoff compare and set ( null , new handoff ) ) { throw new assertion error ( " another command is already starting at this time ? ! " ) ; } @ suppress warnings ( " unused " ) / / static analysis wants us to check future return values future < ? > ignored command result = executor submit ( new run command through dispatcher ( dispatcher , new handoff , expect interruption ) ) ; return new handoff get ( ) ; }


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 list of index settings and index settings groups that shouldn ' t be restored from snapshot

public restore snapshot request ignore index settings ( string ignore index settings ) { this ignore index settings = ignore index settings ; return this ; }


removes the highlight for the given token

public void remove ( clang token t ) { highlights by token remove ( get key ( t ) ) ; }


returns the java home directory corresponding to the current " java home " system property ( if it supported )

public file find supported java home from current java home ( java config java config , java filter java filter ) { set < file > potential java home set = new hash set < > ( ) ; string java home property = system get property ( " java home " ) ; if ( java home property ! = null & & ! java home property is empty ( ) ) { file dir = new file ( java home property ) ; if ( java filter equals ( java filter any ) | | java filter equals ( java filter jdk only ) ) { potential java home set add ( get jdk home from java home ( dir ) ) ; } if ( java filter equals ( java filter any ) | | java filter equals ( java filter jre only ) ) { potential java home set add ( get jre home from java home ( dir ) ) ; } for ( file potential java home dir : potential java home set ) { try { if ( java config is java version supported ( java config get java version ( potential java home dir , java filter ) ) ) { return potential java home dir ; } } catch ( parse exception | i o exception e ) { / / skip it } } } return null ; }


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


returns all values of the download mission as content values

private content values get values of mission ( @ non null mission download mission ) { content values values = new content values ( ) ; values put ( key source , download mission source ) ; values put ( key path , download mission storage get uri ( ) to string ( ) ) ; values put ( key done , download mission length ) ; values put ( key timestamp , download mission timestamp ) ; values put ( key kind , string value of ( download mission kind ) ) ; return values ; }


returns a new object with rotated image data by 45 degrees counterclockwise only callable if { @ link # is rotate supported ( ) } is true

public luminance source rotate counter clockwise 4 5 ( ) { throw new unsupported operation exception ( " this luminance source does not support rotation by 45 degrees " ) ; }


gets the number of memory segments used by this partition , which includes build side memory buffers and overflow memory segments

public int get num occupied memory segments ( ) { / / either the number of memory segments , or one for spilling final int num partition buffers = this partition buffers ! = null ? this partition buffers length : this build side write buffer get num occupied memory segments ( ) ; return num partition buffers + num overflow segments ; }


finds pets by status multiple status values can be provided with comma separated strings

public void find pets by status test ( ) throws api exception { list < string > status = null ; list < pet > response = api find pets by status ( status ) ; / / todo : test validations }


returns the set of edges that each directly connect { @ code node u } to { @ code node v } in an undirected network , this is equal to { @ code edges connecting ( node v , node u ) } the resulting set of edges will be parallel ( i e have equal { @ link # incident nodes ( object ) } if this network does not { @ link # allows parallel edges ( ) allow parallel edges } , the resulting set will contain at most one edge ( equivalent to { @ code edge connecting ( node u , node v ) as set ( ) } )

set < e > edges connecting ( n node u , n node v ) ;


the series of types defined by the package < code > repeated aapt pb type type = 3 ; < code >

public java util list < com android aapt resources type > get type list ( ) { return java util collections unmodifiable list ( instance get type list ( ) ) ; }


verify basic functionality of an agent in { @ code - web socket } mode requires { @ code remoting } to have been { @ code mvn install } ed does not show { @ code fine } or lower agent logs ( { @ link jenkins rule # show agent logs ( slave , logger rule ) } cannot be used here ) unlike { @ link hudson slaves j n l p launcher test } this does not use { @ code javaws } ; closer to { @ link hudson bugs jnlp access with secured hudson test }

public void smokes ( ) throws exception { atomic reference < proc > proc = new atomic reference < > ( ) ; try { j n l p launcher launcher = new j n l p launcher ( true ) ; launcher set web socket ( true ) ; dumb slave s = new dumb slave ( " remote " , tmp new folder ( " agent " ) get absolute path ( ) , launcher ) ; r jenkins add node ( s ) ; string secret = ( ( slave computer ) s to computer ( ) ) get jnlp mac ( ) ; file slave jar = tmp new file ( ) ; file utils copy u r l to file ( new slave jnlp jar ( " slave jar " ) get u r l ( ) , slave jar ) ; proc set ( r create local launcher ( ) launch ( ) cmds ( java env utils get jre executable ( " java " ) , " - jar " , slave jar get absolute path ( ) , " - jnlp url " , r get u r l ( ) + " computer / remote / slave - agent jnlp " , " - secret " , secret ) stdout ( system out ) start ( ) ) ; r wait online ( s ) ; assert equals ( " response " , s get channel ( ) call ( new dummy task ( ) ) ) ; assert not null ( s get channel ( ) call ( new fat task ( ) ) ) ; free style project p = r create free style project ( ) ; p set assigned node ( s ) ; p get builders list ( ) add ( functions is windows ( ) ? new batch file ( " echo hello " ) : new shell ( " echo hello " ) ) ; r build and assert success ( p ) ; s to computer ( ) get log text ( ) write log to ( 0 , system out ) ; } finally { if ( proc get ( ) ! = null ) { proc get ( ) kill ( ) ; while ( r jenkins get computer ( " remote " ) is online ( ) ) { logger info ( " waiting for computer to go offline " ) ; thread sleep ( 250 ) ; } } } }


try to match a sign - less numeric literal , or a program label

protected collection < assembly parse numeric token > match ( int s , string buffer , assembly grammar grammar , map < string , long > labels ) { if ( s > = buffer length ( ) ) { return collections empty set ( ) ; } / / try a literal number first if ( character is digit ( buffer char at ( s ) ) ) { return match literal ( s , buffer , s , false , grammar ) ; } / / now , try a label int b = s ; while ( b < buffer length ( ) ) { char c = buffer char at ( b ) ; if ( character is java identifier part ( c ) ) { b + + ; continue ; } break ; } string lab = buffer substring ( s , b ) ; long val = labels get ( lab ) ; if ( val = = null ) { return collections empty set ( ) ; } return collections singleton ( new assembly parse numeric token ( grammar , this , lab , val ) ) ; }


returns { @ code true } if { @ code obj } is another { @ code range set } that contains the same ranges according to { @ link range # equals ( object ) }

boolean equals ( @ nullable object obj ) ;


get the leader epoch , which is constant for each instance


adds { @ link align # bottom } and clears { @ link align # top } for the alignment of each column of widgets when { @ link # wrap ( ) wrapping } is enabled

public vertical group column bottom ( ) { column align | = align bottom ; column align & = ~ align top ; return this ; }


public long get failed elapsed ( ) { return failed elapsed get ( ) ; }


register a { @ link hystrix concurrency strategy } implementation as a global override of any injected or default implementations

public void register concurrency strategy ( hystrix concurrency strategy impl ) { if ( ! concurrency strategy compare and set ( null , impl ) ) { throw new illegal state exception ( " another strategy was already registered " ) ; } }


executes the driver with the provided arguments and compares the exception and exception method with the given class and regular expression

protected void expected output from exception ( string [ ] parameters , string expected , class < ? extends throwable > exception ) throws exception { expected exception expect ( exception ) ; expected exception expect message ( regex matcher matches regex ( expected ) ) ; get system output ( parameters ) ; }


strategy method used to obtain the { @ link conversion service } by default this method expects a bean named { @ code ' web socket conversion service ' } in the { @ link # get application context ( ) active application context }

protected conversion service get conversion service ( ) { application context application context = get application context ( ) ; assert state ( application context ! = null , " unable to locate the spring application context " ) ; try { return application context get bean ( conversion service bean name , conversion service class ) ; } catch ( beans exception ex ) { throw new illegal state exception ( " unable to find conversion service : please configure a ' " + conversion service bean name + " ' or override the get conversion service ( ) method " , ex ) ; } }


gets the offset of the field in this rtti 4 that has the signature

public static int get signature component offset ( ) { return signature offset ; }


{ @ inherit doc } all insns that are not move or phi insns have their source registers mapped ot the current mapping their result registers are then renamed to a new ssa register which is then added to the current register mapping

public void visit non move insn ( normal ssa insn insn ) { / * for each use of some variable x in s * / insn map source registers ( mapper ) ; process result reg ( insn ) ; }


find type info vftable by existing type info : : vftable symbol

private static address find type info vftable label ( program program ) { symbol table symbol table = program get symbol table ( ) ; namespace typeinfo namespace = symbol table get namespace ( type info namespace , program get global namespace ( ) ) ; symbol vftable symbol = symbol table get local variable symbol ( " vftable " , typeinfo namespace ) ; if ( vftable symbol ! = null ) { return vftable symbol get address ( ) ; } vftable symbol = symbol table get local variable symbol ( " ` vftable ' " , typeinfo namespace ) ; if ( vftable symbol ! = null ) { return vftable symbol get address ( ) ; } vftable symbol = symbol table get local variable symbol ( " type info " , typeinfo namespace ) ; if ( vftable symbol ! = null ) { return vftable symbol get address ( ) ; } return null ; }


returns a method handle to do an array store

static method handle lookup array store ( class < ? > receiver class ) { if ( receiver class is array ( ) ) { return method handles array element setter ( receiver class ) ; } else if ( map class is assignable from ( receiver class ) ) { / / maps allow access like mymap [ key ] return map put ; } else if ( list class is assignable from ( receiver class ) ) { return list set ; } throw new illegal argument exception ( " attempting to address a non - array type " + " [ " + receiver class get canonical name ( ) + " ] as an array " ) ; }


this method performs an asynchronous ldap search operation that only expects at most one result if more than one result is found then this is an error if no results are found , then { @ code null } will be returned if the ldap server returns an error { @ link result code } then this is handled as a { @ link action listener # on failure ( exception ) failure }

public static void search for entry ( l d a p connection pool ldap , string base d n , search scope scope , filter filter , int time limit seconds , boolean ignore referral errors , action listener < search result entry > listener , string attributes ) { boolean searching = false ; l d a p connection ldap connection = null ; try { ldap connection = privileged connect ( ldap : : get connection ) ; final l d a p connection final connection = ldap connection ; search for entry ( final connection , base d n , scope , filter , time limit seconds , ignore referral errors , action listener wrap ( entry - > { assert is ldap connection thread ( thread current thread ( ) ) : " expected current thread [ " + thread current thread ( ) + " ] to be an l d a p connection reader thread probably the new library has changed the thread ' s name " ; i o utils close ( ( ) - > ldap release connection ( final connection ) ) ; listener on response ( entry ) ; } , e - > { i o utils close while handling exception ( ( ) - > ldap release connection ( final connection ) ) ; listener on failure ( e ) ; } ) , attributes ) ; searching = true ; } catch ( l d a p exception e ) { listener on failure ( e ) ; } finally { if ( searching = = false ) { final l d a p connection final connection = ldap connection ; i o utils close while handling exception ( ( ) - > ldap release connection ( final connection ) ) ; } } }


public void test delete ( ) throws exception { string dir = " / test namenode retry cache / test delete " ; / / two retried calls to create a non existent file new call ( ) ; nn rpc mkdirs ( dir , perm , true ) ; new call ( ) ; assert assert true ( nn rpc delete ( dir , false ) ) ; assert assert true ( nn rpc delete ( dir , false ) ) ; assert assert true ( nn rpc delete ( dir , false ) ) ; / / non - retried call fails and gets false as return new call ( ) ; assert assert false ( nn rpc delete ( dir , false ) ) ; }


waits until there is a task , executes the task and all queued tasks ( if there ' re any ) the task is either a normal response or a timeout response

public void wait and drain ( ) throws interrupted exception {


test that a implementation of journal manager without a ( configuration , uri ) constructor throws an exception

public void test bad constructor ( ) throws exception { mini d f s cluster cluster = null ; configuration conf = new configuration ( ) ; conf set ( d f s config keys dfs namenode edits plugin prefix + " dummy " , bad constructor journal manager class get name ( ) ) ; conf set ( d f s config keys dfs namenode edits dir key , " dummy : / / test " ) ; try { cluster = new mini d f s cluster builder ( conf ) num data nodes ( 0 ) build ( ) ; cluster wait active ( ) ; fail ( " should have failed before this point " ) ; } catch ( illegal argument exception iae ) { if ( ! iae get message ( ) contains ( " unable to construct journal " ) ) { fail ( " should have failed with unable to construct exception " ) ; } } finally { if ( cluster ! = null ) { cluster shutdown ( ) ; } } }


remove keys from the store , updating the metastore on a partial delete represented as a multi object delete exception failure by deleting all those entries successfully deleted and then rethrowing the multi object delete exception

delete objects result remove keys ( list < delete objects request key version > keys to delete , boolean delete fake dir , list < path > undeleted objects on failure , bulk operation state operation state , boolean quiet ) throws multi object delete exception , amazon client exception , i o exception ;


determine if the exception handler is a standard c + + all catch ( )

public boolean is all catch ( ) { return is bit set ( all catch bit ) ; }


set per - file charsets to use for parsing properties files only applies to classic properties files , not to xml files

public void set file encodings ( properties file encodings ) { this file encodings = file encodings ; }


returns a { @ link map } mapping each unique element in the given { @ link collection } to an { @ link integer } representing the number of occurrences of that element in the { @ link collection } only those elements present in the collection will appear as keys in the map

public static map get cardinality map ( final collection coll ) { map count = new hash map ( coll size ( ) ) ; for ( iterator it = coll iterator ( ) ; it has next ( ) ; ) { object obj = it next ( ) ; integer c = ( integer ) ( count get ( obj ) ) ; if ( c = = null ) { count put ( obj , integer one ) ; } else { count put ( obj , c + 1 ) ; } } return count ; }


public boolean is ignored ( ) { return ignored ; }


map of string keys and values that can be used by source and sink to communicate arbitrary metadata about this resource < code > map & lt ; string , string & gt ; annotations = 5 ; < code >

public java util map < java lang string , java lang string > get annotations map ( ) { return internal get annotations ( ) get map ( ) ; }


sets the uniform with the given name the { @ link shader program } must be bound for this to work

public void set uniformf ( string name , float value 1 , float value 2 ) { gl20 gl = gdx gl 2 0 ; check managed ( ) ; int location = fetch uniform location ( name ) ; gl gl uniform 2f ( location , value 1 , value 2 ) ; }


test serialization of object with outer number type

public outer composite fake outer composite serialize ( outer composite outer composite ) throws api exception { return fake outer composite serialize with http info ( outer composite ) get data ( ) ; }


returns the last modified time in milliseconds for this file zero is returned if the file doesn ' t exist zero is returned for { @ link file type # classpath } files on android , zero is returned for { @ link file type # internal } files on the desktop , zero is returned for { @ link file type # internal } files on the classpath

public long last modified ( ) { return 0 ; }


notifies shared g l surface view about changed surface format

private void notify surface changed ( final int format , final int width , final int height , boolean force update ) { if ( ! force update & & format = = view format & & width = = view width & & height = = view height ) { / / skip if didn ' t changed if ( debug ) log d ( tag , " > surface is current , skipping surface changed event " ) ; } else { / / update engine desired surface format engine format = format ; engine width = width ; engine height = height ; / / update surface view if engine is linked with it already if ( linked engine = = this ) { view format = engine format ; view width = engine width ; view height = engine height ; view surface changed ( this get surface holder ( ) , view format , view width , view height ) ; } else { if ( debug ) log d ( tag , " > engine is not active , skipping surface changed event " ) ; } } }


returns { @ code true } if the table contains a mapping with the specified row and column keys

boolean contains ( @ nullable @ compatible with ( " r " ) object row key , @ nullable @ compatible with ( " c " ) object column key ) ;


returns whether analysis is currently enabled or disabled in the headless analyzer

public boolean is headless analysis enabled ( ) throws improper use exception { check headless status ( ) ; return headless get options ( ) analyze ; }


validate the named parameters passed to an execute method based on declared parameters subclasses should invoke this method before every { @ code execute query ( ) } or { @ code update ( ) } method

protected void validate named parameters ( @ nullable map < string , ? > parameters ) throws invalid data access api usage exception { check compiled ( ) ; map < string , ? > params to use = ( parameters ! = null ? parameters : collections < string , object > empty map ( ) ) ; int declared in parameters = 0 ; for ( sql parameter param : this declared parameters ) { if ( param is input value provided ( ) ) { if ( ! supports lob parameters ( ) & & ( param get sql type ( ) = = types blob | | param get sql type ( ) = = types clob ) ) { throw new invalid data access api usage exception ( " blob or clob parameters are not allowed for this kind of operation " ) ; } if ( param get name ( ) ! = null & & ! params to use contains key ( param get name ( ) ) ) { throw new invalid data access api usage exception ( " the parameter named ' " + param get name ( ) + " ' was not among the parameters supplied : " + params to use key set ( ) ) ; } declared in parameters + + ; } } validate parameter count ( params to use size ( ) , declared in parameters ) ; }


handle cas authentication policy failure event

public void handle cas authentication transaction failure event ( final cas authentication transaction failure event event ) { if ( this cas event repository ! = null ) { val dto = prepare cas event ( event ) ; dto set principal id ( event get credential ( ) get id ( ) ) ; dto put event id ( cas authentication policy failure event class get simple name ( ) ) ; this cas event repository save ( dto ) ; } }


test that a notification does not get delayed in the queue waiting for the next event to push it through

public void notification delay ( ) throws interrupted exception { executor service tp 1 = executors new fixed thread pool ( 1 ) ; executor service tp 2 = executors new fixed thread pool ( 1 ) ; try { int n = 10 ; for ( int i = 0 ; i < n ; i + + ) { final count down latch first on next = new count down latch ( 1 ) ; final count down latch on next count = new count down latch ( 2 ) ; final count down latch latch = new count down latch ( 1 ) ; final count down latch running = new count down latch ( 2 ) ; test observer ex < string > to = new test observer ex < > ( new default observer < string > ( ) { @ override public void on complete ( ) { } @ override public void on error ( throwable e ) { } @ override public void on next ( string t ) { first on next count down ( ) ; / / force it to take time when delivering so the second one is enqueued try { latch await ( ) ; } catch ( interrupted exception e ) { } } } ) ; observer < string > o = serialized observer ( to ) ; future < ? > f 1 = tp 1 submit ( new on next thread ( o , 1 , on next count , running ) ) ; future < ? > f 2 = tp 2 submit ( new on next thread ( o , 1 , on next count , running ) ) ; running await ( ) ; / / let one of the on next thread actually run before proceeding first on next await ( ) ; thread t 1 = to last thread ( ) ; system out println ( " first on next on thread : " + t 1 ) ; latch count down ( ) ; wait on threads ( f 1 , f 2 ) ; / / not completed yet assert equals ( 2 , to values ( ) size ( ) ) ; thread t 2 = to last thread ( ) ; system out println ( " second on next on thread : " + t 2 ) ; assert same ( t 1 , t 2 ) ; system out println ( to values ( ) ) ; o on complete ( ) ; system out println ( to values ( ) ) ; } } finally { tp 1 shutdown ( ) ; tp 2 shutdown ( ) ; } }


a { @ link cache loader } for a cache of stat calls input : ( path , following symlinks ) output : file status

private static cache loader < pair < path , symlinks > , object > new stat loader ( ) { return new cache loader < pair < path , symlinks > , object > ( ) { @ override public object load ( pair < path , symlinks > p ) { try { file status f = p first stat if found ( p second ) ; return ( f = = null ) ? no status : f ; } catch ( i o exception e ) { return e ; } } } ; }


public static local date time local date time of ( final long time ) { return local date time of instant ( instant of epoch milli ( time ) , zone offset utc ) ; }


set the span of transverse proportion of font

public span utils set font x proportion ( final float proportion ) { this x proportion = proportion ; return this ; }


default model and view build response model and view ( final j e e context context , final services manager services manager , final string client id , final string redirect url , final map < string , string > parameters ) { val registered service = o auth 2 0 utils get registered o auth service by client id ( services manager , client id ) ; val response type = o auth 2 0 utils get response mode type ( context ) ; if ( o auth 2 0 utils is response mode type form post ( registered service , response type ) ) { val model = new linked hash map < string , object > ( ) ; model put ( " original url " , redirect url ) ; model put ( " parameters " , parameters ) ; return new model and view ( cas webflow constants view id post response , model ) ; } return new model and view ( new redirect view ( redirect url ) , parameters ) ; }


returns a { @ link collector } that accumulates elements into an { @ code immutable sorted map } whose keys and values are the result of applying the provided mapping functions to the input elements if the mapped keys contain duplicates ( according to the comparator ) , the the values are merged using the specified merging function entries will appear in the encounter order of the first occurrence of the key

public static < t , k , v > collector < t , ? , immutable sorted map < k , v > > to immutable sorted map ( comparator < ? super k > comparator , function < ? super t , ? extends k > key function , function < ? super t , ? extends v > value function , binary operator < v > merge function ) { return collect collectors to immutable sorted map ( comparator , key function , value function , merge function ) ; }


public list < couch db google authenticator account > find by username ( final string username ) { try { return query view ( " by username " , username ) ; } catch ( final document not found exception e ) { logger trace ( e get message ( ) , e ) ; } return new array list < > ( 0 ) ; }


checks that , given the specified configuration parameters , the input rule has the expected attribute values and doesn ' t have the unexpected attribute values

private void check rule ( string rule label , string attribute name , collection < string > options , iterable < string > expected , iterable < string > not expected ) throws exception { use configuration ( options to array ( new string [ options size ( ) ] ) ) ; configured target binary = get configured target ( rule label ) ; assert that ( binary ) is not null ( ) ; set < string > actual deps = artifacts to strings ( get prerequisite artifacts ( binary , attribute name ) ) ; expected for each ( expected input - > assert that ( actual deps ) contains ( expected input ) ) ; not expected for each ( unexpected input - > assert that ( actual deps ) does not contain ( unexpected input ) ) ; }


public static principal resolver new person directory principal resolver ( final principal factory principal factory , final i person attribute dao attribute repository , final person directory principal resolver properties person directory ) { val context = principal resolution context builder ( ) attribute repository ( attribute repository ) principal factory ( principal factory ) return null if no attributes ( arrays stream ( person directory ) any match ( person directory principal resolver properties : : is return null ) ) principal attribute names ( arrays stream ( person directory ) filter ( p - > string utils is not blank ( p get principal attribute ( ) ) ) map ( person directory principal resolver properties : : get principal attribute ) find first ( ) or else ( string utils empty ) ) principal name transformer ( form user id - > form user id ) use current principal id ( arrays stream ( person directory ) any match ( person directory principal resolver properties : : is use existing principal id ) ) resolve attributes ( arrays stream ( person directory ) any match ( person directory principal resolver properties : : is attribute resolution enabled ) ) active attribute repository identifiers ( arrays stream ( person directory ) filter ( p - > string utils is not blank ( p get active attribute repository ids ( ) ) ) map ( p - > org springframework util string utils comma delimited list to set ( p get active attribute repository ids ( ) ) ) flat map ( set : : stream ) collect ( collectors to set ( ) ) ) build ( ) ; return new person directory principal resolver ( context ) ; }


find a matching pdb file using attributes associated with the program user can specify the type of file to search from ( pdb or pdb xml )

private static list < string > find p d b ( pdb program attributes pdb attributes , boolean include pe specified pdb path , file symbols repository dir ) throws pdb exception { / / store potential names of pdb files and potential locations of those files , / / so that all possible combinations can be searched / / linked hash set is used when we need to preserve order set < string > guid subdir paths = new hash set < > ( ) ; string guid age string = pdb attributes get guid age combo ( ) ; if ( guid age string = = null ) { throw new pdb exception ( " incomplete pdb information ( guid / signature and / or age ) associated with this program \ n " + " either the program is not a pe , or it was not compiled with debug information " ) ; } list < string > potential pdb names = pdb attributes get potential pdb filenames ( ) ; for ( string potential name : potential pdb names ) { guid subdir paths add ( file separator + potential name + file separator + guid age string ) ; } return check paths for pdb ( symbols repository dir , guid subdir paths , potential pdb names , pdb attributes , include pe specified pdb path ) ; }


retrieve the valueoperation stored within the specified space using an offset identified by a valueoperation

public varnode get ( int space i d , varnode offset value , int size ) { try { return get ( space i d , offset value , size , task monitor adapter dummy monitor ) ; } catch ( cancelled exception e ) { throw new assert exception ( e ) ; / / unexpected } }


handle the response - received event from azure sdk

public void event occurred ( response received event event arg ) { instrumentation web response ( ) ; if ( ! ( event arg get connection object ( ) instanceof http u r l connection ) ) { / / typically this shouldn ' t happen , but just let it pass return ; } http u r l connection connection = ( http u r l connection ) event arg get connection object ( ) ; request result current result = event arg get request result ( ) ; if ( current result = = null ) { / / again , typically shouldn ' t happen , but let it pass return ; } long request latency = current result get stop date ( ) get time ( ) - current result get start date ( ) get time ( ) ; if ( current result get status code ( ) = = http u r l connection http created & & connection get request method ( ) equals ignore case ( " put " ) ) { / / if it ' s a put with an http created status then it ' s a successful / / block upload long length = get request content length ( connection ) ; if ( length > 0 ) { block upload gauge updater block uploaded ( current result get start date ( ) , current result get stop date ( ) , length ) ; instrumentation raw bytes uploaded ( length ) ; instrumentation block uploaded ( request latency ) ; } } else if ( current result get status code ( ) = = http u r l connection http partial & & connection get request method ( ) equals ignore case ( " get " ) ) { / / if it ' s a get with an http partial status then it ' s a successful / / block download long length = get response content length ( connection ) ; if ( length > 0 ) { block upload gauge updater block downloaded ( current result get start date ( ) , current result get stop date ( ) , length ) ; instrumentation raw bytes downloaded ( length ) ; instrumentation block downloaded ( request latency ) ; } } }


void on rollback retrying ( global transaction tx , throwable original exception ) ;


public set < string > get photo urls ( ) { return photo urls ; }


the default implementation delegates to { @ link # encode u r l } , returning the given url string as - is can be overridden in subclasses , appending a session id or the like in a redirect - specific fashion for general url encoding rules , override the common { @ link # encode u r l } method instead , applying to redirect u r ls as well as to general u r ls

public string encode redirect u r l ( string url ) { return encode u r l ( url ) ; }


gets the compression method for this { @ code zip entry }

public int get method ( ) { return compression method ; }


deletes this item any exception indicates the deletion has failed , but { @ link abort exception } would prevent the caller from showing the stack trace this

public void delete ( ) throws i o exception , interrupted exception { check permission ( delete ) ; boolean responsible for aborting builds = ! item deletion contains ( this ) ; boolean owns registration = item deletion register ( this ) ; if ( ! owns registration & & item deletion is registered ( this ) ) { / / we are not the owning thread and somebody else is concurrently deleting this exact item throw new failure ( messages abstract item being deleted ( get pronoun ( ) ) ) ; } try { / / if a build is in progress cancel it if ( responsible for aborting builds | | owns registration ) { queue queue = queue get instance ( ) ; if ( this instanceof queue task ) { / / clear any items in the queue so they do not get picked up queue cancel ( ( queue task ) this ) ; } / / now cancel any child items - this happens after item deletion registration , so we can use a snapshot for ( queue item i : queue get items ( ) ) { item item = tasks get item of ( i task ) ; while ( item ! = null ) { if ( item = = this ) { queue cancel ( i ) ; break ; } if ( item get parent ( ) instanceof item ) { item = ( item ) item get parent ( ) ; } else { break ; } } } / / interrupt any builds in progress ( and this should be a recursive test so that folders do not pay / / the 15 second delay for every child item ) this happens after queue cancellation , so will be / / a complete set of builds in flight map < executor , queue executable > builds in progress = new linked hash map < > ( ) ; for ( computer c : jenkins get ( ) get computers ( ) ) { for ( executor e : c get all executors ( ) ) { final work unit work unit = e get current work unit ( ) ; final executable executable = work unit ! = null ? work unit get executable ( ) : null ; final sub task subtask = executable ! = null ? get parent of ( executable ) : null ; if ( subtask ! = null ) { item item = tasks get item of ( subtask ) ; while ( item ! = null ) { if ( item = = this ) { builds in progress put ( e , e get current executable ( ) ) ; e interrupt ( result aborted ) ; break ; } if ( item get parent ( ) instanceof item ) { item = ( item ) item get parent ( ) ; } else { break ; } } } } } if ( ! builds in progress is empty ( ) ) { / / give them 15 seconds or so to respond to the interrupt long expiration = system nano time ( ) + time unit seconds to nanos ( 15 ) ; / / comparison with executor get current executable ( ) = = computation currently should always be true / / as we no longer recycle executors , but safer to future - proof in case we ever revisit recycling while ( ! builds in progress is empty ( ) & & expiration - system nano time ( ) > 0l ) { / / we know that item deletion will prevent any new builds in the queue / / item deletion happens - before queue cancel so we know that the queue will stay clear / / queue cancel happens - before collecting the builds in progress list / / thus builds in progress contains the complete set we need to interrupt and wait for for ( iterator < map entry < executor , queue executable > > iterator = builds in progress entry set ( ) iterator ( ) ; iterator has next ( ) ; ) { map entry < executor , queue executable > entry = iterator next ( ) ; / / comparison with executor get current executable ( ) = = executable currently should always be / / true as we no longer recycle executors , but safer to future - proof in case we ever / / revisit recycling if ( ! entry get key ( ) is alive ( ) | | entry get value ( ) ! = entry get key ( ) get current executable ( ) ) { iterator remove ( ) ; } / / i don ' t know why , but we have to keep interrupting entry get key ( ) interrupt ( result aborted ) ; } thread sleep ( 50l ) ; } if ( ! builds in progress is empty ( ) ) { throw new failure ( messages abstract item failure to stop builds ( builds in progress size ( ) , get full display name ( ) ) ) ; } } } synchronized ( this ) { / / could just make perform delete synchronized but overriders might not honor that perform delete ( ) ; } / / jenkins - 19446 : leave synch block , but jenkins - 22001 : still notify synchronously } finally { if ( owns registration ) { item deletion deregister ( this ) ; } } get parent ( ) on deleted ( abstract item this ) ; jenkins get ( ) rebuild dependency graph async ( ) ; }


read the number of levels from the configuration this will affect the fair call queue ' s overall capacity

private static int parse num levels ( string ns , configuration conf ) { / / fair call queue levels ( ipc callqueue priority levels key ) / / takes priority over the scheduler level key / / ( ipc scheduler priority levels key ) int retval = conf get int ( ns + " " + fair call queue ipc callqueue priority levels key , 0 ) ; if ( retval = = 0 ) { / / no fcq priority level configured retval = conf get int ( ns + " " + common configuration keys ipc scheduler priority levels key , common configuration keys ipc scheduler priority levels default key ) ; } else { log warn ( ns + " " + fair call queue ipc callqueue priority levels key + " is deprecated please use " + ns + " " + common configuration keys ipc scheduler priority levels key + " " ) ; } if ( retval < 1 ) { throw new illegal argument exception ( " num levels must be at least 1 " ) ; } return retval ; }


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 static boolean is response mode type form post ( final o auth registered service registered service , final o auth 2 0 response mode types response type ) { return response type = = o auth 2 0 response mode types form post | | ( registered service ! = null & & string utils equals ignore case ( " post " , registered service get response type ( ) ) ) ; }


the { @ code to string ( ) } of { @ link component } implementations appear in health check endpoints since these are likely to be exposed in logs and other monitoring tools , care should be taken to ensure { @ code to string ( ) } output is a reasonable length and does not contain sensitive information

@ test void to string contains only summary information ( ) { try ( kafka collector collector = builder ( " muah " ) build ( ) ) { collector start ( ) ; assert that ( collector ) has to string ( string format ( " kafka collector { bootstrap servers = % s , topic = % s } " , kafka bootstrap server ( ) , " muah " ) ) ; } }


public void set rotation ( float angle ) { float c = ( float ) math cos ( angle ) , s = ( float ) math sin ( angle ) ; vals [ cos ] = c ; vals [ sin ] = s ; }


composes { @ code num checksums to read } additional c r cs into the current digest out of { @ code checksum in } , with each crc expected to correspond to exactly { @ code bytes per crc } underlying data bytes

public void update ( data input stream checksum in , long num checksums to read , long bytes per crc ) throws i o exception { for ( long i = 0 ; i < num checksums to read ; + + i ) { int crc b = checksum in read int ( ) ; update ( crc b , bytes per crc ) ; } }


helper method to determine if a file name is consistent with a block meta - data file

private static boolean is block meta file ( string block id , string meta file ) { return meta file starts with ( block id ) & & meta file ends with ( block metadata extension ) ; }


public < t > list < future < t > > invoke all ( collection < ? extends callable < t > > tasks ) throws interrupted exception { submitted mark ( tasks size ( ) ) ; collection < ? extends callable < t > > instrumented = instrument ( tasks ) ; return delegate invoke all ( instrumented ) ; }


public int get listen port ( ) { return server bootstrap get listen port ( ) ; }


returns the value of this { @ code unsigned integer } as a { @ code float } , analogous to a widening primitive conversion from { @ code int } to { @ code float } , and correctly rounded

public float float value ( ) { return long value ( ) ; }


true if this column contains any non - null values

public boolean contains non null ( ) { return get non null count ( ) > 0l ; }


public static string get internal app data path ( ) { if ( build version sdk int < build version codes n ) { return utils get app ( ) get application info ( ) data dir ; } return get absolute path ( utils get app ( ) get data dir ( ) ) ; }


a hook for checks of internal - only or external - only attributes of { @ code android binary }

default void validate android binary rule context ( rule context rule context ) throws rule error exception { }


{ @ link # add listener ( string , string , configuration listener ) }

default void add listener ( string key , configuration listener listener ) { add listener ( key , default group , listener ) ; }


get { @ link application id } of the application

public application id get application id ( ) { return this application id ; }


a sensible definition of { @ link # poll last } in terms of the { @ code descending iterator } method if you override { @ link # descending iterator } you may wish to override { @ link # poll last } to forward to this implementation

protected e standard poll last ( ) { return iterators poll next ( descending iterator ( ) ) ; }


returns the mean time covered by any playback state per playback , in milliseconds , or { @ link c # time unset } if no playback was recorded

public long get mean elapsed time ms ( ) { return playback count = = 0 ? c time unset : get total elapsed time ms ( ) / playback count ; }


the type of the rule it can be an abstract rule , a normal rule or a test rule if the rule type is abstract , the configured class must not be set

public abstract rule class type type ( ) ;


sets the quote character for enclosing field values ( ' " ' by default )

public csv quote character ( char quote character ) { internal properties put character ( format quote character , quote character ) ; return this ; }


public date get latest record time stamp ( ) { return latest record time stamp ; }


appends the string representation of each entry of { @ code map } , using the previously configured separator and key - value separator , to { @ code appendable }

public < a extends appendable > a append to ( a appendable , map < ? , ? > map ) throws i o exception { return append to ( appendable , map entry set ( ) ) ; }


set the target package for this instance setting either this property or the { @ link # set target class ( class ) target class } property is required if { @ link # set target class ( class ) target class } is set , this property is ignored

public void set target package ( string target package ) { this target package = target package ; }


returns the metrics cache to help prevent re - registrations

public static map < string , queue metrics > get queue metrics ( ) { return queue metrics ; }


returns the minimum number of bytes required to store a value for this register

public int get minimum byte size ( ) { return ( bit length + 7 ) / 8 ; }


public static list < string > read assets 2 list ( final string assets path , final string charset name ) { try { return utils bridge input stream 2 lines ( utils get app ( ) get resources ( ) get assets ( ) open ( assets path ) , charset name ) ; } catch ( i o exception e ) { e print stack trace ( ) ; return collections empty list ( ) ; } }


attempt to find a { @ link method } on the supplied class with the supplied name and no parameters searches all superclasses up to { @ code object } returns { @ code null } if no { @ link method } can be found

public static method find method ( class < ? > clazz , string name ) { return find method ( clazz , name , empty class array ) ; }


equivalent to < code > { @ link # reserve and write utf 8 ( byte buf , char sequence , int ) reserve and write utf 8 ( buf , seq sub sequence ( start , end ) , reserve bytes ) } < code > but avoids subsequence object allocation if possible

public static int reserve and write utf 8 ( byte buf buf , char sequence seq , int start , int end , int reserve bytes ) { return reserve and write utf 8 seq ( buf , check char sequence bounds ( seq , start , end ) , start , end , reserve bytes ) ; }


sets dummy hash values for the given program

private static void set program hashes ( program program ) { int id = program start transaction ( " sethashes " ) ; try { string md 5 = random string utils random numeric ( 32 ) ; program set executable m d 5 ( md 5 ) ; string sha 2 5 6 = random string utils random numeric ( 64 ) ; program set executable s h a 2 5 6 ( sha 2 5 6 ) ; } finally { program end transaction ( id , true ) ; } }


return the handshake http headers those are the request headers for a server session and the response headers for a client session

public http headers get headers ( ) { return this headers ; }


generates the config to be used in the priority lb policy for a single priority priority lb - > cluster impl lb - > ( lrs lb ) - > pick first

private static priority child config generate priority child config ( string cluster , @ nullable string eds service name , @ nullable string lrs server name , @ nullable long max concurrent requests , @ nullable upstream tls context tls context , policy selection endpoint picking policy , boolean ignore reresolution , load balancer registry lb registry , locality locality , list < drop overload > drop overloads ) { policy selection locality lb policy = generate locality lb config ( locality , cluster , eds service name , lrs server name , endpoint picking policy , lb registry ) ; cluster impl config cluster impl config = new cluster impl config ( cluster , eds service name , lrs server name , max concurrent requests , drop overloads , locality lb policy , tls context ) ; load balancer provider cluster impl lb provider = lb registry get provider ( xds lb policies cluster impl policy name ) ; policy selection cluster impl policy = new policy selection ( cluster impl lb provider , cluster impl config ) ; return new priority child config ( cluster impl policy , ignore reresolution ) ; }


process a relocation from the relocation table which corresponds to this context all relocation entries must be processed in the order they appear within the table

public final void process relocation ( elf relocation relocation , address relocation address ) { if ( handler = = null ) { handle no handler error ( relocation , relocation address ) ; return ; } long symbol index = relocation get symbol index ( ) ; if ( symbol index < 0 | | symbol index > = symbols length ) { elf relocation handler mark as unhandled ( program , relocation address , relocation get type ( ) , symbol index , " index " + long to string ( symbol index ) , get log ( ) ) ; return ; } elf symbol sym = symbols [ ( int ) symbol index ] ; if ( sym is t l s ( ) ) { handle unsupported t l s relocation ( relocation , relocation address ) ; return ; } try { handler relocate ( this , relocation , relocation address ) ; } catch ( memory access exception | not found exception e ) { load helper log ( e ) ; elf relocation handler mark as unhandled ( program , relocation address , relocation get type ( ) , symbol index , sym get name as string ( ) , get log ( ) ) ; } }


time when the task was deleted or completed


returns the minimum value contained in the set if not is nil ( )

public int get min element ( ) { if ( is nil ( ) ) { throw new runtime exception ( " set is empty " ) ; } return intervals get ( 0 ) a ; }


public void enum integer test ( ) { / / todo : test enum integer }


mapreduce - 6771 test if r m container allocator generates the events in the right order while processing finished containers

public void test handling finished containers ( ) { event handler event handler = mock ( event handler class ) ; app context context = mock ( running app context class ) ; when ( context get clock ( ) ) then return ( new controlled clock ( ) ) ; when ( context get cluster info ( ) ) then return ( new cluster info ( resource new instance ( 10240 , 1 ) ) ) ; when ( context get event handler ( ) ) then return ( event handler ) ; r m container allocator container allocator = new r m container allocator for finished container ( null , context , mock ( a m preemption policy class ) ) ; container status finished container = container status new instance ( mock ( container id class ) , container state complete , " " , 0 ) ; container allocator process finished container ( finished container ) ; in order in order = in order ( event handler ) ; in order verify ( event handler ) handle ( is a ( task attempt diagnostics update event class ) ) ; in order verify ( event handler ) handle ( is a ( task attempt event class ) ) ; in order verify no more interactions ( ) ; }


test creation of a leaf queue and its parent

public void test create leaf queue and parent ( ) { f s queue q 2 = queue manager create queue ( " root queue 1 queue 2 " , f s queue type leaf ) ; assert not null ( " parent queue root queue 1 was not created " , queue manager get parent queue ( " root queue 1 " , false ) ) ; assert not null ( " leaf queue root queue 1 queue 2 was not created " , queue manager get leaf queue ( " root queue 1 queue 2 " , false ) ) ; assert equals ( " create queue ( ) returned wrong queue " , " root queue 1 queue 2 " , q 2 get name ( ) ) ; }


to test enum parameters to test enum parameters

public void test enum parameters test ( ) { list < string > enum header string array = null ; string enum header string = null ; list < string > enum query string array = null ; string enum query string = null ; integer enum query integer = null ; double enum query double = null ; list < string > enum form string array = null ; string enum form string = null ; / / api test enum parameters ( enum header string array , enum header string , enum query string array , enum query string , enum query integer , enum query double , enum form string array , enum form string ) ; / / todo : test validations }


this is when the round up formatters are created in further merges ( with | | ) it will only append them to a list | | is not expected to be provided as format when a round up formatter is created it will be splitted before in < code > date formatter for pattern < code > java date formatter created with a custom format like < code > date formatter for pattern ( " yyyy " ) < code > will only have one parser it is however possible to have a java date formatter with multiple parsers for instance see a " date time " formatter in < code > date formatters < code > this means that we need to also have multiple round up parsers

private list < date time formatter > create round up parser ( string format , consumer < date time formatter builder > roundup parser consumer ) { if ( format contains ( " | | " ) = = false ) { list < date time formatter > round up parsers = new array list < > ( ) ; for ( date time formatter parser : this parsers ) { date time formatter builder builder = new date time formatter builder ( ) ; builder append ( parser ) ; roundup parser consumer accept ( builder ) ; round up parsers add ( builder to formatter ( locale ( ) ) ) ; } return round up parsers ; } return null ; }


scales the drawable ' s { @ link drawable # get left width ( ) } , { @ link drawable # get right width ( ) } , { @ link drawable # get bottom height ( ) } , { @ link drawable # get top height ( ) } , { @ link drawable # get min width ( ) } , and { @ link drawable # get min height ( ) }

public void scale ( drawable drawble ) { drawble set left width ( drawble get left width ( ) * scale ) ; drawble set right width ( drawble get right width ( ) * scale ) ; drawble set bottom height ( drawble get bottom height ( ) * scale ) ; drawble set top height ( drawble get top height ( ) * scale ) ; drawble set min width ( drawble get min width ( ) * scale ) ; drawble set min height ( drawble get min height ( ) * scale ) ; }


set the instance that matches the any of child schema , check the instance parameter is valid against the any of child schemas : apple , banana it could be an instance of the ' any of ' schemas the any of child schemas may themselves be a composed schema ( all of , any of , any of )

public void set actual instance ( object instance ) { if ( json is instance of ( apple class , instance , new hash set < class < ? > > ( ) ) ) { super set actual instance ( instance ) ; return ; } if ( json is instance of ( banana class , instance , new hash set < class < ? > > ( ) ) ) { super set actual instance ( instance ) ; return ; } throw new runtime exception ( " invalid instance type must be apple , banana " ) ; }


public mock response add header ( string name , string value ) { headers add ( name , value ) ; return 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 " ) ; }


convert a byte array into a hexadecimal string

public static string convert bytes to string ( byte [ ] bytes ) { return convert bytes to string ( bytes , null ) ; }


clears the caches for the given shard id if the shard is still allocated on this node

public void clear index shard cache ( shard id shard id , boolean query cache , boolean field data cache , boolean request cache , string fields ) { final index service service = index service ( shard id get index ( ) ) ; if ( service ! = null ) { index shard shard = service get shard or null ( shard id id ( ) ) ; final boolean cleared at least one = service clear caches ( query cache , field data cache , fields ) ; if ( ( request cache | | ( cleared at least one = = false & & fields length = = 0 ) ) & & shard ! = null ) { indices request cache clear ( new index shard cache entity ( shard ) ) ; } } }


public static void main ( string [ ] args ) { var ram = new student ( 1 , " ram " , " street 9 , cupertino " ) ; var shyam = new student ( 2 , " shyam " , " z bridge , pune " ) ; var gopi = new student ( 3 , " gopi " , " street 10 , mumbai " ) ; var context = new hash map < string , list < student > > ( ) ; var student database = new student database ( ) ; var student repository = new student repository ( context , student database ) ; student repository register new ( ram ) ; student repository register modified ( shyam ) ; student repository register deleted ( gopi ) ; student repository commit ( ) ; }


returns the appropriate { @ code mark - local } rop for the given type the result is a shared instance

public static rop op mark local ( type bearer type ) { switch ( type get basic frame type ( ) ) { case type bt int : return mark local int ; case type bt long : return mark local long ; case type bt float : return mark local float ; case type bt double : return mark local double ; case type bt object : return mark local object ; } return throw bad type ( type ) ; }


public void set ( int n , register spec spec ) { set 0 ( n , spec ) ; }


path to a file within the apk ( typically restype - configentry ext ) < code > optional string path = 1 ; < code >

public java lang string get path ( ) { return instance get path ( ) ; }


test that orientation parameter correctly parses

public void test orientation parsing ( ) throws i o exception { document mapper default mapper = create document mapper ( field mapping ( b - > { b field ( " type " , " geo shape " ) ; b field ( " orientation " , " left " ) ; } ) ) ; mapper field mapper = default mapper mappers ( ) get mapper ( " field " ) ; assert that ( field mapper , instance of ( geo shape with doc values field mapper class ) ) ; shape builder orientation orientation = ( ( geo shape with doc values field mapper ) field mapper ) field type ( ) orientation ( ) ; assert that ( orientation , equal to ( shape builder orientation clockwise ) ) ; assert that ( orientation , equal to ( shape builder orientation left ) ) ; assert that ( orientation , equal to ( shape builder orientation cw ) ) ; / / explicit right orientation test default mapper = create document mapper ( field mapping ( b - > { b field ( " type " , " geo shape " ) ; b field ( " orientation " , " right " ) ; } ) ) ; field mapper = default mapper mappers ( ) get mapper ( " field " ) ; assert that ( field mapper , instance of ( geo shape with doc values field mapper class ) ) ; orientation = ( ( geo shape with doc values field mapper ) field mapper ) field type ( ) orientation ( ) ; assert that ( orientation , equal to ( shape builder orientation counter clockwise ) ) ; assert that ( orientation , equal to ( shape builder orientation right ) ) ; assert that ( orientation , equal to ( shape builder orientation ccw ) ) ; }


performs the tasks necessary to reap the container

public boolean reap container ( container reap context ctx ) throws i o exception { container container = ctx get container ( ) ; string user = ctx get user ( ) ; string run as user = get run as user ( user ) ; container runtime context runtime context = new container runtime context builder ( container ) set execution attribute ( run as user , run as user ) set execution attribute ( user , user ) build ( ) ; try { linux container runtime reap container ( runtime context ) ; } catch ( container execution exception e ) { int ret code = e get exit code ( ) ; if ( ret code ! = 0 ) { return false ; } log warn ( " error in reaping container { } exit = { } " , container get container id ( ) , ret code , e ) ; log output ( e get output ( ) ) ; throw new i o exception ( " error in reaping container " + container get container id ( ) to string ( ) + " exit = " + ret code , e ) ; } finally { post complete ( container get container id ( ) ) ; } return true ; }


returns whether two { @ link android media media codec buffer info buffer infos } are equal

public static void assert buffer infos equal ( media codec buffer info expected , media codec buffer info actual ) { assert that ( actual flags ) is equal to ( expected flags ) ; assert that ( actual offset ) is equal to ( expected offset ) ; assert that ( actual presentation time us ) is equal to ( expected presentation time us ) ; assert that ( actual size ) is equal to ( expected size ) ; }


get all of the xattr namevalue pairs for a file or directory only those xattrs which the logged - in user has permissions to view are returned refer to the hdfs extended attributes user documentation for details

public map < string , byte [ ] > get x attrs ( path path ) throws i o exception { throw new unsupported operation exception ( get class ( ) get simple name ( ) + " doesn ' t support get x attrs " ) ; }


returns an alphabetized list of context registers

public list < string > get context registers ( ) { list < string > context register list = new array list < string > ( context registers size ( ) ) ; context register list add all ( context registers ) ; collections sort ( context register list ) ; return context register list ; }


private static void show ( @ not null final project project , @ not null final string title , @ not null final string content , @ not null final string display id , @ not null final notification type type , @ nullable final notification listener listener ) { final notification notification = create notification ( title , content , display id , type , listener ) ; notifications bus notify ( notification , project ) ; }


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


returns a { @ link workspace name value } for a workspace with the given name

public static workspace name value with name ( string workspace name ) { return new workspace name value ( preconditions check not null ( workspace name ) ) ; }


testing the removal of a dynamic parent queue without a child

public void test removal of childless parent queue ( ) { f s parent queue q 1 = queue manager get parent queue ( " root test child b " , false ) ; assert not null ( " queue root test child b was not created " , q 1 ) ; assert equals ( " create queue ( ) returned wrong queue " , " root test child b " , q 1 get name ( ) ) ; assert false ( " root test child b is a dynamic queue " , q 1 is dynamic ( ) ) ; / / static queues should not be deleted queue manager remove pending incompatible queues ( ) ; queue manager remove empty dynamic queues ( ) ; q 1 = queue manager get parent queue ( " root test child b " , false ) ; assert not null ( " queue root test child b was deleted " , q 1 ) ; / / next we remove root test child b from the allocation config allocation configuration alloc conf = scheduler get allocation configuration ( ) ; alloc conf configured queues get ( f s queue type parent ) remove ( " root test child b " ) ; queue manager update allocation configuration ( alloc conf ) ; queue manager set queues to dynamic ( collections singleton ( " root test child b " ) ) ; / / the next remove empty dynamic queues ( ) call should clean / / root test child b up queue manager remove pending incompatible queues ( ) ; queue manager remove empty dynamic queues ( ) ; q 1 = queue manager get parent queue ( " root leaf 1 " , false ) ; assert null ( " queue root leaf 1 was not deleted " , q 1 ) ; }


builds up the buffer with the provided data and resets the buffer - index after feed - completion this needs to run fast


removes the given transaction listener from this domain object

public void remove transaction listener ( transaction listener listener ) { transaction mgr remove transaction listener ( this , listener ) ; }


sets the default value to use for a rule ' s { @ link rule class # restricted environment attr } attribute when not explicitly specified by the rule

private void set default restricted to ( set < label > environments ) { default restricted to = environments ; }


public void test reference parser ( ) { tcc action impl tcc action = new tcc action impl ( ) ; boolean result = local t c c remoting parser is reference ( tcc action , " b " ) ; assertions assert true ( result ) ; }


whether an update to models is currently pending this can either be because { @ link # request model build ( ) } was called , or because models are currently being built or diff on a background thread

public boolean has pending model build ( ) { return requested model build type ! = requested model build type none / / model build is posted | | thread building models ! = null / / model build is in progress | | adapter is diff in progress ( ) ; / / diff in progress }


format an indeterminate progress bar : [ < = > ]

public static string format progress bar ( int width , int tick ) { int marker width = 3 ; / / must be odd > = 3 ( 1 for each < and > marker , the rest for " = " int range = width - marker width ; / / " lower " must fall within this range for the marker to fit within the bar int lower = tick % range ; if ( ( ( tick / range ) % 2 ) ! = 0 ) { / / are we going or coming back ? lower = range - lower ; } return repeat ( " " , lower ) + " < " + repeat ( " = " , marker width - 2 ) + " > " + repeat ( " " , width - ( lower + marker width ) ) ; }


sets the maximum progress that the animation will end at when playing or looping

public void set max progress ( @ float range ( from = 0f , to = 1f ) final float max progress ) { if ( composition = = null ) { lazy composition tasks add ( new lazy composition task ( ) { @ override public void run ( lottie composition composition ) { set max progress ( max progress ) ; } } ) ; return ; } set max frame ( ( int ) misc utils lerp ( composition get start frame ( ) , composition get end frame ( ) , max progress ) ) ; }


returns the byte value for the { @ link type } as defined in the proxy protocol 1 5 spec

public static byte byte value for type ( type type ) { switch ( type ) { case pp2 type alpn : return 0x 0 1 ; case pp2 type authority : return 0x 0 2 ; case pp2 type ssl : return 0x 2 0 ; case pp2 type ssl version : return 0x 2 1 ; case pp2 type ssl cn : return 0x 2 2 ; case pp2 type netns : return 0x 3 0 ; default : throw new illegal argument exception ( " unknown type : " + type ) ; } }


this implementation returns { @ code true } if a transaction manager has been specified ; { @ code false } otherwise

public boolean is delivery transacted ( method method ) throws no such method exception { return ( this transaction factory ! = null ) ; }


adds a default { @ link request listener } that will be added to every request started with this { @ link request manager } multiple { @ link request listener } s can be added here , in { @ link request manager } scopes or to individual { @ link request builder } s { @ link request listener } s are called in the order they ' re added even if an earlier { @ link request listener } returns { @ code true } from { @ link request listener # on load failed ( glide exception , object , target , boolean ) } or { @ link request listener # on resource ready ( object , object , target , data source , boolean ) } , it will not prevent subsequent { @ link request listener } s from being called because glide requests can be started for any number of individual resource types , any listener added here has to accept any generic resource type in { @ link request listener # on resource ready ( object , object , target , data source , boolean ) } if you must base the behavior of the listener on the resource type , you will need to use { @ code instanceof } to do so it ' s not safe to cast resource types without first checking with { @ code instanceof }

public request manager add default request listener ( request listener < object > request listener ) { default request listeners add ( request listener ) ; return this ; }


public model api response upload file ( @ path param ( " pet id " ) long pet id , @ multipart ( value = " additional metadata " , required = false ) string additional metadata , @ multipart ( value = " file " , required = false ) attachment file detail ) ;


public list < list < big decimal > > get array array number ( ) { return array array number ; }


obtains the temporary directory for { @ code aapt } to use

private file get aapt temp dir ( ) { return file utils mkdirs ( new file ( get incremental folder ( ) , " aapt - temp " ) ) ; }


the string representation of the token that is being invalidated this is the value returned from a create token request

public invalidate token request builder set token string ( string token ) { request set token string ( token ) ; return this ; }


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 it cannot find any mount link view f s expects a mount point from root

public void test create on root ( ) throws exception { test create on root ( false ) ; }


renames path src to path dst can take place on local fs or remote dfs adls support posix standard for rename operation

public boolean rename ( final path src , final path dst ) throws i o exception { statistics increment write ops ( 1 ) ; if ( to relative file path ( src ) equals ( " / " ) ) { return false ; } return adl client rename ( to relative file path ( src ) , to relative file path ( dst ) ) ; }


sort by host , then by priority 1 the url with a specific host ip should have higher priority than 0 0 0 0 2 if two url has the same host , compare by priority value ；

default int compare to ( configurator o ) { if ( o = = null ) { return - 1 ; } int ip compare = get url ( ) get host ( ) compare to ( o get url ( ) get host ( ) ) ; / / host is the same , sort by priority if ( ip compare = = 0 ) { int i = get url ( ) get parameter ( priority key , 0 ) ; int j = o get url ( ) get parameter ( priority key , 0 ) ; return integer compare ( i , j ) ; } else { return ip compare ; } }


returns true if the transform was corrected during the last update we should rename this method to ` was transformed without correction ` and just return the internal flag directly however , this requires interface change and negation of meaning

public boolean was transform corrected ( ) { return m was transform corrected ; }


returns the effective startup options since in this command line the command options include invocation policy ' s and rcs ' contents expanded fully , the list of startup options should prevent reapplication of these contents the options parser does not understand the effect of these flags , since the relationship between these startup options and the command options is not held within the options parser , so instead , we add a small hack remove any explicit mentions of these flags , and explicitly add the options that prevent blaze from looking for the default rc files

private command line section get canonical startup options ( ) { list < option > unfiltered options = get active startup options ( ) get option list ( ) get option list ( ) ; / / create the fake ones to prevent reapplication of the original rc file contents options parser fake options = options parser builder ( ) options classes ( blaze server startup options class ) build ( ) ; try { fake options parse ( " - - ignore all rc files " ) ; } catch ( options parsing exception e ) { / / unless someone changes the definition of these flags , this is impossible throw new illegal state exception ( e ) ; } / / remove any instances of the applied , and add the new blocking ones return command line section new builder ( ) set section label ( " startup options " ) set option list ( option list new builder ( ) add all option ( unfiltered options stream ( ) filter ( option - > { string option name = option get option name ( ) ; return ! option name equals ( " ignore all rc files " ) & & ! option name equals ( " blazerc " ) & & ! option name equals ( " master blazerc " ) & & ! option name equals ( " bazelrc " ) & & ! option name equals ( " master bazelrc " ) & & ! option name equals ( " invocation policy " ) ; } ) collect ( collectors to list ( ) ) ) add all option ( get option list from parsed option descriptions ( fake options as complete list of parsed options ( ) ) ) ) build ( ) ; }


converts an id into a key for use in a java map or similar this controls uniqueness of ids and how multiple different ids may map to the same id for example , all different capitalizations of " foo " may map to the same value " foo "

public string key for ( @ non null string id ) { return id ; }


attempt to remove all pre - save files those still open by an existing process should not be removed by the operating system

public static void cleanup old pre save files ( file dir , long before now ) { file [ ] old files = dir list files ( new buffer file filter ( null , presave file ext ) ) ; if ( old files = = null ) { return ; } for ( file old file : old files ) { if ( ( before now = = 0 | | old file last modified ( ) < before now ) & & old file delete ( ) ) { msg info ( local buffer file class , " removed old presave file : " + old file ) ; } } }


returns true if an object of this type descriptor can be assigned to the location described by the given type descriptor for example , { @ code value of ( string class ) is assignable to ( value of ( char sequence class ) ) } returns { @ code true } because a string value can be assigned to a char sequence variable on the other hand , { @ code value of ( number class ) is assignable to ( value of ( integer class ) ) } returns { @ code false } because , while all integers are numbers , not all numbers are integers for arrays , collections , and maps , element and keyvalue types are checked if declared for example , a list & lt ; string & gt ; field value is assignable to a collection & lt ; char sequence & gt ; field , but list & lt ; number & gt ; is not assignable to list & lt ; integer & gt ;

public boolean is assignable to ( type descriptor type descriptor ) { boolean types assignable = type descriptor get object type ( ) is assignable from ( get object type ( ) ) ; if ( ! types assignable ) { return false ; } if ( is array ( ) & & type descriptor is array ( ) ) { return is nested assignable ( get element type descriptor ( ) , type descriptor get element type descriptor ( ) ) ; } else if ( is collection ( ) & & type descriptor is collection ( ) ) { return is nested assignable ( get element type descriptor ( ) , type descriptor get element type descriptor ( ) ) ; } else if ( is map ( ) & & type descriptor is map ( ) ) { return is nested assignable ( get map key type descriptor ( ) , type descriptor get map key type descriptor ( ) ) & & is nested assignable ( get map value type descriptor ( ) , type descriptor get map value type descriptor ( ) ) ; } else { return true ; } }


fill an array with a repeated pattern of bytes the values in src pattern are copied into dest array , repeating from the beginning of src pattern as many times as necessary to fill dest array

private static void fill array ( byte [ ] src pattern , byte [ ] dest array ) { for ( int src index = 0 , dest index = 0 ; dest index < dest array length ; src index + + , dest index + + ) { if ( src index > = src pattern length ) { src index = 0 ; } dest array [ dest index ] = src pattern [ src index ] ; } }


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


update the icon map and the list model for the icon name

private void update map ( tool icon u r l url ) { if ( ! icon list model contains ( url ) ) { icon map put ( url get location ( ) , url ) ; load icons ( ) ; } }


removes all assigned values of this attribute

public void clear ( ) { values clear ( ) ; }


called once if the deferred computation ' throws ' an exception

void on error ( @ non null throwable e ) ;


public void class name test ( ) { / / todo : test class name }


establishes a swing update manager that is used to refresh the diff details

private void set up refresh details update manager ( ) { update manager = new swing update manager ( 100 , 4000 , ( ) - > do refresh details ( current location ) ) ; }


reads the next byte as an unsigned value

public int read unsigned byte ( ) { return ( data [ position + + ] & 0x f f ) ; }


validate that source parameters look sane

static void validate source params ( file source , file output ) throws mojo execution exception { string c output = null , c source = null ; try { c output = output get canonical path ( ) ; } catch ( i o exception e ) { throw new mojo execution exception ( " error getting canonical path " + " for output " , e ) ; } try { c source = source get canonical path ( ) ; } catch ( i o exception e ) { throw new mojo execution exception ( " error getting canonical path " + " for source " , e ) ; } / / this doesn ' t catch all the bad cases - - we could be following symlinks or / / hardlinks , etc however , this will usually catch a common mistake if ( c source starts with ( c output ) ) { throw new mojo execution exception ( " the source directory must not be " + " inside the output directory ( it would be destroyed by " + " ' mvn clean ' ) " ) ; } }


sorts the elements of { @ code array } between { @ code from index } inclusive and { @ code to index } exclusive in descending order , interpreting them as unsigned 64 - bit integers

public static void sort descending ( long [ ] array , int from index , int to index ) { check not null ( array ) ; check position indexes ( from index , to index , array length ) ; for ( int i = from index ; i < to index ; i + + ) { array [ i ] ^ = long max value ; } arrays sort ( array , from index , to index ) ; for ( int i = from index ; i < to index ; i + + ) { array [ i ] ^ = long max value ; } }


reduces the size of the backing arrays to the size of the actual number of entries this is useful to release memory when many items have been removed , or if it is known that more entries will not be added

public void shrink ( ) { if ( keys length = = size ) return ; resize ( size ) ; }


wrap an object , if necessary if the object is null , return the null object if it is an array or collection , wrap it in a j s o n array if it is a map , wrap it in a j s o n object if it is a standard property ( double , string , et al ) then it is already wrapped otherwise , if it comes from one of the java packages , turn it into a string and if it doesn ' t , try to wrap it in a j s o n object if the wrapping fails , then null is returned

static object wrap ( object object ) { try { if ( object = = null ) { return null ; } if ( object instanceof j s o n object | | object instanceof j s o n array | | object instanceof byte | | object instanceof character | | object instanceof short | | object instanceof integer | | object instanceof long | | object instanceof boolean | | object instanceof float | | object instanceof double | | object instanceof string | | null equals ( object ) ) { return object ; } if ( object instanceof collection ) { return new j s o n array ( ( collection ) object ) ; } if ( object get class ( ) is array ( ) ) { return new j s o n array ( object ) ; } if ( object instanceof map ) { return new j s o n object ( ( map ) object ) ; } package object package = object get class ( ) get package ( ) ; string object package name = ( object package ! = null ? object package get name ( ) : " " ) ; if ( object package name starts with ( " java " ) | | object package name starts with ( " javax " ) | | object get class ( ) get class loader ( ) = = null ) { return object to string ( ) ; } return new j s o n object ( object ) ; } catch ( exception exception ) { return null ; } }


executes the given task in a single thread pool at fix rate

public static < t > void execute by single at fix rate ( final task < t > task , final long period , final time unit unit , @ int range ( from = 1 , to = 10 ) final int priority ) { execute at fixed rate ( get pool by type and priority ( type single , priority ) , task , 0 , period , unit ) ; }


public void test non snapshot path i nodes ( ) throws exception { / / get the inodes by resolving the path of a normal file byte [ ] [ ] components = i node get path components ( file 1 to string ( ) ) ; i nodes in path nodes in path = i nodes in path resolve ( fsdir root dir , components , false ) ; / / the number of inodes should be equal to components length assert equals ( nodes in path length ( ) , components length ) ; / / the returned nodes in path should be non - snapshot assert snapshot ( nodes in path , false , null , - 1 ) ; / / verify components are correct for ( int i = 0 ; i < components length ; i + + ) { assert equals ( components [ i ] , nodes in path get path component ( i ) ) ; } / / the last i node should be associated with file 1 assert true ( " file 1 = " + file 1 + " , nodes in path = " + nodes in path , nodes in path get i node ( components length - 1 ) ! = null ) ; assert equals ( nodes in path get i node ( components length - 1 ) get full path name ( ) , file 1 to string ( ) ) ; assert equals ( nodes in path get i node ( components length - 2 ) get full path name ( ) , sub 1 to string ( ) ) ; assert equals ( nodes in path get i node ( components length - 3 ) get full path name ( ) , dir to string ( ) ) ; assert equals ( path separator , nodes in path get path ( 0 ) ) ; assert equals ( dir to string ( ) , nodes in path get path ( 1 ) ) ; assert equals ( sub 1 to string ( ) , nodes in path get path ( 2 ) ) ; assert equals ( file 1 to string ( ) , nodes in path get path ( 3 ) ) ; assert equals ( file 1 get parent ( ) to string ( ) , nodes in path get parent i nodes in path ( ) get path ( ) ) ; nodes in path = i nodes in path resolve ( fsdir root dir , components , false ) ; assert equals ( nodes in path length ( ) , components length ) ; assert snapshot ( nodes in path , false , null , - 1 ) ; assert equals ( nodes in path get last i node ( ) get full path name ( ) , file 1 to string ( ) ) ; }


write data to a file ; return the status from the filesystem

private s 3 a file status write file ( final path path , final byte [ ] dataset , final int length , final boolean overwrite ) throws i o exception { write dataset ( fs , path , dataset , length , 1024 , overwrite ) ; return ( s 3 a file status ) fs get file status ( path ) ; }


{ @ inherit doc } the default implementation returns the result of calling { @ link # visit children } on { @ code ctx }

@ override public t visit explain ( sql base parser explain context ctx ) { return visit children ( ctx ) ; }