updates the view with changed fields majority of the properties here are independent so they are has to be reset to null as soon as view is updated with the value the only exception from this rule is the group of the properties for the animation for now this is animation name and cache strategy these two properties are should be set simultaneously if the dirty flag is set

public void commit changes ( ) { lottie animation view view = view weak reference get ( ) ; if ( view = = null ) { return ; } if ( animation json ! = null ) { view set animation from json ( animation json , integer to string ( animation json hash code ( ) ) ) ; animation json = null ; } if ( animation name dirty ) { view set animation ( animation name ) ; animation name dirty = false ; } if ( progress ! = null ) { view set progress ( progress ) ; progress = null ; } if ( loop ! = null ) { view set repeat count ( loop ? lottie drawable infinite : 0 ) ; loop = null ; } if ( speed ! = null ) { view set speed ( speed ) ; speed = null ; } if ( scale type ! = null ) { view set scale type ( scale type ) ; scale type = null ; } if ( render mode ! = null ) { view set render mode ( render mode ) ; render mode = null ; } if ( image assets folder ! = null ) { view set image assets folder ( image assets folder ) ; image assets folder = null ; } if ( enable merge paths ! = null ) { view enable merge paths for kit kat and above ( enable merge paths ) ; enable merge paths = null ; } if ( color filters ! = null & & color filters size ( ) > 0 ) { for ( int i = 0 ; i < color filters size ( ) ; i + + ) { readable map current = color filters get map ( i ) ; string color = current get string ( " color " ) ; string path = current get string ( " keypath " ) ; simple color filter color filter = new simple color filter ( color parse color ( color ) ) ; string path with globstar = path + " * * " ; string [ ] keys = path with globstar split ( pattern quote ( " " ) ) ; key path key path = new key path ( keys ) ; lottie value callback < color filter > callback = new lottie value callback < > ( color filter ) ; view add value callback ( key path , lottie property color filter , callback ) ; } } }


public void place order test ( ) throws api exception { order body = null ; order response = api place order ( body ) ; / / todo : test validations }


static public boolean is equal ( float a , float b , float tolerance ) { return math abs ( a - b ) < = tolerance ; }


map < k , v > get all present ( @ non null iterable < ? > keys ) ;


returns all requests captured so far this method does clear the captured requests list if you do not want the captured requests list cleared , use { @ link # captured requests ( ) }

public captured request [ ] get captured requests and clear ( ) { list < captured request > requests = new array list < > ( captured requests size ( ) ) ; captured requests drain to ( requests ) ; return requests to array ( new captured request [ 0 ] ) ; }


add multiple attributes to this material if the material already contains an attribute of the same type it is overwritten

public final void set ( final attribute attribute 1 , final attribute attribute 2 , final attribute attribute 3 , final attribute attribute 4 ) { set ( attribute 1 ) ; set ( attribute 2 ) ; set ( attribute 3 ) ; set ( attribute 4 ) ; }


public static broker < blocking back channel > instance ( ) { return instance ; }


checks if there is a next address in the iteration


formats an { @ code int } as a 1 - byte signed hex value

public static string s 1 ( int v ) { char [ ] result = new char [ 3 ] ; if ( v < 0 ) { result [ 0 ] = ' - ' ; v = - v ; } else { result [ 0 ] = ' + ' ; } for ( int i = 0 ; i < 2 ; i + + ) { result [ 2 - i ] = character for digit ( v & 0x 0f , 16 ) ; v > > = 4 ; } return new string ( result ) ; }


get a self - renewing lease on the specified file

public self renewing lease acquire lease ( path path ) throws azure exception { string full key = path to key ( make absolute ( path ) ) ; return get store ( ) acquire lease ( full key ) ; }


prints out the internal state of the policy

private void print lirs ( ) { system out println ( " * * lirs stack top * * " ) ; for ( node n = head s next s ; n ! = head s ; n = n next s ) { check state ( n is in s ) ; if ( n status = = status hir non resident ) { system out println ( " < nr > " + n key ) ; } else if ( n status = = status hir resident ) { system out println ( " < rh > " + n key ) ; } else { system out println ( " < rl > " + n key ) ; } } system out println ( " * * lirs stack bottom * * " ) ; system out println ( " \ n * * lirs queue end * * " ) ; for ( node n = head q next q ; n ! = head q ; n = n next q ) { check state ( n is in q ) ; system out println ( n key ) ; } system out println ( " * * lirs queue front * * " ) ; system out println ( " \ n l i r s evicted page sequence : " ) ; for ( int i = 0 ; i < evicted size ( ) ; i + + ) { system out println ( " < " + i + " > " + evicted get ( i ) ) ; } }


adds several root symlinks neither keys nor values may be null

public builder add root symlinks ( map < path fragment , artifact > symlinks ) { for ( map entry < path fragment , artifact > symlink : symlinks entry set ( ) ) { root symlinks builder add ( new symlink entry ( symlink get key ( ) , symlink get value ( ) ) ) ; } return this ; }


returns an empty mutable map whose keys will respect this { @ link element order }

< k extends t , v > map < k , v > create map ( int expected size ) { switch ( type ) { case unordered : return maps new hash map with expected size ( expected size ) ; case insertion : case stable : return maps new linked hash map with expected size ( expected size ) ; case sorted : return maps new tree map ( comparator ( ) ) ; default : throw new assertion error ( ) ; } }


public auth filter builder < c , p , t > set authenticator ( authenticator < c , p > authenticator ) { this authenticator = authenticator ; return this ; }


submit the given { @ link job graph } to the cluster

completable future < job i d > submit job ( job graph job graph ) ;


this method throws an exception if the indicated data type is not a valid data type for a component of this composite data type

protected void validate data type ( data type data type ) { if ( is internally aligned ( ) & & data type = = data type default ) { throw new illegal argument exception ( " the default data type is not allowed in an aligned composite data type " ) ; } if ( data type instanceof factory data type ) { throw new illegal argument exception ( " the \ " " + data type get name ( ) + " \ " data type is not allowed in a composite data type " ) ; } else if ( data type instanceof dynamic ) { dynamic dynamic data type = ( dynamic ) data type ; if ( ! dynamic data type can specify length ( ) ) { throw new illegal argument exception ( " the \ " " + data type get name ( ) + " \ " data type is not allowed in a composite data type " ) ; } } }


public string get property class ( ) { return property class ; }


the implementation of the compare method from comparator note that comparator compare takes objects as inputs and so the int values are wrapped in ( reusable ) int writables from the class util merge sort

public int compare ( int writable i , int writable j ) { / / indicate we ' re making progress but do a batch update if ( progress calls < progress update frequency ) { progress calls + + ; } else { progress calls = 0 ; reporter progress ( ) ; } return comparator compare ( key val buffer get data ( ) , start offsets [ i get ( ) ] , key lengths [ i get ( ) ] , key val buffer get data ( ) , start offsets [ j get ( ) ] , key lengths [ j get ( ) ] ) ; }


register a bean from the given bean class , deriving its metadata from class - declared annotations

private < t > void do register bean ( class < t > bean class , @ nullable string name , @ nullable class < ? extends annotation > [ ] qualifiers , @ nullable supplier < t > supplier , @ nullable bean definition customizer [ ] customizers ) { annotated generic bean definition abd = new annotated generic bean definition ( bean class ) ; if ( this condition evaluator should skip ( abd get metadata ( ) ) ) { return ; } abd set instance supplier ( supplier ) ; scope metadata scope metadata = this scope metadata resolver resolve scope metadata ( abd ) ; abd set scope ( scope metadata get scope name ( ) ) ; string bean name = ( name ! = null ? name : this bean name generator generate bean name ( abd , this registry ) ) ; annotation config utils process common definition annotations ( abd ) ; if ( qualifiers ! = null ) { for ( class < ? extends annotation > qualifier : qualifiers ) { if ( primary class = = qualifier ) { abd set primary ( true ) ; } else if ( lazy class = = qualifier ) { abd set lazy init ( true ) ; } else { abd add qualifier ( new autowire candidate qualifier ( qualifier ) ) ; } } } if ( customizers ! = null ) { for ( bean definition customizer customizer : customizers ) { customizer customize ( abd ) ; } } bean definition holder definition holder = new bean definition holder ( abd , bean name ) ; definition holder = annotation config utils apply scoped proxy mode ( scope metadata , definition holder , this registry ) ; bean definition reader utils register bean definition ( definition holder , this registry ) ; }


invoke snapshot delete listeners for { @ link # delete entry }

protected abstract void handle listeners ( @ nullable list < action listener < void > > delete listeners ) ;


mangle given local java keystore file uri to allow use as a local java key store provider

public static uri nest u r i for local java key store provider ( final uri local file ) throws u r i syntax exception { if ( ! ( " file " equals ( local file get scheme ( ) ) ) ) { throw new illegal argument exception ( " passed uri had a scheme other than " + " file " ) ; } if ( local file get authority ( ) ! = null ) { throw new illegal argument exception ( " passed uri must not have an " + " authority component for non - local keystores , please use " + java key store provider class get name ( ) ) ; } return new uri ( local java key store provider scheme name , " / / file " + local file get scheme specific part ( ) , local file get fragment ( ) ) ; }


request session credentials for the default time ( 9 0 0s )

public static marshalled credentials request session credentials ( final configuration conf , final string bucket ) throws i o exception { return request session credentials ( conf , bucket , test session token duration seconds ) ; }


public list < integer > get namespace array ( ) { return namespace array ; }


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


returns a string listing the possible flag completion for this command along with the command completion if any see { @ link options usage # get completion ( option definition , string builder ) } for more details on the format for the flag completion

public string get options completion ( ) { string builder desc = new string builder ( ) ; visit options ( option definition - > option definition get documentation category ( ) ! = option documentation category undocumented , option definition - > options usage get completion ( option definition , desc ) ) ; return desc to string ( ) ; }


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 " ) ; }


replace all current parameters with the given list of parameters the { @ link variable utilities # check variable conflict ( function , variable , variable storage , boolean ) } method may be used to check and remove conflicting variables which already exist in the function

public void replace parameters ( function update type update type , boolean force , source type source , variable params ) throws duplicate name exception , invalid input exception ;


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


builds out this rule with default attributes blaze expects of all rules ( { @ link mock rule defaults # default attributes } ) plus the custom attributes defined by this implementation ' s { @ link state } do not override this method for extra custom behavior , use { @ link # define ( string , mock rule custom behavior ) }

default rule class build ( rule class builder builder , rule definition environment environment ) { state state = define ( ) ; if ( state default ancestors equals ( state ancestors ) ) { mock rule defaults default attributes stream ( ) for each ( builder : : add ) ; } state custom behavior customize ( builder , environment ) ; return builder build ( ) ; }


moves all the actions associated with the old placeholder into the new placeholder

private void move actions ( component placeholder old placeholder , component placeholder new placeholder ) { if ( new placeholder = = old placeholder ) { return ; } iterator < docking action if > it = old placeholder get actions ( ) ; while ( it has next ( ) ) { docking action if action = it next ( ) ; new placeholder add action ( action ) ; } }


rotates the subtree so that its root ' s right child is the new root

private void rotate left ( node < k , v > root ) { node < k , v > left = root left ; node < k , v > pivot = root right ; node < k , v > pivot left = pivot left ; node < k , v > pivot right = pivot right ; / / move the pivot ' s left child to the root ' s right root right = pivot left ; if ( pivot left ! = null ) { pivot left parent = root ; } replace in parent ( root , pivot ) ; / / move the root to the pivot ' s left pivot left = root ; root parent = pivot ; / / fix heights root height = math max ( left ! = null ? left height : 0 , pivot left ! = null ? pivot left height : 0 ) + 1 ; pivot height = math max ( root height , pivot right ! = null ? pivot right height : 0 ) + 1 ; }


returns the expire after access in nanoseconds

public optional long get expire after access ( ) { return ( expire after access nanos = = null ) ? optional long empty ( ) : optional long of ( expire after access nanos ) ; }


returns the prefix for a label to be created based on the address table element that points to it the prefix consists of " addr table " followed by the address that is indicated as an offset from the beginning of the table followed by " element " the element number can then be appended to this to create the label

public string get element prefix ( int offset len ) { return name prefix + top address add wrap ( offset len * addr size ) to string ( ) + " element " ; }


adds { @ code element } to the { @ code immutable sorted set } if the { @ code immutable sorted set } already contains { @ code element } , then { @ code add } has no effect ( only the previously added element is retained )

public builder < e > add ( e element ) { super add ( element ) ; return this ; }


invoked when the user - defined execution method in { @ link hystrix invokable } emits a value

public < t > t on execution emit ( hystrix invokable < t > command instance , t value ) { return value ; / / by default , just pass through }


set the deadline or the latest time by when the resource ( s ) must be allocated time expressed as utc

public abstract void set deadline ( long latest end time ) ;


return whether asynchronous request processing has been completed


public void print help ( ) { string header = " creates a plan that describes how much data should be " + " moved between disks \ n \ n " ; string footer = " \ n plan command creates a set of steps that represent a " + " planned data move a plan file can be executed on a data node , which " + " will balance the data " ; help formatter help formatter = new help formatter ( ) ; help formatter print help ( " hdfs diskbalancer - plan < hostname > [ options ] " , header , disk balancer c l i get plan options ( ) , footer ) ; }


public void add ( texture texture , float x , float y , int src x , int src y , int src width , int src height ) { float inv tex width = 1 0f / texture get width ( ) ; float inv tex height = 1 0f / texture get height ( ) ; final float u = src x * inv tex width ; final float v = ( src y + src height ) * inv tex height ; final float u 2 = ( src x + src width ) * inv tex width ; final float v 2 = src y * inv tex height ; final float fx 2 = x + src width ; final float fy 2 = y + src height ; temp vertices [ 0 ] = x ; temp vertices [ 1 ] = y ; temp vertices [ 2 ] = color packed ; temp vertices [ 3 ] = u ; temp vertices [ 4 ] = v ; temp vertices [ 5 ] = x ; temp vertices [ 6 ] = fy 2 ; temp vertices [ 7 ] = color packed ; temp vertices [ 8 ] = u ; temp vertices [ 9 ] = v 2 ; temp vertices [ 10 ] = fx 2 ; temp vertices [ 11 ] = fy 2 ; temp vertices [ 12 ] = color packed ; temp vertices [ 13 ] = u 2 ; temp vertices [ 14 ] = v 2 ; if ( mesh get num indices ( ) > 0 ) { temp vertices [ 15 ] = fx 2 ; temp vertices [ 16 ] = y ; temp vertices [ 17 ] = color packed ; temp vertices [ 18 ] = u 2 ; temp vertices [ 19 ] = v ; add ( texture , temp vertices , 0 , 20 ) ; } else { temp vertices [ 15 ] = fx 2 ; temp vertices [ 16 ] = fy 2 ; temp vertices [ 17 ] = color packed ; temp vertices [ 18 ] = u 2 ; temp vertices [ 19 ] = v 2 ; temp vertices [ 20 ] = fx 2 ; temp vertices [ 21 ] = y ; temp vertices [ 22 ] = color packed ; temp vertices [ 23 ] = u 2 ; temp vertices [ 24 ] = v ; temp vertices [ 25 ] = x ; temp vertices [ 26 ] = y ; temp vertices [ 27 ] = color packed ; temp vertices [ 28 ] = u ; temp vertices [ 29 ] = v ; add ( texture , temp vertices , 0 , 30 ) ; } }


delete the given directory using { @ link file util # fully delete ( file ) }

public boolean fully delete ( @ nullable fs volume spi volume , file dir ) { final long begin = profiling event hook before metadata op ( volume , delete ) ; try { fault injector event hook before metadata op ( volume , delete ) ; boolean deleted = file util fully delete ( dir ) ; profiling event hook after metadata op ( volume , delete , begin ) ; return deleted ; } catch ( exception e ) { on failure ( volume , begin ) ; throw e ; } }


public string get attribute string ( ) { return attribute string ; }


return in general how things flow out of this node this method exists for the simpleblock model since it doesn ' t make a great deal of sense to ask for this method in the case of subroutines , we return flow type unknown as long as the block exists if this block has no valid instructions , it can ' t flow , so flow type invalid is returned

public flow type get flow type ( code block block ) { / * if there are multiple unique ways out of the node , then we should return flow type unknown ( or flow type multiflow ? ) possible considerations for the future which are particularly applicable to model - p subroutines : add flow type multicall if only calls out and flow type multijump if multiple jumps out ( as opposed to jumping within the subroutine ) might want to consider flow type multiterminal for multiple returns ? * / if ( ! ( block get model ( ) instanceof overlap code sub model ) ) { throw new illegal argument exception ( ) ; } return ref type flow ; }


the response resources wrapped in the common mcp resource message these are typed resources that match the type url in the request resources message when ` incremental ` is true , this contains an array of resources to addupdate for the specified collection this modifies the existing collection at the sink when ` incremental ` is false , this contains the full set of resources for the specified collection this replaces any previously delivered resources < code > repeated istio mcp v 1alpha 1 resource resources = 3 ; < code >

public com alibaba nacos istio model mcp resource get resources ( int index ) { if ( resources builder = = null ) { return resources get ( index ) ; } else { return resources builder get message ( index ) ; } }


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 ) ; }


the unsigned high bytes and low bytes items of the constant long info structure together represent the value of the long constant ( ( long ) high bytes < < 32 ) + low bytes where the bytes of each of high bytes and low bytes are stored in big - endian ( high byte first ) order

public long get value ( ) { return ( ( ( long ) high bytes ) < < 32 ) + ( low bytes & 0xffffffff l ) ; }


indicate whether or not this { @ code model and view } has a view , either as a view name or as a direct { @ link view } instance

public boolean has view ( ) { return ( this view ! = null ) ; }


feeds and drains the audio processor up to the end of track one , returning the total output size in bytes

private int feed and drain audio processor to end of track one ( ) throws exception { / / feed and drain the processor , simulating a gapless transition to another track byte buffer input buffer = byte buffer allocate ( track one buffer size bytes ) ; int output size = 0 ; while ( ! trimming audio processor is ended ( ) ) { if ( input buffer has remaining ( ) ) { trimming audio processor queue input ( input buffer ) ; if ( ! input buffer has remaining ( ) ) { / / reconfigure for a next track then begin draining trimming audio processor set trim frame count ( track two trim start frame count , track two trim end frame count ) ; trimming audio processor configure ( audio format ) ; trimming audio processor queue end of stream ( ) ; } } byte buffer output buffer = trimming audio processor get output ( ) ; output size + = output buffer remaining ( ) ; output buffer clear ( ) ; } trimming audio processor reset ( ) ; return output size ; }


returns the most significant bits of the uuid ' s 128 value

public long get most significant bits ( ) { return this most significant bits ; }


returns the drawable for the expand icon the default implementation returns { @ link tree style # plus over } or { @ link tree style # minus over } on the desktop if the node is the { @ link # get over node ( ) over node } , the mouse is left of < code > icon x < code > , and clicking would expand the node

protected drawable get expand icon ( n node , float icon x ) { boolean over = false ; if ( node = = over node / / & & gdx app get type ( ) = = application type desktop / / & & ( ! selection get multiple ( ) | | ( ! u i utils ctrl ( ) & & ! u i utils shift ( ) ) ) / / ) { float mouse x = screen to local coordinates ( tmp set ( gdx input get x ( ) , 0 ) ) x ; if ( mouse x > = 0 & & mouse x < icon x ) over = true ; } if ( over ) { drawable icon = node expanded ? style minus over : style plus over ; if ( icon ! = null ) return icon ; } return node expanded ? style minus : style plus ; }


private void handle connections ( ) { for ( string node : this selector connected ( ) ) { / / we are now connected note that we might not still be able to send requests for instance , / / if ssl is enabled , the ssl handshake happens after the connection is established / / therefore , it is still necessary to check is channel ready before attempting to send on this / / connection if ( discover broker versions ) { this connection states checking api versions ( node ) ; nodes needing api versions fetch put ( node , new api versions request builder ( ) ) ; log debug ( " completed connection to node { } fetching api versions " , node ) ; } else { this connection states ready ( node ) ; log debug ( " completed connection to node { } ready " , node ) ; } } }


public int get patch ( ) { return patch ; }


it is easier to use a real cassandra connection than mock a prepared statement

@ test public void insert entry nice to string ( ) { / / this test can use fake data as it is never written to cassandra span client span = client span ; aggregate call < ? , ? > accept call = ( aggregate call < ? , ? > ) storage span consumer ( ) accept ( as list ( client span ) ) ; list < call < ? > > insert entry calls = accept call delegate ( ) stream ( ) filter ( c - > c instanceof insert entry ) collect ( collectors to list ( ) ) ; assert that ( insert entry calls get ( 0 ) ) has to string ( " insert into span by service ( service , span ) values ( frontend , get ) " ) ; assert that ( insert entry calls get ( 1 ) ) has to string ( " insert into remote service by service ( service , remote service ) values ( frontend , backend ) " ) ; }


list of writers that are associated with this output collector

public list < record writer < serialization delegate < t > > > get writers ( ) { return collections unmodifiable list ( arrays as list ( this writers ) ) ; }


specialization of { @ link arrays # hash code ( ) } that does not require constructing a 2 - element array

private static final int hash code ( object obj 1 , object obj 2 ) { int result = 31 + ( obj 1 = = null ? 0 : obj 1 hash code ( ) ) ; return 31 * result + ( obj 2 = = null ? 0 : obj 2 hash code ( ) ) ; }


the total number of lookups in the cache

public long get total count ( ) { return hit count + miss count ; }


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


public int get socket write timeout ( ) { return socket write timeout ; }


set the deserialization schema used to deserialize incoming pub sub messages

public < out > project name builder < out > with deserialization schema ( pub sub deserialization schema < out > deserialization schema ) { return new pub sub source builder < > ( deserialization schema ) ; }


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


override this to check invariants which should hold true for a particular implementation , but which are not generally applicable to every instance of map

protected void assert more invariants ( map < k , v > map ) { }


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 " ) ; }


check whether the given value is valid , i e whether it falls in { @ linkplain # range ( ) range }

public int check valid value ( int value ) { if ( this = = day of week & & value = = 0 ) { return value ; } else { try { return this field check valid int value ( value ) ; } catch ( date time exception ex ) { throw new illegal argument exception ( ex get message ( ) , ex ) ; } } }


adds attributes which are defined by an aspect ( and not by rule class )

public builder set aspect attributes ( map < string , attribute > aspect attributes ) { this aspect attributes = immutable map copy of ( aspect attributes ) ; return this ; }


tests that a put operation fails if the queue is full

public void test put on full ( ) throws exception { final stream element queue < integer > queue = create stream element queue ( 1 ) ; / / fill up queue result future < integer > result future = put successfully ( queue , new stream record < > ( 42 , 0l ) ) ; assert equals ( 1 , queue size ( ) ) ; / / cannot add more put unsuccessfully ( queue , new stream record < > ( 43 , 1l ) ) ; / / popping the completed element frees the queue again result future complete ( collections singleton ( 42 * 42 ) ) ; assert equals ( arrays as list ( new stream record < integer > ( 42 * 42 , 0l ) ) , pop completed ( queue ) ) ; / / now the put operation should complete put successfully ( queue , new stream record < > ( 43 , 1l ) ) ; }


public cancellable get script async ( get stored script request request , request options options , action listener < get stored script response > listener ) { return perform request async and parse entity ( request , request converters : : get script , options , get stored script response : : from x content , listener , empty set ( ) ) ; }


retrieve a resource for the given key that is bound to the current thread

public object get resource ( object key ) { object actual key = transaction synchronization utils unwrap resource if necessary ( key ) ; object value = do get resource ( actual key ) ; if ( value ! = null & & logger is trace enabled ( ) ) { logger trace ( " retrieved value [ " + value + " ] for key [ " + actual key + " ] bound to context [ " + this transaction context get name ( ) + " ] " ) ; } return value ; }


explicitly set the analyzer to use defaults to use explicit mapping config for the field , or , if not set , the default search analyzer

public match query builder analyzer ( string analyzer ) { this analyzer = analyzer ; return this ; }


public string execute ( file system fs ) throws i o exception { fs server defaults sds = null ; if ( fs instanceof distributed file system ) { distributed file system dfs = ( distributed file system ) fs ; sds = dfs get server defaults ( ) ; } else { throw new unsupported operation exception ( " get server defaults is " + " not supported for http fs on " + fs get class ( ) + " please check your fs default f s configuration " ) ; } return json util to json string ( sds ) ; }


public expiration policy to ticket expiration policy ( ) { return new saml attribute query ticket expiration policy ( cas properties get ticket ( ) get st ( ) get time to kill in seconds ( ) ) ; }


test the property ' enum string required '

public void enum string required test ( ) { / / todo : test enum string required }


add instruction bit pattern to the current pattern group

public void add instruction pattern ( int offset , pattern block maskvalue ) { current group add ( new instruction bit pattern ( offset , maskvalue ) ) ; }


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


delegates to data source utils for automatically participating in spring - managed transactions throws the original s q l exception , if any the returned connection handle implements the connection proxy interface , allowing to retrieve the underlying target connection

public connection get connection ( ) throws s q l exception { return get transaction aware connection proxy ( obtain target data source ( ) ) ; }


returns a byte buffer containing a complete raw frame , if it ' s available should only be called when is complete ( ) returns true , otherwise null is returned the returned object aliases the internal buffer , that is , it shares memory with the internal buffer no further operations are permitted on this object until the caller has processed the data it needs from the returned byte buffer

byte buffer get raw frame ( ) { if ( ! is complete ) { return null ; } byte buffer result = buffer duplicate ( ) ; reset ( ) ; return result ; } }


used when mocking non - static inner classes in conjunction with { @ link # is using constructor ( ) }


sets custom { @ link bitmap displayer displayer } for image loading task default value - { @ link default configuration factory # create bitmap displayer ( ) }

public builder displayer ( bitmap displayer displayer ) { if ( displayer = = null ) throw new illegal argument exception ( " displayer can ' t be null " ) ; this displayer = displayer ; return this ; }


set the number of seconds to wait after initialization before starting the scheduler asynchronously default is 0 , meaning immediate synchronous startup on initialization of this bean setting this to 10 or 20 seconds makes sense if no jobs should be run before the entire application has started up

public void set startup delay ( int startup delay ) { this startup delay = startup delay ; }


set the spring task executor to use for executing the listener once a message has been received by the provider default is none , that is , to run in the jms provider ' s own receive thread , blocking the provider ' s receive endpoint while executing the listener specify a task executor for executing the listener in a different thread , rather than blocking the jms provider , usually integrating with an existing thread pool this allows to keep the number of concurrent consumers low ( 1 ) while still processing messages concurrently ( decoupled from receiving ! ) < b > note : specifying a task executor for listener execution affects acknowledgement semantics < b > messages will then always get acknowledged before listener execution , with the underlying session immediately reused for receiving the next message using this in combination with a transacted session or with client acknowledgement will lead to unspecified results ! < b > note : concurrent listener execution via a task executor will lead to concurrent processing of messages that have been received by the same underlying session < b > as a consequence , it is not recommended to use this setting with a { @ link session aware message listener } , at least not if the latter performs actual work on the given session a standard { @ link javax jms message listener } will work fine , in general

public void set task executor ( executor task executor ) { this task executor = task executor ; }


the nonce provides a way to explicitly ack a specific mesh config response in a following mesh config request additional messages may have been sent by client to the management server for the previous version on the stream prior to this mesh config response , that were unprocessed at response send time the nonce allows the management server to ignore any further mesh config requests for the previous version until a mesh config request bearing the nonce < code > string nonce = 4 ; < code >

public builder set nonce ( java lang string value ) { if ( value = = null ) { throw new null pointer exception ( ) ; } nonce = value ; on changed ( ) ; return this ; }


public short get struct length ( ) { return struct length ; }


evaluates this argument fragment into an argument string and adds it into { @ code builder } the enclosed tree artifact will be expanded using { @ code artifact expander }

abstract void eval ( immutable list builder < string > builder , artifact expander artifact expander ) ;


returns the { @ link calling convention }

protected abstract calling convention get calling convention ( ) ;


flush the output only valid in the state { @ code writing } in the base class , this is a no - op

void flush ( ) throws i o exception { verify state ( writing ) ; }


{ @ inherit doc } use { @ code get an increment ( ) } on { @ link # open operations } so that on invocation 1 it returns 0 the caller will know that this is the first invocation

public long stream opened ( ) { return open operations get and increment ( ) ; }


public collection < ? extends item > items ( ) { return items ; }


add an attribute to the model using a { @ link org springframework core conventions # get variable name generated name }


public int get connect timeout ( ) { return connection timeout ; }


iterates over the readable bytes of this buffer with the specified { @ code processor } in ascending order

public int for each byte ( byte processor visitor ) throws exception { return for each byte 0 ( 0 , length ( ) , visitor ) ; }


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


public synchronized t from resource ( string resource ) throws i o exception , json parse exception , json mapping exception { try ( input stream res stream = this get class ( ) get resource as stream ( resource ) ) { if ( res stream = = null ) { throw new file not found exception ( resource ) ; } return mapper read value ( res stream , class type ) ; } catch ( i o exception e ) { log error ( " exception while parsing json resource { } " , resource , e ) ; throw e ; } }


visit a binding created from converting a bound instance to a new type the source binding has the same binding annotation but a different type this target is found only on injector bindings

v visit ( converted constant binding < ? extends t > binding ) ;


public void add contents ( dex file file ) { value encoder add contents ( file , array ) ; }


creates cluster state with the given indices , each index containing # ( number of primaries ) started primary shards and no replicas the cluster state contains # ( number of nodes ) nodes and assigns primaries to those nodes

public static cluster state state ( final int number of nodes , final string [ ] indices , final int number of primaries ) { discovery nodes builder disco builder = discovery nodes builder ( ) ; set < string > nodes = new hash set < > ( ) ; for ( int i = 0 ; i < number of nodes ; i + + ) { final discovery node node = new node ( i ) ; disco builder = disco builder add ( node ) ; nodes add ( node get id ( ) ) ; } disco builder local node id ( new node ( 0 ) get id ( ) ) ; disco builder master node id ( new node ( 0 ) get id ( ) ) ; metadata builder metadata = metadata builder ( ) ; routing table builder routing table = routing table builder ( ) ; list < string > nodes list = new array list < > ( nodes ) ; int current node to assign = 0 ; for ( string index : indices ) { index metadata index metadata = index metadata builder ( index ) settings ( settings builder ( ) put ( setting version created , version current ) put ( setting number of shards , number of primaries ) put ( setting number of replicas , 0 ) put ( setting creation date , system current time millis ( ) ) ) build ( ) ; index routing table builder index routing table = index routing table builder ( index metadata get index ( ) ) ; for ( int i = 0 ; i < number of primaries ; i + + ) { shard id shard id = new shard id ( index metadata get index ( ) , i ) ; index shard routing table builder index shard routing builder = new index shard routing table builder ( shard id ) ; index shard routing builder add shard ( test shard routing new shard routing ( shard id , nodes list get ( current node to assign + + ) , true , shard routing state started ) ) ; if ( current node to assign = = nodes list size ( ) ) { current node to assign = 0 ; } index routing table add index shard ( index shard routing builder build ( ) ) ; } metadata put ( index metadata , false ) ; routing table add ( index routing table ) ; } cluster state builder state = cluster state builder ( new cluster name ( " test " ) ) ; state nodes ( disco builder ) ; state metadata ( metadata generate cluster uuid if needed ( ) build ( ) ) ; state routing table ( routing table build ( ) ) ; return state build ( ) ; }


initialize the list of buckets get the bucket sizes ( and bucket lengths ) from the bucket sizes provider

private synchronized void init buckets ( ) { final sparse int array bucket sizes = m pool params bucket sizes ; / / create the buckets if ( bucket sizes ! = null ) { fill buckets ( bucket sizes ) ; m allow new buckets = false ; } else { m allow new buckets = true ; } }


a convenience method that will take a given sort state and remove from it any columns that cannot be sorted this is useful if the client is restoring a sort state that contains columns that have been removed or are no longer sortable ( such as during major table model rewrites )

protected table sort state cleanup table sort state ( table sort state state ) { int column count = get column count ( ) ; table sort state editor editor = new table sort state editor ( state ) ; int n = editor get sorted column count ( ) ; for ( int i = 0 ; i < n ; i + + ) { column sort state ss = editor get column sort state ( i ) ; int column index = ss get column model index ( ) ; if ( column index > = column count ) { editor remove sorted column ( column index ) ; } if ( ! is sortable ( column index ) ) { editor remove sorted column ( column index ) ; } } return editor create table sort state ( ) ; }


return a map of the schemas defined under componentsschemas in the oas document the returned map only includes the direct children of componentsschemas in the oas document ; the map does not include inlined schemas

public static map < string , schema > get schemas ( open a p i open a p i ) { if ( open a p i ! = null & & open a p i get components ( ) ! = null & & open a p i get components ( ) get schemas ( ) ! = null ) { return open a p i get components ( ) get schemas ( ) ; } return collections empty map ( ) ; }


indicates that the computer was marked as temporarily offline by the administrator this is the reverse operation of { @ link # on temporarily online ( computer ) }

public void on temporarily offline ( computer c , offline cause cause ) { }


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


string get source file name ( ) { if ( ms type instanceof user defined type source and line ms type ) { return ( ( user defined type source and line ms type ) ms type ) get source file name ( ) ; } return ( ( user defined type module source and line ms type ) ms type ) get source file name ( ) ; }


public synchronized void write ( int b ) throws i o exception { buf [ count + + ] = ( byte ) b ; if ( count = = buf length ) { flush buffer ( ) ; } }


writes a { @ code short } as specified by { @ link data output stream # write short ( int ) } , except using little - endian byte order

public void write short ( int v ) throws i o exception { out write ( 0x f f & v ) ; out write ( 0x f f & ( v > > 8 ) ) ; }


platform independent implementation for { @ link file # set readable ( boolean ) } file # set readable does not work as expected on windows

public static boolean set readable ( file f , boolean readable ) { if ( shell windows ) { try { string permission = readable ? " u + r " : " u - r " ; file util chmod ( f get canonical path ( ) , permission , false ) ; return true ; } catch ( i o exception ex ) { return false ; } } else { return f set readable ( readable ) ; } }


writes blob with resolving the blob name using { @ link # blob name } method the blob will optionally by compressed

public void write ( t obj , blob container blob container , string name , boolean compress , big arrays big arrays ) throws i o exception { final string blob name = blob name ( name ) ; serialize ( obj , blob name , compress , big arrays , bytes - > blob container write blob ( blob name , bytes , false ) ) ; }


convert this stream to a { @ link k table } if a key changing operator was used before this operation ( e g , { @ link # select key ( key value mapper ) } , { @ link # map ( key value mapper ) } , { @ link # flat map ( key value mapper ) } or { @ link # transform ( transformer supplier , string ) } ) an internal repartitioning topic will be created in kafka this topic will be named " $ { application id } - & lt ; name & gt ; - repartition " , where " application id " is user - specified in { @ link streams config } via parameter { @ link streams config # application id config application id config } , " & lt ; name & gt ; " is an internally generated name , and " - repartition " is a fixed suffix you can retrieve all generated internal topic names via { @ link topology # describe ( ) } for this case , all data of this stream will be redistributed through the repartitioning topic by writing all records to it , and rereading all records from it , such that the resulting { @ link k table } is partitioned correctly on its key note that you cannot enable { @ link streams config # topology optimization config } config for this case , because repartition topics are considered transient and don ' t allow to recover the result { @ link k table } in cause of a failure ; hence , a dedicated changelog topic is required to guarantee fault - tolerance note that this is a logical operation and only changes the " interpretation " of the stream , i e , each record of it was a " factevent " and is re - interpreted as update now ( cf { @ link k stream } vs { @ code k table } )

k table < k , v > to table ( final named named , final materialized < k , v , key value store < bytes , byte [ ] > > materialized ) ;


merge this bindings with an other { @ link bindings } object and create a new merged { @ link bindings } object

public static bindings merge ( bindings left , bindings right ) { assert not null ( left , " left side bindings must not be null " ) ; assert not null ( right , " right side bindings must not be null " ) ; list < binding > result = new array list < > ( left get bindings ( ) size ( ) + right get bindings ( ) size ( ) ) ; result add all ( left get bindings ( ) values ( ) ) ; result add all ( right get bindings ( ) values ( ) ) ; return new bindings ( result ) ; }


write the subscriptions items list as json to the output

public static void write to ( final list < subscription item > items , final output stream out , @ nullable final import export event listener event listener ) { final json appendable writer writer = json writer on ( out ) ; write to ( items , writer , event listener ) ; writer done ( ) ; }


public int get ordinal position ( ) { return attribute get ordinal position ( ) ; }


apply the strategy to figure out whether this authentication attempt can proceed

boolean apply ( request context request context , string user agent , geo location request location ) ;


exit a parse tree produced by the { @ code parenthesized expression } labeled alternative in { @ link eql base parser # primary expression }

void exit parenthesized expression ( eql base parser parenthesized expression context ctx ) ;


returns the offset from the beginning of the resource name list to resource name

public short get name offset ( ) { return name offset ; }


read operator { @ code list state } from a { @ code savepoint }

public < t > data set < t > read list state ( string uid , string name , type information < t > type info ) throws i o exception { operator state operator state = metadata get operator state ( uid ) ; list state descriptor < t > descriptor = new list state descriptor < > ( name , type info ) ; list state input format < t > input format = new list state input format < > ( operator state , descriptor ) ; return env create input ( input format , type info ) ; }


removes any path that is a descendant of a path in the selection

protected tree path [ ] adjust selection paths ( tree path [ ] paths ) { hash set < g tree node > set = new hash set < > ( ) ; for ( tree path tree path : paths ) { set add ( ( g tree node ) tree path get last path component ( ) ) ; } hash set < g tree node > remove set = new hash set < > ( ) ; for ( g tree node node : set ) { if ( any parents in set ( set , node ) ) { remove set add ( node ) ; } } set remove all ( remove set ) ; tree path [ ] new paths = new tree path [ set size ( ) ] ; int index = 0 ; for ( g tree node node : set ) { new paths [ index + + ] = node get tree path ( ) ; } return new paths ; }


guaranteed to throw an exception and leave the table unmodified

public final v remove ( object row key , object column key ) { throw new unsupported operation exception ( ) ; }


finds the child with the specified index and returns it as a long

public long get long ( int index ) { json value child = get ( index ) ; if ( child = = null ) throw new illegal argument exception ( " indexed value not found : " + name ) ; return child as long ( ) ; }


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


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


process the supplied , newly instantiated { @ link merged context configuration } instance the returned { @ link merged context configuration } instance may be a wrapper around or a replacement for the original the default implementation simply returns the supplied instance unmodified concrete subclasses may choose to return a specialized subclass of { @ link merged context configuration } based on properties in the supplied instance

protected merged context configuration process merged context configuration ( merged context configuration merged config ) { return merged config ; }


returns the number of elements of the handler list that begins with the given element

static int get exception table length ( final handler first handler ) { int length = 0 ; handler handler = first handler ; while ( handler ! = null ) { length + + ; handler = handler next handler ; } return length ; }


< code > optional aapt pb plural plural = 5 ; < code >

public com android aapt resources plural get plural ( ) { return instance get plural ( ) ; }


public optimizer node get target ( ) { return this target ; }


public void process ( history event event ) { if ( finalized ) { throw new illegal state exception ( " job builder process ( history event event ) called after parsed job built " ) ; } / / these are in lexicographical order by class name if ( event instanceof a m started event ) { / / ignore this event as rumen currently doesnt need this event / / todo enhance rumen to process this event and capture restarts return ; } else if ( event instanceof normalized resource event ) { / / log an warn message as normalized resource event shouldn ' t be written log warn ( " normalized resource event should be ignored in history server " ) ; } else if ( event instanceof job finished event ) { process job finished event ( ( job finished event ) event ) ; } else if ( event instanceof job info change event ) { process job info change event ( ( job info change event ) event ) ; } else if ( event instanceof job inited event ) { process job inited event ( ( job inited event ) event ) ; } else if ( event instanceof job priority change event ) { process job priority change event ( ( job priority change event ) event ) ; } else if ( event instanceof job queue change event ) { process job queue change event ( ( job queue change event ) event ) ; } else if ( event instanceof job status changed event ) { process job status changed event ( ( job status changed event ) event ) ; } else if ( event instanceof job submitted event ) { process job submitted event ( ( job submitted event ) event ) ; } else if ( event instanceof job unsuccessful completion event ) { process job unsuccessful completion event ( ( job unsuccessful completion event ) event ) ; } else if ( event instanceof map attempt finished event ) { process map attempt finished event ( ( map attempt finished event ) event ) ; } else if ( event instanceof reduce attempt finished event ) { process reduce attempt finished event ( ( reduce attempt finished event ) event ) ; } else if ( event instanceof task attempt finished event ) { process task attempt finished event ( ( task attempt finished event ) event ) ; } else if ( event instanceof task attempt started event ) { process task attempt started event ( ( task attempt started event ) event ) ; } else if ( event instanceof task attempt unsuccessful completion event ) { process task attempt unsuccessful completion event ( ( task attempt unsuccessful completion event ) event ) ; } else if ( event instanceof task failed event ) { process task failed event ( ( task failed event ) event ) ; } else if ( event instanceof task finished event ) { process task finished event ( ( task finished event ) event ) ; } else if ( event instanceof task started event ) { process task started event ( ( task started event ) event ) ; } else if ( event instanceof task updated event ) { process task updated event ( ( task updated event ) event ) ; } else throw new illegal argument exception ( " job builder process ( history event ) : unknown event type : " + event get event type ( ) + " for event : " + event ) ; }


creates a new instance of immutable { @ link domain name mapping } attempts to add new mappings to the result object will cause { @ link unsupported operation exception } to be thrown

public domain name mapping < v > build ( ) { return new immutable domain name mapping < v > ( default value , map ) ; }


fill the current client - side stack trace into the given exception the given exception is typically thrown on the server and serialized as - is , with the client wanting it to contain the client - side portion of the stack trace as well what we can do here is to update the { @ code stack trace element } array with the current client - side stack trace , provided that we run on jdk 1 4 +

public static void fill in client stack trace if possible ( throwable ex ) { if ( ex ! = null ) { stack trace element [ ] client stack = new throwable ( ) get stack trace ( ) ; set < throwable > visited exceptions = new hash set < > ( ) ; throwable ex to update = ex ; while ( ex to update ! = null & & ! visited exceptions contains ( ex to update ) ) { stack trace element [ ] server stack = ex to update get stack trace ( ) ; stack trace element [ ] combined stack = new stack trace element [ server stack length + client stack length ] ; system arraycopy ( server stack , 0 , combined stack , 0 , server stack length ) ; system arraycopy ( client stack , 0 , combined stack , server stack length , client stack length ) ; ex to update set stack trace ( combined stack ) ; visited exceptions add ( ex to update ) ; ex to update = ex to update get cause ( ) ; } } }


removes the embedded console notes in the given log line

public static string remove notes ( string line ) { while ( true ) { int idx = line index of ( preamble str ) ; if ( idx < 0 ) return line ; int e = line index of ( postamble str , idx ) ; if ( e < 0 ) return line ; line = line substring ( 0 , idx ) + line substring ( e + postamble str length ( ) ) ; } }


get the ( possibly html ) text to display for the item

public string get display ( ) { return display ; }


allows subclasses to block renames for domain - specific reasons generic validation of the new name ( e g , null checking , checking for illegal characters , and checking that the name is not in use ) always happens prior to calling this method

protected void check rename ( @ non null string new name ) throws failure { }


allows the user to enable and disable the table ' s feature that triggers navigation on certain selection events , like mouse clicking and pressing the ' enter ' key

public void set navigate on selection enabled ( boolean enabled ) { navigate on selection = enabled ; }


implementations should return an instance of { @ code managed operation } if the supplied { @ code method } has the corresponding metadata otherwise should return { @ code null }

managed operation get managed operation ( method method ) throws invalid metadata exception ;


create a node stat from the given params

public static stat persisted create stat ( long zxid , long time , long ephemeral owner ) { stat persisted stat = new stat persisted ( ) ; stat set ctime ( time ) ; stat set mtime ( time ) ; stat set czxid ( zxid ) ; stat set mzxid ( zxid ) ; stat set pzxid ( zxid ) ; stat set version ( 0 ) ; stat set aversion ( 0 ) ; stat set ephemeral owner ( ephemeral owner ) ; return stat ; }


public void put ( string path , route route ) { add route ( http method put , create route impl ( path , route ) ) ; }


if < code > true < code > the analysis component created by this provider requires certain settings to be instantiated it can ' t be created with defaults the default is < code > false < code >

default boolean requires analysis settings ( ) { return false ; }


adds the specified data element to the end of the skip list , if the element is not already present

public boolean add last ( directory diff diff ) { final int node level = directory diff list factory random level ( ) ; final skip list node [ ] node path = find previous nodes ( null , node level ) ; final skip list node new node = new skip list node ( diff , node level ) ; for ( int level = 0 ; level < = node level ; level + + ) { if ( level > 0 & & node path [ level ] ! = head ) { / / suppose the list is like : / / level 2 : head - > s 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > null / / level 1 : head - > s 1 - - - - > s 3 ' - - - - - - > s 5 - - - - - - - - - - - - - > null / / level 0 : head - > s 1 - > s 2 - > s 3 - > s 4 - > s 5 - > s 6 - > s 7 - > s 8 - > s 9 / / case : s 1 0 is added at the end the let the level for this node = 4 / / in this case , / / level 2 : head - > s 1 ' ' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > s 1 0 / / level 1 : head - > s 1 ' - - - - > s 3 ' - - - - - - > s 5 ' - - - - - - - - - - - - - - - - - - - - > s 1 0 / / level 0 : head - > s 1 - > s 2 - > s 3 - > s 4 - > s 5 - > s 6 - > s 7 - > s 8 - > s 9 - - - - > s 1 0 / / at level 1 , we combine s 5 , s 6 , s 7 , s 8 , s 9 and store as s 5 ' / / at level 2 , we combine s 1 ' , s 3 ' , s 5 ' and form s 1 ' ' and store at s 1 / / note : the last element ( element being added ) diff is not added while / / combining the diffs children diff combined = combine diff ( node path [ level ] , new node , level ) ; if ( combined ! = null ) { node path [ level ] set skip diff ( combined , level ) ; } } node path [ level ] set skip to ( new node , level ) ; new node set skip to ( null , level ) ; } return skip node list add ( new node ) ; }


creates a job classloader based on the configuration if the job classloader is enabled it is a no - op if the job classloader is not enabled

private void create job class loader ( configuration conf ) throws i o exception { job class loader = m r apps create job class loader ( conf ) ; }


static void notify framework listeners ( final int state , final bundle bundle , final throwable throwable ) { if ( framework listeners is empty ( ) ) { return ; } final framework event event = new framework event ( state ) ; final framework listener [ ] listeners = framework listeners to array ( new framework listener [ framework listeners size ( ) ] ) ; for ( int i = 0 ; i < listeners length ; i + + ) { final framework listener listener = listeners [ i ] ; listener framework event ( event ) ; } }


check whether if updated labels sent to rm was accepted or not

void verify r m heartbeat response for node labels ( node heartbeat response response ) ;


returns the number of files in the filesystem , if known , otherwise - 1 if not known

default public int get file count ( ) { return - 1 ; }


resource of single - component services or the global default for multi - component services mandatory if it is a single - component service and if cpus and memory are not specified at the service level

public service resource ( resource resource ) { this resource = resource ; return this ; }


records a miss when the hot and cold set are full

private void on full miss ( node node ) { if ( node status = = status cold non res ) { on non resident full miss ( node ) ; } else if ( node status = = status out of clock ) { on out of clock full miss ( node ) ; } else { throw new illegal state exception ( ) ; } }


public void set clock ( clock clock ) { this clock = preconditions check not null ( clock ) ; }


create { @ link instance } from json string

public static instance from json ( string json ) { instance ip ; try { ip = jackson utils to obj ( json , instance class ) ; } catch ( exception e ) { ip = from string ( json ) ; } if ( ip = = null ) { throw new illegal argument exception ( " malformed ip config : " + json ) ; } if ( ip get weight ( ) > max weight value ) { ip set weight ( max weight value ) ; } if ( ip get weight ( ) < min positive weight value & & ip get weight ( ) > min weight value ) { ip set weight ( min positive weight value ) ; } else if ( ip get weight ( ) < min weight value ) { ip set weight ( 0 0d ) ; } try { ip validate ( ) ; } catch ( nacos exception e ) { throw new illegal argument exception ( " malformed ip config : " + json ) ; } return ip ; }


post - processes a test immediately after execution of the { @ link java lang reflect method test method } in the supplied { @ link test context test context } & mdash ; for example , for timing or logging purposes this method must be called before framework - specific after lifecycle callbacks the default implementation is empty can be overridden by concrete classes as necessary

default void after test execution ( test context test context ) throws exception { }


public boolean is empty ( ) { return size = = 0 ; }


sets the title for the right side ' s listing

public void set right title ( string right title ) { this right title = right title ; set title ( title panels [ right ] , right title prefix , right title ) ; }


gets whether this instance has any position data to represent

public boolean has positions ( ) { return ( position info ! = position list none ) & & unprocessed insns has any position info ( ) ; }


this method is here so that it can be overridden with extra processing code before and after the call - back to any particular parser

public void parse ( ) throws m d exception { dmang parse info push ( start index offset , get class ( ) get simple name ( ) ) ; parse internal ( ) ; dmang parse info pop ( ) ; }


update the destination of the mount point to target namespace and target path

private static void update mount table destination ( string mount , string dst ns , string dst path , configuration conf ) throws i o exception { string address = conf get trimmed ( r b f config keys dfs router admin address key , r b f config keys dfs router admin address default ) ; inet socket address router socket = net utils create socket addr ( address ) ; router client r client = new router client ( router socket , conf ) ; try { mount table manager mount table = r client get mount table manager ( ) ; mount table original entry = get mount entry ( mount , mount table ) ; if ( original entry = = null ) { throw new i o exception ( " mount table " + mount + " doesn ' t exist " ) ; } else { remote location remote location = new remote location ( dst ns , dst path , mount ) ; original entry set destinations ( arrays as list ( remote location ) ) ; update mount table entry request update request = update mount table entry request new instance ( original entry ) ; update mount table entry response response = mount table update mount table entry ( update request ) ; if ( ! response get status ( ) ) { throw new i o exception ( " failed update mount table " + mount ) ; } r client get mount table manager ( ) refresh mount table entries ( refresh mount table entries request new instance ( ) ) ; } } finally { r client close ( ) ; } }


stop the previous animation and start a new one

public void start and cancel previous ( atomic reference < animator > animator ref ) { animator old animator = animator ref get ( ) ; if ( old animator ! = null ) { old animator cancel ( ) ; } animator new animator = start ( ) ; animator ref set ( new animator ) ; }


public boolean remove ( final cache key key ) { preconditions check not null ( key ) ; final encoded image encoded image ; synchronized ( this ) { encoded image = m map remove ( key ) ; } if ( encoded image = = null ) { return false ; } try { return encoded image is valid ( ) ; } finally { encoded image close ( ) ; } }


public final cancellable termvectors async ( term vectors request request , request options options , action listener < term vectors response > listener ) { return perform request async and parse entity ( request , request converters : : term vectors , options , term vectors response : : from x content , listener , empty set ( ) ) ; }


public string get property class ( ) { return property class ; }


returns label corresponding to the first word ( according to shell tokenization ) passed to - - run under


public static < r > supplier < r > do if ( final boolean condition , final supplier < r > true function , final supplier < r > false function ) { return ( ) - > { try { if ( condition ) { return true function get ( ) ; } return false function get ( ) ; } catch ( final throwable e ) { logging utils warn ( logger , e ) ; return false function get ( ) ; } } ; }


gets all the elements found in the list , or blocks until at least one element was added if the queue is empty when this method is called , it blocks until at least one element is added this method always returns a list with at least one element the method throws an { @ code illegal state exception } if the queue is closed checking whether the queue is open and removing the next element is one atomic operation

public list < e > get batch blocking ( ) throws interrupted exception { lock lock ( ) ; try { while ( open & & elements is empty ( ) ) { non empty await ( ) ; } if ( open ) { array list < e > result = new array list < > ( elements ) ; elements clear ( ) ; return result ; } else { throw new illegal state exception ( " queue is closed " ) ; } } finally { lock unlock ( ) ; } }


public controller listener < ? super info > get controller listener ( ) { return m controller listener ; }


visit a parse tree produced by the { @ code nonconditional } labeled alternative in { @ link painless parser # expression }

t visit nonconditional ( painless parser nonconditional context ctx ) ;


equivalent to processing each { @ code char } value in the { @ code char sequence } , in order in other words , no character encoding is performed ; the low byte and high byte of each { @ code char } are hashed directly ( in that order ) the input must not be updated while this method is in progress < b > warning : < b > this method will produce different output than most other languages do when running the same hash function on the equivalent input for cross - language compatibility , use { @ link # put string } , usually with a charset of utf - 8 for other use cases , use { @ code put unencoded chars }

hasher put unencoded chars ( char sequence char sequence ) ;


define a new configuration with no special validation logic

public config def define ( string name , type type , object default value , importance importance , string documentation , string group , int order in group , width width , string display name , list < string > dependents , recommender recommender ) { return define ( name , type , default value , null , importance , documentation , group , order in group , width , display name , dependents , recommender ) ; }


put faketest - query - paramters to test the collection format in query parameters

default response entity < void > test query parameter collection format ( @ not null @ api param ( value = " " , required = true ) @ valid @ request param ( value = " pipe " , required = true ) list < string > pipe , @ not null @ api param ( value = " " , required = true ) @ valid @ request param ( value = " ioutil " , required = true ) list < string > ioutil , @ not null @ api param ( value = " " , required = true ) @ valid @ request param ( value = " http " , required = true ) list < string > http , @ not null @ api param ( value = " " , required = true ) @ valid @ request param ( value = " url " , required = true ) list < string > url , @ not null @ api param ( value = " " , required = true ) @ valid @ request param ( value = " context " , required = true ) list < string > context ) { return new response entity < > ( http status not implemented ) ; }


advances the position until after the next newline character if the line is terminated by " \ r \ n " , the ' \ n ' must be consumed as whitespace by the caller

private void skip to end of line ( ) throws i o exception { long index = source index of element ( linefeed or carriage return ) ; buffer skip ( index ! = - 1 ? index + 1 : buffer size ( ) ) ; }


public static void set int ( memory segment [ ] segments , int offset , int value ) { if ( in first segment ( segments , offset , 4 ) ) { segments [ 0 ] put int ( offset , value ) ; } else { set int multi segments ( segments , offset , value ) ; } }


whether the animation would be finished if played without looping ( play mode # normal ) , given the state time

public boolean is animation finished ( float state time ) { int frame number = ( int ) ( state time / frame duration ) ; return key frames length - 1 < frame number ; }


encode initial x where it is usually pronounced as s

boolean encode initial x ( ) { / / current chinese pinyin spelling if ( string at ( 0 , 3 , " xia " , " xio " , " xie " , " " ) | | string at ( 0 , 2 , " xu " , " " ) ) { metaph add ( " x " ) ; m current + + ; return true ; } / / else if ( ( m current = = 0 ) ) { metaph add ( " s " ) ; m current + + ; return true ; } return false ; }


a version of { @ link hdfs admin # get inotify event stream ( ) } meant for advanced users who are aware of hdfs edits up to last read txid ( e g because they have access to an f s image inclusive of last read txid ) and only want to read events after this point

public d f s inotify event input stream get inotify event stream ( long last read txid ) throws i o exception { return dfs get inotify event stream ( last read txid ) ; }


find metric between [ begin time ms , end time ms ] , both side inclusive when identity is null , all metric between the time interval ms will be read , otherwise , only the specific identity will be read

public synchronized list < metric node > find by time and resource ( long begin time ms , long end time ms , string identity ) throws exception { list < string > file names = metric writer list metric files ( base dir , base file name ) ; / / record log info ( " pid = " + pid + " , find by time and resource ( [ " + begin time ms + " , " + end time ms / / + " ] , " + identity + " ) " ) ; int i = 0 ; long offset in index = 0 ; if ( valid position ( begin time ms ) ) { i = file names index of ( last position metric file name ) ; if ( i = = - 1 ) { i = 0 ; } else { offset in index = last position offset in index ; } } else { / / record log info ( " last position is invalidate , will re iterate all files , pid = " + pid ) ; } for ( ; i < file names size ( ) ; i + + ) { string file name = file names get ( i ) ; long offset = find offset ( begin time ms , file name , metric writer form index file name ( file name ) , offset in index ) ; offset in index = 0 ; if ( offset ! = - 1 ) { return metrics reader read metrics by end time ( file names , i , offset , begin time ms , end time ms , identity ) ; } } return null ; }


closes the remote side of the given stream if this causes the stream to be closed , adds a hook to close the channel after the given future completes

public void close stream remote ( http 2 stream stream , channel future future ) { switch ( stream state ( ) ) { case half closed remote : case open : stream close remote side ( ) ; break ; default : close stream ( stream , future ) ; break ; } }


calculate goal nano time from start time and current tick number , then wait until that goal has been reached

private long wait for next tick ( ) { long deadline = tick duration * ( tick + 1 ) ; for ( ; ; ) { final long current time = system nano time ( ) - start time ; long sleep time ms = ( deadline - current time + 999999 ) / 1000000 ; if ( sleep time ms < = 0 ) { if ( current time = = long min value ) { return - long max value ; } else { return current time ; } } / / check if we run on windows , as if thats the case we will need / / to round the sleep time as workaround for a bug that only affect / / the jvm if it runs on windows / / / / see https : / / github com / netty / netty / issues / 356 if ( platform dependent is windows ( ) ) { sleep time ms = sleep time ms / 10 * 10 ; if ( sleep time ms = = 0 ) { sleep time ms = 1 ; } } try { thread sleep ( sleep time ms ) ; } catch ( interrupted exception ignored ) { if ( worker state updater get ( hashed wheel timer this ) = = worker state shutdown ) { return long min value ; } } } }


used to avoid http : bugs sun comview bug do ? bug id = 6558557

static < t > multiset < t > cast ( iterable < t > iterable ) { return ( multiset < t > ) iterable ; }


public void string item test ( ) { / / todo : test string item }


returns a formatter for a four digit year and two digit month of year ( yyyy - mm )

public static date time formatter year month ( ) { return constants ym ; }


check whether the service monitors the given job

boolean contains job ( job i d job id ) ;


assert the number of events received by this instance checks that unexpected events have not been received if an event is handled by several listeners , each instance will be registered

public void assert total events count ( int number ) { int actual = 0 ; for ( map entry < string , list < object > > entry : this content entry set ( ) ) { actual + = entry get value ( ) size ( ) ; } assert that ( actual ) as ( " wrong number of total events ( " + this content size ( ) + " ) registered listener ( s ) " ) is equal to ( number ) ; }


public static icon get built in icon ( boolean disabled ) { load images ( ) ; if ( disabled ) { return disabled built in icon ; } return built in icon ; }


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 " ) ; }


for flick scroll , sets the amount of time in seconds that a fling will continue to scroll default is 1

public void set fling time ( float fling time ) { this fling time = fling time ; }


this method is needed because if the disappearing item ended up being remounted to the root , then the index can be different than the one it was created with

public void start disappearing mount item ( mount item mount item ) { final int index = m mount items key at ( m mount items index of value ( mount item ) ) ; start unmount disappearing item ( index , mount item ) ; }


this test validates the correctness of { @ link r m web service protocol # get app priority ( ) } inside router

public void test app priority x m l ( ) throws exception { string app id = submit application ( ) ; list < app priority > responses = perform get calls ( rm web service path + format ( apps appid priority , app id ) , app priority class , null , null ) ; app priority router response = responses get ( 0 ) ; app priority rm response = responses get ( 1 ) ; assert not null ( router response ) ; assert not null ( rm response ) ; assert equals ( rm response get priority ( ) , router response get priority ( ) ) ; }


private void init display ( array node json obj array ) { for ( int index = 0 ; index < json obj array size ( ) ; index + + ) { if ( json obj array get ( index ) instanceof object node ) { object node project meta json obj = ( object node ) json obj array get ( index ) ; project meta json obj put ( " display " , false ) ; } } }


string formatting method that knows how to format dates ( using the default locale ' s date formatter )

public static string to string ( object o ) { / / to replace the date format with java time format date time formatter if ( o instanceof offset date time ) { offset date time odt = ( offset date time ) o ; return parsing utilities date to string ( ( offset date time ) odt ) ; } else if ( o = = null ) { return " " ; } else if ( o instanceof object [ ] ) { return arrays deep to string ( ( object [ ] ) o ) ; } else { return o to string ( ) ; } }


visit a parse tree produced by { @ link eql base parser # subquery }

t visit subquery ( eql base parser subquery context ctx ) ;


returns an { @ link input stream } to read from { @ code stdout } of the child process when this method returns null , { @ link proc } will internally pump the output from the child process to your { @ link output stream } of choosing

public abstract input stream get stdout ( ) ;


returns whether the key has just been pressed

public boolean is key just pressed ( int key ) ;


public object parse array element ( element array ele , @ nullable bean definition bd ) { string element type = array ele get attribute ( value type attribute ) ; node list nl = array ele get child nodes ( ) ; managed array target = new managed array ( element type , nl get length ( ) ) ; target set source ( extract source ( array ele ) ) ; target set element type name ( element type ) ; target set merge enabled ( parse merge attribute ( array ele ) ) ; parse collection elements ( nl , target , bd , element type ) ; return target ; }


protected void verify authentication context signature ( final pair < ? extends signable s a m l object , message context > authentication context , final http servlet request request , final request abstract type authn request , final saml registered service service provider metadata facade adaptor ) throws exception { val ctx = authentication context get value ( ) ; verify authentication context signature ( ctx , request , authn request , adaptor ) ; }


public static void unregister ( process engine process engine ) { process engines remove ( process engine get name ( ) ) ; }


creates { @ link confluent registry avro deserialization schema } that produces { @ link generic record } using provided reader schema and looks up writer schema in confluent schema registry

public static confluent registry avro deserialization schema < generic record > for generic ( schema schema , string url ) { return for generic ( schema , url , default identity map capacity ) ; }


short - circuit ? : no threadsemaphore : semaphore semaphore permit reached ? : no execution result : synchronous hystrix runtime exception fallback : unsupported operation exception

public void test execution hook semaphore exception no fallback ( ) { assert hooks on failure ( new func 0 < c > ( ) { @ override public c call ( ) { return get command ( execution isolation strategy semaphore , execution result failure , fallback result unimplemented ) ; } } , new action 1 < c > ( ) { @ override public void call ( c command ) { testable execution hook hook = command get builder ( ) execution hook ; assert true ( hook command emissions match ( 0 , 1 , 0 ) ) ; assert true ( hook execution events match ( 0 , 1 , 0 ) ) ; assert true ( hook fallback events match ( 0 , 0 , 0 ) ) ; assert equals ( runtime exception class , hook get command exception ( ) get class ( ) ) ; assert equals ( runtime exception class , hook get execution exception ( ) get class ( ) ) ; assert null ( hook get fallback exception ( ) ) ; assert equals ( " on start - ! on run start - on execution start - on execution error - ! on run error - on error - " , hook execution sequence to string ( ) ) ; } } ) ; }


public iterable < string > get candidates ( ) { return candidates ; }


return a unique result object from the given collection returns { @ code null } if 0 result objects found ; throws an exception if more than 1 instance found

public static < t > t unique result ( @ nullable collection < t > results ) throws incorrect result size data access exception { if ( collection utils is empty ( results ) ) { return null ; } if ( ! collection utils has unique object ( results ) ) { throw new incorrect result size data access exception ( 1 , results size ( ) ) ; } return results iterator ( ) next ( ) ; }


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


the name of the action must be unique across actions

public string name ( ) { return this name ; }


copies an iterator ' s elements into an array the iterator will be left exhausted : its { @ code has next ( ) } method will return { @ code false }

public static < t > t [ ] to array ( iterator < ? extends t > iterator , class < t > type ) { list < t > list = lists new array list ( iterator ) ; return iterables to array ( list , type ) ; }


test that a typedef of a union can ' t be added to the union

public void test cyclic dependency problem 3 ( ) { type def type def = create type def ( union ) ; try { union add ( type def ) ; assert fail ( " shouldn ' t be able to add a union typedef to the typedef ' s union " ) ; } catch ( illegal argument exception e ) { / / should get an exception from adding the union to itself } try { union insert ( 0 , type def ) ; assert fail ( " shouldn ' t be able to insert a union typedef into the typedef ' s union " ) ; } catch ( illegal argument exception e ) { / / should get an exception from inserting the union to itself } }


get the fragment with the given name that is in the tree identified by the tree name

public program fragment get fragment ( string tree name , string name ) { lock acquire ( ) ; try { module manager m = tree map get ( tree name ) ; if ( m ! = null ) { return m get fragment ( name ) ; } } catch ( i o exception e ) { err handler db error ( e ) ; } finally { lock release ( ) ; } return null ; }


get the world particle group list with the returned group , use particle group : : get next to get the next group in the world list a null group indicates the end of the list

public particle group [ ] get particle group list ( ) { return m particle system get particle group list ( ) ; }


returns a { @ link session command group } with custom commands to publish to the controller , or { @ code null } if no custom commands should be published

session command group get custom commands ( media session session , controller info controller info ) ;


tests that subscribed partitions are the same when there ' s no change on the intial topics ( filter restored partitions with discovered is disabled )

public void test disable filter restored paritions no change ( ) throws exception { check filter restored partitions with disovered ( arrays as list ( new string [ ] { " kafka topic 1 " , " kafka topic 2 " } ) , arrays as list ( new string [ ] { " kafka topic 1 " , " kafka topic 2 " } ) , arrays as list ( new string [ ] { " kafka topic 1 " , " kafka topic 2 " } ) , true ) ; }


public static void hide soft input ( @ non null final view view ) { input method manager imm = ( input method manager ) utils get app ( ) get system service ( context input method service ) ; if ( imm = = null ) return ; imm hide soft input from window ( view get window token ( ) , 0 ) ; }


public static boolean region matches ( final char sequence cs , final boolean ignore case , final int this start , final char sequence substring , final int start , final int length ) { if ( cs instanceof string & & substring instanceof string ) { return ( ( string ) cs ) region matches ( ignore case , this start , ( string ) substring , start , length ) ; } int index 1 = this start ; int index 2 = start ; int tmp len = length ; while ( tmp len - - > 0 ) { final char c 1 = cs char at ( index 1 + + ) ; final char c 2 = substring char at ( index 2 + + ) ; if ( c 1 = = c 2 ) { continue ; } if ( ! ignore case ) { return false ; } / / the same check as in string region matches ( ) : if ( character to upper case ( c 1 ) ! = character to upper case ( c 2 ) & & character to lower case ( c 1 ) ! = character to lower case ( c 2 ) ) { return false ; } } return true ; }


returns the index of the first whole word occurrence of the search word within the given text a whole word is defined as the character before and after the occurrence must not be a java identifier part

public static int index of word ( string text , string search word ) { int index = 0 ; while ( index < text length ( ) ) { index = text index of ( search word , index ) ; if ( index < 0 ) { return - 1 ; } if ( is whole word ( text , index , search word length ( ) ) ) { return index ; } index + = search word length ( ) ; } return - 1 ; }


constructs an empty { @ code linked hash multimap } with enough capacity to hold the specified numbers of keys and values without rehashing

public static < k , v > linked hash multimap < k , v > create ( int expected keys , int expected values per key ) { return new linked hash multimap < > ( maps capacity ( expected keys ) , maps capacity ( expected values per key ) ) ; }


returns true if the specified oas model has at least one operation with http bearer authentication

public static boolean has http bearer methods ( open a p i open a p i ) { final map < string , security scheme > security schemes = get security schemes ( open a p i ) ; if ( security schemes ! = null ) { for ( map entry < string , security scheme > scheme : security schemes entry set ( ) ) { if ( security scheme type http equals ( scheme get value ( ) get type ( ) ) & & " bearer " equals ( scheme get value ( ) get scheme ( ) ) ) { return true ; } } } return false ; }


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

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


public void test big cat all of ( ) { / / todo : test big cat all of }


public void 1 2 3number test ( ) { / / todo : test 1 2 3number }


public static void main ( final string [ ] args ) { environment information log environment info ( log , " command line client " , args ) ; / / 1 find the configuration directory final string configuration directory = get configuration directory from env ( ) ; / / 2 load the global configuration final configuration configuration = global configuration load configuration ( configuration directory ) ; / / 3 load the custom command lines final list < custom command line > custom command lines = load custom command lines ( configuration , configuration directory ) ; try { final cli frontend cli = new cli frontend ( configuration , custom command lines ) ; security utils install ( new security configuration ( cli configuration ) ) ; int ret code = security utils get installed context ( ) run secured ( ( ) - > cli parse and run ( args ) ) ; system exit ( ret code ) ; } catch ( throwable t ) { final throwable stripped throwable = exception utils strip exception ( t , undeclared throwable exception class ) ; log error ( " fatal error while running command line interface " , stripped throwable ) ; stripped throwable print stack trace ( ) ; system exit ( 31 ) ; } }


returns whether the device is required to be idle

public boolean is idle required ( ) { return ( requirements & device idle ) ! = 0 ; }


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


public static string get size ( final file file ) { if ( file = = null ) return " " ; if ( file is directory ( ) ) { return get dir size ( file ) ; } return get file size ( file ) ; }


validate that the provided application name is valid , and throws an exception otherwise

public static void validate application name ( string application ) { validate application name ( application , false ) ; }


private void remove descendants from view ( tree path parent path ) { remove from view ( parent path ) ; program node node = ( program node ) parent path get last path component ( ) ; for ( int i = 0 ; i < node get child count ( ) ; i + + ) { program node child = ( program node ) node get child at ( i ) ; if ( child get allows children ( ) ) { remove descendants from view ( child get tree path ( ) ) ; } else { remove from view ( child get tree path ( ) ) ; } } }


the color to be replaced is specified using individual red , green , and blue components ( normalized to 1 0 ) the default is green : ( 0 0 , 1 0 , 0 0 )

public void set color to replace ( float red component , float green component , float blue component ) { color to replace = new float [ ] { red component , green component , blue component } ; set float vec 3 ( color to replace location , color to replace ) ; }


set the packages to search for classes with jaxb2 annotations in the classpath this is using a spring - bases search and therefore analogous to spring ' s component - scan feature ( { @ link org springframework context annotation class path bean definition scanner } ) setting either this property , { @ link # set context path " context path " } or { @ link # set classes to be bound " classes to be bound " } is required

public void set packages to scan ( @ nullable string packages to scan ) { this packages to scan = packages to scan ; }


checks whether a throwable chain contains an exception matching a predicate and returns it

public static optional < throwable > find throwable ( throwable throwable , predicate < throwable > predicate ) { if ( throwable = = null | | predicate = = null ) { return optional empty ( ) ; } throwable t = throwable ; while ( t ! = null ) { if ( predicate test ( t ) ) { return optional of ( t ) ; } else { t = t get cause ( ) ; } } return optional empty ( ) ; }


gets the paired { @ link plugin wrapper }

public plugin wrapper get wrapper ( ) { return wrapper ; }


add datanode to suspect nodes and suspect and dead nodes

public synchronized void add node to detect ( d f s input stream dfs input stream , datanode info datanode info ) { hash set < datanode info > datanode infos = suspect and dead nodes get ( dfs input stream ) ; if ( datanode infos = = null ) { datanode infos = new hash set < datanode info > ( ) ; datanode infos add ( datanode info ) ; suspect and dead nodes put if absent ( dfs input stream , datanode infos ) ; } else { datanode infos add ( datanode info ) ; } log debug ( " add datanode { } to suspect and dead nodes " , datanode info ) ; add suspect node to detect ( datanode info ) ; }


returns a deferred { @ link watermark output } for the given output id > see { @ link watermark output multiplexer } for a description of immediate and deferred outputs

public watermark output get deferred output ( string output id ) { final output state output state = watermark per output id get ( output id ) ; preconditions check argument ( output state ! = null , " no output registered under id % s " , output id ) ; return new deferred output ( output state ) ; }


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


observable < model api response > upload file ( @ retrofit 2 http path ( " pet id " ) long pet id , @ retrofit 2 http part ( " additional metadata " ) string additional metadata , @ retrofit 2 http part multipart body part file ) ;


sets whether to highlight enclosing peer characters or not

public void set highlight enclosing peer characters ( boolean highlight enclosing peer charcters ) { f highlight enclosing peer characters = highlight enclosing peer charcters ; install uninstall text listener ( highlight enclosing peer charcters ) ; }


called when a { @ link cache span } is removed from the cache

void on span removed ( cache cache , cache span span ) ;


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


exit a parse tree produced by { @ link eql base parser # event query }

void exit event query ( eql base parser event query context ctx ) ;


assert that the string value of an object contains the expected text

protected void assert string value contains ( final object o , final string expected ) { assert that ( o to string ( ) ) described as ( " object string value " ) contains ( expected ) ; }


returns a matcher with identical behavior to the given { @ link character } - based predicate , but which operates on primitive { @ code char } instances instead

public static char matcher for predicate ( final predicate < ? super character > predicate ) { return predicate instanceof char matcher ? ( char matcher ) predicate : new for predicate ( predicate ) ; } / / constructors


< code > optional string name = 2 ; < code >

private void set name bytes ( com google protobuf byte string value ) { if ( value = = null ) { throw new null pointer exception ( ) ; } bit field 0 | = 0x 0 0 0 0 0 0 0 2 ; name = value to string utf 8 ( ) ; }


parses the unconditional options from rc files for the current command this is not as trivial as simply taking the list of options for the specified command because commands can inherit arguments from each other , and we have to respect that ( e g if an option is specified for ' build ' , it needs to take effect for the ' test ' command , too ) more specific commands should have priority over the broader commands ( say a " build " option that conflicts with a " common " option should override the common one regardless of order ) for each command , the options are parsed in rc order this uses the master rc file first , and follows import statements this is the order in which they were passed by the client

void parse rc options ( event handler event handler , list multimap < string , rc chunk of args > command to rc args ) throws options parsing exception { for ( string command to parse : get command names to parse ( command annotation ) ) { / / get all args defined for this command ( or " common " ) , grouped by rc chunk for ( rc chunk of args rc args : command to rc args get ( command to parse ) ) { if ( ! rc args get args ( ) is empty ( ) ) { string inherited = command to parse equals ( command annotation name ( ) ) ? " " : " inherited " ; string source = rc args get rc file ( ) equals ( " client " ) ? " options provided by the client " : string format ( " reading rc options for ' % s ' from % s " , command annotation name ( ) , rc args get rc file ( ) ) ; rcfile notes add ( string format ( " % s : \ n % s ' % s ' options : % s " , source , inherited , command to parse , joiner on ( ' ' ) join ( rc args get args ( ) ) ) ) ; } options parser parse ( priority category rc file , rc args get rc file ( ) , rc args get args ( ) ) ; } } }


we would have liked renames across file system to fail but unfortunately there is not way to distinguish the two file systems

public void test rename across fs ( ) throws i o exception { fc mkdir ( new path ( " / new dir / dir foo " ) , file context default perm , true ) ; / / the root will get interpreted to the root of the chrooted fs fc rename ( new path ( " / new dir / dir foo " ) , new path ( " file : / / / dir foo bar " ) ) ; file context test helper is dir ( fc , new path ( " / dir foo bar " ) ) ; }


formats the given frame information based on the given template line it is the reverse of { @ link # parse ( string ) } , but optionally with different frame information

public string format ( string line , frame info frame info ) { / / try to match it against the regular expression matcher matcher = pattern matcher ( line ) ; if ( ! matcher matches ( ) ) { return null ; } string buffer formatted buffer = new string buffer ( ) ; int line index = 0 ; for ( int expression type index = 0 ; expression type index < expression type count ; expression type index + + ) { int start index = matcher start ( expression type index + 1 ) ; if ( start index > = 0 ) { int end index = matcher end ( expression type index + 1 ) ; string match = matcher group ( expression type index + 1 ) ; / / copy a literal piece of the input line formatted buffer append ( line substring ( line index , start index ) ) ; / / copy a matched and translated piece of the input line char expression type = expression types [ expression type index ] ; switch ( expression type ) { case ' c ' : formatted buffer append ( frame info get class name ( ) ) ; break ; case ' c ' : formatted buffer append ( class util internal class name ( frame info get class name ( ) ) ) ; break ; case ' s ' : formatted buffer append ( frame info get source file ( ) ) ; break ; case ' l ' : formatted buffer append ( frame info get line number ( ) ) ; break ; case ' t ' : formatted buffer append ( frame info get type ( ) ) ; break ; case ' f ' : if ( verbose ) { formatted buffer append ( frame info get type ( ) ) append ( ' ' ) ; } formatted buffer append ( frame info get field name ( ) ) ; break ; case ' m ' : if ( verbose ) { formatted buffer append ( frame info get type ( ) ) append ( ' ' ) ; } formatted buffer append ( frame info get method name ( ) ) ; if ( verbose ) { formatted buffer append ( ' ( ' ) append ( frame info get arguments ( ) ) append ( ' ) ' ) ; } break ; case ' a ' : formatted buffer append ( frame info get arguments ( ) ) ; break ; } / / skip the original element whose replacement value / / has just been appended line index = end index ; } } / / copy the last literal piece of the input line formatted buffer append ( line substring ( line index ) ) ; / / return the formatted line return formatted buffer to string ( ) ; }


returns true if < code > i < code > is greater than < code > j < code >

public static boolean unsigned greater than ( byte i , byte j ) { return comp ( greater than , i , j ) ; }


exposes any bind status error messages under { @ link # messages attribute this key } in the { @ link page context # page scope } only called if { @ link # should render ( ) } returns { @ code true }

protected void expose attributes ( ) throws jsp exception { list < string > error messages = new array list < > ( arrays as list ( get bind status ( ) get error messages ( ) ) ) ; this old messages = this page context get attribute ( messages attribute , page context page scope ) ; this page context set attribute ( messages attribute , error messages , page context page scope ) ; this error messages were exposed = true ; }


returns a set of index patterns that represent the range provided notably , this compresses months or years using wildcards ( in order to send smaller api calls ) for example , if { @ code begin millis } is 2016 - 11 - 30 and { @ code end millis } is 2017 - 01 - 02 , the result will be 2016 - 11 - 30 , 2016 - 12 - , 2017 - 01 - 01 and 2017 - 01 - 02

public list < string > format type and range ( @ nullable string type , long begin millis , long end millis ) { gregorian calendar current = midnight u t c ( begin millis ) ; gregorian calendar end = midnight u t c ( end millis ) ; string prefix = prefix ( type ) ; list < string > indices = new array list < > ( ) ; while ( current compare to ( end ) < = 0 ) { if ( current get ( calendar month ) = = calendar january & & current get ( day of month ) = = 1 ) { / / attempt to compress a year current set ( calendar day of year , current get actual maximum ( calendar day of year ) ) ; if ( current compare to ( end ) < = 0 ) { indices add ( string format ( " % s - % s % c * " , prefix , current get ( calendar year ) , date separator ( ) ) ) ; current add ( day of month , 1 ) ; / / rollover to next year continue ; } else { current set ( calendar day of year , 1 ) ; / / rollback to first of the year } } else if ( current get ( day of month ) = = 1 ) { / / attempt to compress a month current set ( day of month , current get actual maximum ( day of month ) ) ; if ( current compare to ( end ) < = 0 ) { indices add ( format index pattern ( " % s - % s % c % 0 2d % c * " , current , prefix ) ) ; current add ( day of month , 1 ) ; / / rollover to next month continue ; } current set ( day of month , 9 ) ; / / try to compress days 0 - 9 if ( current compare to ( end ) < = 0 ) { indices add ( format index pattern ( " % s - % s % c % 0 2d % c 0 * " , current , prefix ) ) ; current add ( day of month , 1 ) ; / / rollover to day 10 continue ; } current set ( day of month , 1 ) ; / / set back to day 1 } else if ( current get ( day of month ) = = 10 ) { current set ( day of month , 19 ) ; / / try to compress days 10 - 19 if ( current compare to ( end ) < = 0 ) { indices add ( format index pattern ( " % s - % s % c % 0 2d % c 1 * " , current , prefix ) ) ; current add ( day of month , 1 ) ; / / rollover to day 20 continue ; } current set ( day of month , 10 ) ; / / set back to day 10 } else if ( current get ( day of month ) = = 20 ) { current set ( day of month , 29 ) ; / / try to compress days 20 - 29 if ( current compare to ( end ) < = 0 ) { indices add ( format index pattern ( " % s - % s % c % 0 2d % c 2 * " , current , prefix ) ) ; current add ( day of month , 1 ) ; / / rollover to day 30 continue ; } current set ( day of month , 20 ) ; / / set back to day 20 } indices add ( format type and timestamp ( type , current get time in millis ( ) ) ) ; current add ( day of month , 1 ) ; } return indices ; }