signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class CarrierRefresher { /** * Returns true if polling is allowed , false if we are below the configured floor poll interval . */ private boolean allowedToPoll ( final String bucket ) { } }
Long bucketLastPollTimestamp = lastPollTimestamps . get ( bucket ) ; return bucketLastPollTimestamp == null || ( ( System . nanoTime ( ) - bucketLastPollTimestamp ) >= pollFloorNs ) ;
public class ApiOvhIpLoadbalancing { /** * Get this object properties * REST : GET / ipLoadbalancing / { serviceName } / http / farm / { farmId } / server / { serverId } * @ param serviceName [ required ] The internal name of your IP load balancing * @ param farmId [ required ] Id of your farm * @ param serverI...
String qPath = "/ipLoadbalancing/{serviceName}/http/farm/{farmId}/server/{serverId}" ; StringBuilder sb = path ( qPath , serviceName , farmId , serverId ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return convertTo ( resp , OvhBackendHTTPServer . class ) ;
public class JDBCCallableStatement { /** * # ifdef JAVA6 */ public synchronized void setCharacterStream ( String parameterName , java . io . Reader reader , long length ) throws SQLException { } }
if ( length > Integer . MAX_VALUE ) { String msg = "Maximum character input length exceeded: " + length ; // NOI18N throw Util . sqlException ( ErrorCode . JDBC_INPUTSTREAM_ERROR , msg ) ; } setCharacterStream ( parameterName , reader , ( int ) length ) ;
public class Marker { /** * return a provided Marker with the given color . * @ param provided * desired color * @ return Marker * @ throws NullPointerException * when provided is null */ public static Marker createProvided ( Provided provided ) { } }
requireNonNull ( provided ) ; return new Marker ( Marker . class . getResource ( "/markers/" + provided . getFilename ( ) ) , provided . getOffsetX ( ) , provided . getOffsetY ( ) ) ;
public class RegisteredResources { /** * Reorder resources based on commitPriority in asccending order for prepare phase . */ protected void sortPreparePriorityResources ( ) { } }
if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "sortPreparePriorityResources" , _resourceObjects . toArray ( ) ) ; Collections . sort ( _resourceObjects , prepareComparator ) ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "sortPreparePriorityResources" , _resourceObjects . toArray ( ) ) ; return ;
public class ImagePathTag { /** * ( non - Javadoc ) * @ see javax . servlet . jsp . tagext . TagSupport # doStartTag ( ) */ @ Override public int doEndTag ( ) throws JspException { } }
try { String imgSrc = getImgSrcToRender ( ) ; if ( null == var ) { try { pageContext . getOut ( ) . print ( imgSrc ) ; } catch ( IOException e ) { throw new JspException ( e ) ; } } else { pageContext . setAttribute ( var , imgSrc ) ; } return super . doEndTag ( ) ; } finally { // Reset the Thread local for the Jawr co...
public class TaxinvoiceServiceImp { /** * / * ( non - Javadoc ) * @ see com . popbill . api . TaxinvoiceService # getLogs ( java . lang . String , com . popbill . api . taxinvoice . MgtKeyType , java . lang . String ) */ @ Override public TaxinvoiceLog [ ] getLogs ( String CorpNum , MgtKeyType KeyType , String MgtKey...
if ( KeyType == null ) throw new PopbillException ( - 99999999 , "관리번호형태가 입력되지 않았습니다." ) ; if ( MgtKey == null || MgtKey . isEmpty ( ) ) throw new PopbillException ( - 99999999 , "관리번호가 입력되지 않았습니다." ) ; return httpget ( "/Taxinvoice/" + KeyType . name ( ) + "/" + MgtKey + "/Logs" , CorpNum , null , TaxinvoiceLog [ ] . ...
public class NestedClassWriterImpl { /** * { @ inheritDoc } */ @ Override protected Content getDeprecatedLink ( Element member ) { } }
return writer . getQualifiedClassLink ( LinkInfoImpl . Kind . MEMBER , member ) ;
public class PvmExecutionImpl { /** * Checks if the given execution is on a dispatchable state . * That means if the current activity is not a leaf in the activity tree OR * it is a leaf but not a scope OR it is a leaf , a scope * and the execution is in state DEFAULT , which means not in state * Starting , Exe...
ActivityImpl targetActivity = targetScope . getActivity ( ) ; return // if not leaf , activity id is null - > dispatchable targetScope . getActivityId ( ) == null || // if leaf and not scope - > dispatchable ! targetActivity . isScope ( ) || // if leaf , scope and state in default - > dispatchable ( targetScope . isInS...
public class InlineMenuRow { /** * Returns row as List & lt ; InlineKeyboardButtons & gt ; * @ return list of keyboard buttons * @ see InlineMenuButton # toKeyboardButton ( ) */ public List < InlineKeyboardButton > toButtons ( ) { } }
return buttons . stream ( ) . map ( InlineMenuButton :: toKeyboardButton ) . collect ( Collectors . toList ( ) ) ;
public class AnycastOutputHandler { /** * Cleans up the non - persistent state . No methods on the ControlHandler interface should be called after this is called . */ public void close ( ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "close" ) ; Enumeration streams = null ; synchronized ( this ) { synchronized ( streamTable ) { closed = true ; closeBrowserSessionsInternal ( ) ; streams = streamTable . elements ( ) ; } } // since already set closed to tru...
public class CATImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public void eUnset ( int featureID ) { } }
switch ( featureID ) { case AfplibPackage . CAT__CAT_DATA : setCATData ( CAT_DATA_EDEFAULT ) ; return ; } super . eUnset ( featureID ) ;
public class auditnslogpolicy_binding { /** * Use this API to fetch auditnslogpolicy _ binding resource of given name . */ public static auditnslogpolicy_binding get ( nitro_service service , String name ) throws Exception { } }
auditnslogpolicy_binding obj = new auditnslogpolicy_binding ( ) ; obj . set_name ( name ) ; auditnslogpolicy_binding response = ( auditnslogpolicy_binding ) obj . get_resource ( service ) ; return response ;
public class DatabaseAccountsInner { /** * Lists the connection strings for the specified Azure Cosmos DB database account . * @ param resourceGroupName Name of an Azure resource group . * @ param accountName Cosmos DB database account name . * @ throws IllegalArgumentException thrown if parameters fail the valid...
if ( this . client . subscriptionId ( ) == null ) { throw new IllegalArgumentException ( "Parameter this.client.subscriptionId() is required and cannot be null." ) ; } if ( resourceGroupName == null ) { throw new IllegalArgumentException ( "Parameter resourceGroupName is required and cannot be null." ) ; } if ( account...
public class LexerEngine { /** * Skip all input tokens . * @ param tokenTypes to be skipped token types */ public void skipAll ( final TokenType ... tokenTypes ) { } }
Set < TokenType > tokenTypeSet = Sets . newHashSet ( tokenTypes ) ; while ( tokenTypeSet . contains ( lexer . getCurrentToken ( ) . getType ( ) ) ) { lexer . nextToken ( ) ; }
public class GetDisksRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( GetDisksRequest getDisksRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( getDisksRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( getDisksRequest . getPageToken ( ) , PAGETOKEN_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessa...
public class X509CertPath { /** * Parse a PKIPATH format CertPath from an InputStream . Return an * unmodifiable List of the certificates . * @ param is the < code > InputStream < / code > to read the data from * @ return an unmodifiable List of the certificates * @ exception CertificateException if an exceptio...
List < X509Certificate > certList = null ; CertificateFactory certFac = null ; if ( is == null ) { throw new CertificateException ( "input stream is null" ) ; } try { DerInputStream dis = new DerInputStream ( readAllBytes ( is ) ) ; DerValue [ ] seq = dis . getSequence ( 3 ) ; if ( seq . length == 0 ) { return Collecti...
public class Scopes { /** * Matches the given < code > Scopes < / code > argument against this < code > Scopes < / code > object , * more weakly than { @ link # match ( Scopes ) } . * < br / > * If this < code > Scopes < / code > is the { @ link # NONE } scope , always returns false . < br / > * If this < code ...
if ( isNoneScope ( ) ) return false ; if ( isAnyScope ( ) ) return true ; if ( other == null || other . isNoneScope ( ) ) return true ; if ( other . isAnyScope ( ) ) return false ; return ! Collections . disjoint ( scopes , other . scopes ) ;
public class LegacyDfuImpl { /** * Checks whether the response received is valid and returns the status code . * @ param response the response received from the DFU device . * @ param request the expected Op Code . * @ return The status code . * @ throws UnknownResponseException if response was not valid . */ p...
if ( response == null || response . length != 3 || response [ 0 ] != OP_CODE_RESPONSE_CODE_KEY || response [ 1 ] != request || response [ 2 ] < 1 || response [ 2 ] > 6 ) throw new UnknownResponseException ( "Invalid response received" , response , OP_CODE_RESPONSE_CODE_KEY , request ) ; return response [ 2 ] ;
public class PropertiesEscape { /** * Perform a ( configurable ) Java Properties Value < strong > escape < / strong > operation on a < tt > String < / tt > input , * writing results to a < tt > Writer < / tt > . * This method will perform an escape operation according to the specified * { @ link org . unbescape ....
if ( writer == null ) { throw new IllegalArgumentException ( "Argument 'writer' cannot be null" ) ; } if ( level == null ) { throw new IllegalArgumentException ( "The 'level' argument cannot be null" ) ; } PropertiesValueEscapeUtil . escape ( new InternalStringReader ( text ) , writer , level ) ;
public class ByteArraySerializer { /** * ( non - Javadoc ) * @ see Serializer # deserialize ( byte [ ] , * java . lang . reflect . Type ) */ @ SuppressWarnings ( "unchecked" ) @ Override public final < T > T deserialize ( byte [ ] content , Type type ) throws SerializerException { } }
if ( byte [ ] . class . equals ( type ) ) { return ( T ) content ; } throw new SerializerException ( "Unable to deserialize to type '" + type + "'" ) ;
public class TempByteHolder { /** * Simple minimum for 3 ints */ private static int min ( int a , int b , int c ) { } }
int r = a ; if ( r > b ) r = b ; if ( r > c ) r = c ; return r ;
public class FloatMatrix { /** * Repeat this matrix < code > rowRepeats < / code > times in row direction and < code > colRepeats < / code > times in column direction . * @ param rowRepeats * @ param colRepeats * @ return a new matrix * @ see IntMatrix # repmat ( int , int ) */ @ Override public FloatMatrix rep...
N . checkArgument ( rowRepeats > 0 && colRepeats > 0 , "rowRepeats=%s and colRepeats=%s must be bigger than 0" , rowRepeats , colRepeats ) ; final float [ ] [ ] c = new float [ rows * rowRepeats ] [ cols * colRepeats ] ; for ( int i = 0 ; i < rows ; i ++ ) { for ( int j = 0 ; j < colRepeats ; j ++ ) { N . copy ( a [ i ...
public class DimensionReductionUtils { /** * This method will calculate the importance of principal components for PCA / GLRM methods . * @ param std _ deviation : array of singular values * @ param totVar : sum of squared singular values * @ param vars : array of singular values squared * @ param prop _ var : ...
int arrayLen = std_deviation . length ; if ( totVar > 0 ) { for ( int i = 0 ; i < arrayLen ; i ++ ) { vars [ i ] = std_deviation [ i ] * std_deviation [ i ] ; prop_var [ i ] = vars [ i ] / totVar ; cum_var [ i ] = i == 0 ? prop_var [ 0 ] : cum_var [ i - 1 ] + prop_var [ i ] ; } } double lastCum = cum_var [ arrayLen - 1...
public class GeneralPurposeFFT_F32_2D { /** * Computes 2D inverse DFT of complex data leaving the result in * < code > a < / code > . The data is stored in 1D array in row - major order . * Complex number is stored as two float values in sequence : the real and * imaginary part , i . e . the input array must be o...
// handle special case if ( rows == 1 || columns == 1 ) { if ( rows > 1 ) fftRows . complexInverse ( a , scale ) ; else fftColumns . complexInverse ( a , scale ) ; return ; } if ( isPowerOfTwo ) { int oldn2 = columns ; columns = 2 * columns ; for ( int r = 0 ; r < rows ; r ++ ) { fftColumns . complexInverse ( a , r * c...
public class DocBookBuildUtilities { /** * Get any ids that are referenced by a " link " or " xref " * XML attribute within the node . Any ids that are found * are added to the passes linkIds set . * @ param node The DOM XML node to check for links . * @ param linkIds The set of current found link ids . */ publ...
// If the node is null then there isn ' t anything to find , so just return . if ( node == null ) { return ; } if ( node . getNodeName ( ) . equals ( "xref" ) || node . getNodeName ( ) . equals ( "link" ) ) { final NamedNodeMap attributes = node . getAttributes ( ) ; if ( attributes != null ) { final Node idAttribute =...
public class MainActivity { /** * Install package . */ private void installPackage ( ) { } }
AndPermission . with ( this ) . install ( ) . file ( new File ( Environment . getExternalStorageDirectory ( ) , "android.apk" ) ) . rationale ( new InstallRationale ( ) ) . onGranted ( new Action < File > ( ) { @ Override public void onAction ( File data ) { // Installing . toast ( R . string . successfully ) ; } } ) ....
public class ProfileController { /** * Handle form post for revoking chosen approvals */ @ RequestMapping ( value = "/profile" , method = RequestMethod . POST ) public String post ( @ RequestParam ( required = false ) Collection < String > checkedScopes , @ RequestParam ( required = false ) String update , @ RequestPar...
String userId = getCurrentUserId ( ) ; if ( null != update ) { Map < String , List < DescribedApproval > > approvalsByClientId = getCurrentApprovalsForUser ( userId ) ; List < DescribedApproval > allApprovals = new ArrayList < > ( ) ; for ( List < DescribedApproval > clientApprovals : approvalsByClientId . values ( ) )...
public class AbstractHTTPDestination { /** * Propogate in the message a TLSSessionInfo instance representative * of the TLS - specific information in the HTTP request . * @ param request the Jetty request * @ param message the Message */ private static void propogateSecureSession ( HttpServletRequest request , Me...
final String cipherSuite = ( String ) request . getAttribute ( SSL_CIPHER_SUITE_ATTRIBUTE ) ; if ( cipherSuite != null ) { final java . security . cert . Certificate [ ] certs = ( java . security . cert . Certificate [ ] ) request . getAttribute ( SSL_PEER_CERT_CHAIN_ATTRIBUTE ) ; message . put ( TLSSessionInfo . class...
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link EnvelopeType } { @ code > } * @ param value * Java instance representing xml element ' s value . * @ return * the new instance of { @ link JAXBElement } { @ code < } { @ link EnvelopeType } { @ code > } */ @ Xm...
return new JAXBElement < EnvelopeType > ( _VerticalExtent_QNAME , EnvelopeType . class , null , value ) ;
public class WildCardURL { /** * Gets whether a string matches a wildcard pattern . The following would be considered to be matches : * < code > * pattern somepattern < / code > * < code > pattern * patternsome < / code > * < code > * pattern * somepatternsome < / code > * @ param pattern The pattern to check ,...
boolean match = false ; int length = pattern . length ( ) ; if ( pattern . charAt ( 0 ) == '*' ) { if ( length == 1 ) { match = true ; } else if ( pattern . charAt ( length - 1 ) == '*' && length > 2 && stringToMatch . contains ( pattern . substring ( 1 , length - 3 ) . toLowerCase ( ) ) ) { match = true ; // * match *...
public class TextParameterDataSegment { /** * { @ inheritDoc } */ public final int deserialize ( final ByteBuffer src , final int len ) { } }
if ( len == 0 ) { return 0 ; } clear ( ) ; resizeBuffer ( len , false ) ; return length ;
public class FixedBucketsHistogram { /** * Encode the serialized form generated by toBytes ( ) in Base64 , used as the JSON serialization format . * @ return Base64 serialization */ @ JsonValue public String toBase64 ( ) { } }
byte [ ] asBytes = toBytes ( ) ; return StringUtils . fromUtf8 ( StringUtils . encodeBase64 ( asBytes ) ) ;
public class BuildWithDetails { /** * Update < code > displayName < / code > and the < code > description < / code > of a * build . * @ param displayName The new displayName which should be set . * @ param description The description which should be set . * @ throws IOException in case of errors . */ public Bui...
return updateDisplayNameAndDescription ( displayName , description , false ) ;
public class TKEYRecord { /** * Converts rdata to a String */ String rrToString ( ) { } }
StringBuffer sb = new StringBuffer ( ) ; sb . append ( alg ) ; sb . append ( " " ) ; if ( Options . check ( "multiline" ) ) sb . append ( "(\n\t" ) ; sb . append ( FormattedTime . format ( timeInception ) ) ; sb . append ( " " ) ; sb . append ( FormattedTime . format ( timeExpire ) ) ; sb . append ( " " ) ; sb . append...
public class HandlerEvaluator { /** * Writes a handler entry using the given writer . * @ param writer * the writer used to output the results * @ param uiOwner * the name of the class evaluated here that owns the template * @ param handlerVarName * the name of the handler variable * @ param handlerType ...
// Retrieves the single method ( usually ' onSomething ' ) related to all // handlers . Ex : onClick in ClickHandler , onBlur in BlurHandler . . . JMethod [ ] methods = handlerType . getMethods ( ) ; if ( methods . length != 1 ) { logger . die ( "'%s' has more than one method defined." , handlerType . getName ( ) ) ; }...
public class PriorityQueue { /** * Inserts item x at position k , maintaining heap invariant by demoting x down the tree repeatedly until it is less than or * equal to its children or is a leaf . * @ param k the position to fill * @ param x the item to insert */ @ SuppressWarnings ( "unchecked" ) private void sif...
int half = size >>> 1 ; // loop while a non - leaf while ( k < half ) { int child = ( k << 1 ) + 1 ; // assume left child is least E c = ( E ) queue [ child ] ; int right = child + 1 ; if ( right < size && c . compareTo ( ( E ) queue [ right ] ) > 0 ) c = ( E ) queue [ child = right ] ; if ( x . compareTo ( c ) <= 0 ) ...
public class AsperaTransferManager { /** * List all files within the folder to exclude all subdirectories & modify the transfer spec to * pass onto Aspera SDK * @ param directory * @ param transferSpecs */ public void excludeSubdirectories ( File directory , TransferSpecs transferSpecs ) { } }
if ( directory == null || ! directory . exists ( ) || ! directory . isDirectory ( ) ) { throw new IllegalArgumentException ( "Must provide a directory to upload" ) ; } List < File > files = new LinkedList < File > ( ) ; listFiles ( directory , files ) ; for ( TransferSpec transferSpec : transferSpecs . transfer_specs )...
public class PublicanPODocBookBuilder { /** * Builds the POT / PO files for a topic . * @ param buildData Information and data structures for the build . * @ param specTopic The spec topic to create the POT / PO files for . * @ param filePathAndName The path and filename for the topic relative to the locale direc...
if ( specTopic != null ) { final Map < String , TranslationDetails > translations = new LinkedHashMap < String , TranslationDetails > ( ) ; addStringsForTopic ( buildData , specTopic , translations ) ; createPOFile ( buildData , filePathAndName , translations ) ; }
public class ArbitrateCommmunicationClient { /** * 指定对应的Node节点 , 进行event调用 */ public Object call ( Long nid , final Event event ) { } }
return delegate . call ( convertToAddress ( nid ) , event ) ;
public class Grep { /** * singleton */ public int run ( String [ ] args ) throws Exception { } }
if ( args . length < 3 ) { System . out . println ( "Grep <inDir> <outDir> <regex> [<group>]" ) ; ToolRunner . printGenericCommandUsage ( System . out ) ; return - 1 ; } Path tempDir = new Path ( "grep-temp-" + Integer . toString ( new Random ( ) . nextInt ( Integer . MAX_VALUE ) ) ) ; JobConf grepJob = new JobConf ( g...
public class CPDefinitionOptionValueRelLocalServiceBaseImpl { /** * Returns the cp definition option value rel matching the UUID and group . * @ param uuid the cp definition option value rel ' s UUID * @ param groupId the primary key of the group * @ return the matching cp definition option value rel * @ throws...
return cpDefinitionOptionValueRelPersistence . findByUUID_G ( uuid , groupId ) ;
public class Math { /** * Raise each element of an array to a scalar power . * @ param x array * @ param n scalar exponent * @ return x < sup > n < / sup > */ public static double [ ] pow ( double [ ] x , double n ) { } }
double [ ] array = new double [ x . length ] ; for ( int i = 0 ; i < x . length ; i ++ ) { array [ i ] = Math . pow ( x [ i ] , n ) ; } return array ;
public class SimpleGenerator { /** * Returns the next generated entity . * @ return the next generated entity . * @ throws java . util . NoSuchElementException if the iteration has no more elements . */ @ Override public Object next ( ) { } }
quantity -- ; try { return generatedClass . newInstance ( ) ; } catch ( Exception e ) { throw new RuntimeException ( e ) ; }
public class NearestVertexOfIntersection { /** * Execute the snap operation . * @ param coordinate The original location . * @ param distance The maximum distance allowed for snapping . * @ return The new location . If no snapping target was found , this may return the original location . */ public Coordinate sna...
// Some initialization : calculatedDistance = distance ; hasSnapped = false ; Coordinate snappingPoint = coordinate ; // Go over all geometries and consider only the intersecting ones : for ( Geometry geometry : geometries ) { if ( MathService . isWithin ( geometry , coordinate ) ) { NearestVertexSnapAlgorithm nearestV...
public class CDKMCS { /** * This makes atom map of matching atoms out of atom map of matching bonds as produced by the get ( Subgraph | Ismorphism ) Map methods . * @ param list The list produced by the getMap method . * @ param sourceGraph first molecule . Must not be an IQueryAtomContainer . * @ param targetGra...
if ( list == null ) { return ( list ) ; } List < CDKRMap > result = new ArrayList < CDKRMap > ( ) ; for ( int i = 0 ; i < list . size ( ) ; i ++ ) { IBond bond1 = sourceGraph . getBond ( list . get ( i ) . getId1 ( ) ) ; IBond bond2 = targetGraph . getBond ( list . get ( i ) . getId2 ( ) ) ; IAtom [ ] atom1 = BondManip...
public class ExponentialBackOff { /** * Returns a random value from the interval [ randomizationFactor * currentInterval , * randomizationFactor * currentInterval ] . */ static int getRandomValueFromInterval ( double randomizationFactor , double random , int currentIntervalMillis ) { } }
double delta = randomizationFactor * currentIntervalMillis ; double minInterval = currentIntervalMillis - delta ; double maxInterval = currentIntervalMillis + delta ; // Get a random value from the range [ minInterval , maxInterval ] . // The formula used below has a + 1 because if the minInterval is 1 and the maxInter...
public class CollectionUtils { /** * Shuffles the elements in the { @ link List } . This method guarantees a random , uniform shuffling of the elements * in the { @ link List } with an operational efficiency of O ( n ) . * @ param < T > Class type of the elements in the { @ link List } . * @ param list { @ link L...
if ( isNotEmpty ( list ) ) { Random random = new Random ( System . currentTimeMillis ( ) ) ; for ( int index = 0 , sizeMinusOne = nullSafeSize ( list ) - 1 ; index < sizeMinusOne ; index ++ ) { int randomIndex = ( random . nextInt ( sizeMinusOne - index ) + 1 ) ; Collections . swap ( list , index , index + randomIndex ...
public class AstUtil { /** * Return true only if the MethodCallExpression represents a method call for the specified method name * @ param methodCall - the AST MethodCallExpression * @ param methodNamePattern - the expected name of the method being called * @ param numArguments - The number of expected arguments ...
Expression method = methodCall . getMethod ( ) ; // ! important : performance enhancement boolean IS_NAME_MATCH = false ; if ( method instanceof ConstantExpression ) { if ( ( ( ConstantExpression ) method ) . getValue ( ) instanceof String ) { IS_NAME_MATCH = ( ( String ) ( ( ConstantExpression ) method ) . getValue ( ...
public class ResourceMethodContentAnalyzer { /** * Analyzes the method ( including own project methods ) . * @ param methodResult The method result */ void analyze ( final MethodResult methodResult ) { } }
lock . lock ( ) ; try { buildPackagePrefix ( methodResult . getParentResource ( ) . getOriginalClass ( ) ) ; final List < Instruction > visitedInstructions = interpretRelevantInstructions ( methodResult . getInstructions ( ) ) ; // find project defined methods in invoke occurrences final Set < ProjectMethod > projectMe...
public class MinimizeEnergyPrune { /** * Look for two corners which point to the same point and removes one of them from the corner list */ void removeDuplicates ( GrowQueue_I32 corners ) { } }
// remove duplicates for ( int i = 0 ; i < corners . size ( ) ; i ++ ) { Point2D_I32 a = contour . get ( corners . get ( i ) ) ; // start from the top so that removing a corner doesn ' t mess with the for loop for ( int j = corners . size ( ) - 1 ; j > i ; j -- ) { Point2D_I32 b = contour . get ( corners . get ( j ) ) ...
public class RESTMBeanServerConnection { /** * { @ inheritDoc } */ @ Override public ObjectInstance createMBean ( String className , ObjectName name ) throws ReflectionException , InstanceAlreadyExistsException , MBeanRegistrationException , MBeanException , NotCompliantMBeanException , IOException { } }
try { return createMBean ( className , name , null , null , null , false , false ) ; } catch ( InstanceNotFoundException inf ) { throw new IOException ( inf ) ; // Should never happen }
public class AbstractClient { /** * { @ inheritDoc } */ @ Override public Client language ( String language ) { } }
state . getRequestHeaders ( ) . putSingle ( HttpHeaders . CONTENT_LANGUAGE , language ) ; return this ;
public class JsonObject { /** * Returns true if this object has no mapping for { @ code name } or if it has * a mapping whose value is { @ link JsonNull } . */ public boolean isNull ( String name ) { } }
JsonElement value = nameValuePairs . get ( name ) ; return value . isNull ( ) ;
public class JobHistoryFileParserHadoop2 { /** * gets the int values as ints or longs some keys in 2.0 are now int , they were longs in 1.0 this * will maintain compatiblity between 1.0 and 2.0 by casting those ints to long * keeping this function package level visible ( unit testing ) * @ throws IllegalArgumentE...
byte [ ] valueBytes = null ; Class < ? > clazz = JobHistoryKeys . KEY_TYPES . get ( JobHistoryKeys . valueOf ( key ) ) ; if ( clazz == null ) { throw new IllegalArgumentException ( " unknown key " + key + " encountered while parsing " + this . jobKey ) ; } if ( Long . class . equals ( clazz ) ) { valueBytes = ( value !...
public class CustomerAccountUrl { /** * Get Resource Url for ChangePassword * @ param accountId Unique identifier of the customer account . * @ param unlockAccount Specifies whether to unlock the specified customer account . * @ param userId Unique identifier of the user whose tenant scopes you want to retrieve ....
UrlFormatter formatter = new UrlFormatter ( "/api/commerce/customer/accounts/{accountId}/Change-Password?unlockAccount={unlockAccount}&userId={userId}" ) ; formatter . formatUrl ( "accountId" , accountId ) ; formatter . formatUrl ( "unlockAccount" , unlockAccount ) ; formatter . formatUrl ( "userId" , userId ) ; return...
public class MultiTable { /** * Delete this record ( Always called from the record class ) . * Always override this method . * @ exception DBException File exception . */ public void remove ( ) throws DBException { } }
this . syncCurrentToBase ( ) ; boolean [ ] rgbListenerState = this . getRecord ( ) . setEnableListeners ( false ) ; this . getRecord ( ) . handleRecordChange ( DBConstants . DELETE_TYPE ) ; // Fake the call for the grid table this . getRecord ( ) . setEnableListeners ( rgbListenerState ) ; super . remove ( ) ; this . s...
public class HttpNeo4jSequenceGenerator { /** * Adds a node for each generator of type { @ link IdSourceType # SEQUENCE } . Table - based generators are created lazily * at runtime . * @ param sequences the generators to process */ private Statements createSequencesStatements ( Iterable < Sequence > sequences ) { }...
Statements statements = new Statements ( ) ; for ( Sequence sequence : sequences ) { addSequence ( statements , sequence ) ; } return statements ;
public class RestoreManagerImpl { /** * / * ( non - Javadoc ) * @ see org . duracloud . snapshot . bridge . service . RestorationManager # getStatus ( java . lang . String ) */ @ Override public Restoration get ( String restorationId ) throws RestorationNotFoundException { } }
Restoration restoration = this . restoreRepo . findByRestorationId ( restorationId ) ; if ( restoration == null ) { log . debug ( "Restoration returned null for {}. Throwing exception..." , restorationId ) ; throw new RestorationNotFoundException ( restorationId ) ; } log . debug ( "got restoration {}" , restoration ) ...
public class UserClient { /** * Add friends to username * @ param username Necessary * @ param users username to be add * @ return No content * @ throws APIConnectionException connect exception * @ throws APIRequestException request exception */ public ResponseWrapper addFriends ( String username , String ......
StringUtils . checkUsername ( username ) ; Preconditions . checkArgument ( null != users && users . length > 0 , "friend list should not be empty" ) ; JsonArray array = new JsonArray ( ) ; for ( String user : users ) { array . add ( new JsonPrimitive ( user ) ) ; } return _httpClient . sendPost ( _baseUrl + userPath + ...
public class OcelotServices { /** * Unsubscribe to topic * @ param topic * @ param session * @ return */ @ JsTopic @ WsDataService public Integer unsubscribe ( @ JsTopicName ( prefix = Constants . Topic . SUBSCRIBERS ) String topic , Session session ) { } }
return topicManager . unregisterTopicSession ( topic , session ) ;
public class Compiler { /** * Checks whether the compilation has been canceled and reports the given work increment to the compiler progress . */ protected void reportWorked ( int workIncrement , int currentUnitIndex ) { } }
if ( this . progress != null ) { if ( this . progress . isCanceled ( ) ) { // Only AbortCompilation can stop the compiler cleanly . // We check cancellation again following the call to compile . throw new AbortCompilation ( true , null ) ; } this . progress . worked ( workIncrement , ( this . totalUnits * this . remain...
public class VimGenerator2 { /** * Generate the preamble of the Vim style . * @ param it the receiver of the generated elements . */ protected void generatePreamble ( IStyleAppendable it ) { } }
clearHilights ( ) ; final String nm = getLanguageSimpleName ( ) . toLowerCase ( ) ; final String cmd = Strings . toFirstUpper ( getLanguageSimpleName ( ) . toLowerCase ( ) ) + "HiLink" ; // $ NON - NLS - 1 $ appendComment ( it , "Quit when a syntax file was already loaded" ) ; // $ NON - NLS - 1 $ appendCmd ( it , fals...
public class AbstractTreeWriter { /** * Add each level of the class tree . For each sub - class or * sub - interface indents the next level information . * Recurses itself to add sub - classes info . * @ param parent the superclass or superinterface of the sset * @ param collection a collection of the sub - cla...
if ( ! collection . isEmpty ( ) ) { Content ul = new HtmlTree ( HtmlTag . UL ) ; for ( TypeElement local : collection ) { HtmlTree li = new HtmlTree ( HtmlTag . LI ) ; li . addStyle ( HtmlStyle . circle ) ; addPartialInfo ( local , li ) ; addExtendsImplements ( parent , local , li ) ; addLevelInfo ( local , classtree ....
public class DependencyFinder { /** * Parses the named class from the given archive and * returns all target locations the named class references . */ public Set < Location > parse ( Archive archive , String name ) { } }
try { return parse ( archive , CLASS_FINDER , name ) ; } catch ( IOException e ) { throw new UncheckedIOException ( e ) ; }
public class LifeExpectancyProcessor { /** * Helper method that finds the first value of a time - valued property ( if * any ) , and extracts an integer year . It checks if the value has sufficient * precision to extract an exact year . * @ param document * the document to extract the data from * @ param prop...
TimeValue date = document . findStatementTimeValue ( propertyId ) ; if ( date != null && date . getPrecision ( ) >= TimeValue . PREC_YEAR ) { return ( int ) date . getYear ( ) ; } else { return Integer . MIN_VALUE ; }
public class FanInGraph { /** * Srikant & Sachin */ @ Deprecated public Collection < MaterialRevision > computeRevisionsForReporting ( CaseInsensitiveString pipelineName , PipelineTimeline pipelineTimeline ) { } }
Pair < List < RootFanInNode > , List < DependencyFanInNode > > scmAndDepMaterialsChildren = getScmAndDepMaterialsChildren ( ) ; List < RootFanInNode > scmChildren = scmAndDepMaterialsChildren . first ( ) ; List < DependencyFanInNode > depChildren = scmAndDepMaterialsChildren . last ( ) ; if ( depChildren . isEmpty ( ) ...
public class BookKeeperLogFactory { /** * region Initialization */ private BookKeeper startBookKeeperClient ( ) throws Exception { } }
// These two are in Seconds , not Millis . int writeTimeout = ( int ) Math . ceil ( this . config . getBkWriteTimeoutMillis ( ) / 1000.0 ) ; int readTimeout = ( int ) Math . ceil ( this . config . getBkReadTimeoutMillis ( ) / 1000.0 ) ; ClientConfiguration config = new ClientConfiguration ( ) . setClientTcpNoDelay ( tr...
public class ReactorRateLimiterAspectExt { /** * handle the Spring web flux ( Flux / Mono ) return types AOP based into reactor rate limiter * See { @ link RateLimiter } for details . * @ param proceedingJoinPoint Spring AOP proceedingJoinPoint * @ param rateLimiter the configured rateLimiter * @ param methodNa...
Object returnValue = proceedingJoinPoint . proceed ( ) ; if ( Flux . class . isAssignableFrom ( returnValue . getClass ( ) ) ) { Flux < ? > fluxReturnValue = ( Flux < ? > ) returnValue ; return fluxReturnValue . transform ( RateLimiterOperator . of ( rateLimiter , Schedulers . immediate ( ) ) ) ; } else if ( Mono . cla...
public class OrderAwarePluginRegistry { /** * Creates a new { @ link OrderAwarePluginRegistry } with the given plugins . * @ param plugins * @ return * @ since 2.0 */ public static < S , T extends Plugin < S > > OrderAwarePluginRegistry < T , S > of ( List < ? extends T > plugins , Comparator < ? super T > compar...
Assert . notNull ( plugins , "Plugins must not be null!" ) ; Assert . notNull ( comparator , "Comparator must not be null!" ) ; return new OrderAwarePluginRegistry < > ( plugins , comparator ) ;
public class HTMLRenderingUtils { /** * Renders a < code > SimpleHTMLTag < / code > as HTML * @ param tag Single tag * @ return HTML */ public static String render ( SimpleHTMLTag tag ) { } }
List < SimpleHTMLTag > tags = new ArrayList < > ( ) ; tags . add ( tag ) ; HTMLRenderer renderer = new HTMLRenderer ( tags ) ; return renderer . render ( ) ;
public class XMLChar { /** * Returns true if the encoding name is a valid Java encoding . * This method does not verify that there is a decoder available * for this encoding , only that the characters are valid for an * Java encoding name . * @ param javaEncoding The Java encoding name . */ public static boolea...
if ( javaEncoding != null ) { int length = javaEncoding . length ( ) ; if ( length > 0 ) { for ( int i = 1 ; i < length ; i ++ ) { char c = javaEncoding . charAt ( i ) ; if ( ( c < 'A' || c > 'Z' ) && ( c < 'a' || c > 'z' ) && ( c < '0' || c > '9' ) && c != '.' && c != '_' && c != '-' ) { return false ; } } return true...
public class AmazonConnectClient { /** * Updates the phone configuration settings in the < code > UserPhoneConfig < / code > object for the specified user . * @ param updateUserPhoneConfigRequest * @ return Result of the UpdateUserPhoneConfig operation returned by the service . * @ throws InvalidRequestException ...
request = beforeClientExecution ( request ) ; return executeUpdateUserPhoneConfig ( request ) ;
public class CmsScrollPanelImpl { /** * Hide the native scrollbars . We call this after attaching to ensure that we * inherit the direction ( rtl or ltr ) . */ private void hideNativeScrollbars ( ) { } }
m_nativeScrollbarWidth = AbstractNativeScrollbar . getNativeScrollbarWidth ( ) ; getScrollableElement ( ) . getStyle ( ) . setMarginRight ( - ( m_nativeScrollbarWidth + 10 ) , Unit . PX ) ;
public class KeyUtil { /** * 读取X . 509 Certification文件 < br > * Certification为证书文件 < br > * see : http : / / snowolf . iteye . com / blog / 391931 * @ param in { @ link InputStream } 如果想从文件读取 . cer文件 , 使用 { @ link FileUtil # getInputStream ( java . io . File ) } 读取 * @ param password 密码 * @ param alias 别名 *...
return readCertificate ( X509 , in , password , alias ) ;
public class LabeledStatement { /** * Sets label list , setting the parent of each label * in the list . Replaces any existing labels . * @ throws IllegalArgumentException } if labels is { @ code null } */ public void setLabels ( List < Label > labels ) { } }
assertNotNull ( labels ) ; if ( this . labels != null ) this . labels . clear ( ) ; for ( Label l : labels ) { addLabel ( l ) ; }
public class Integrator { /** * Merge plugin configuration files . */ private void mergePlugins ( ) { } }
final Element root = pluginsDoc . createElement ( ELEM_PLUGINS ) ; pluginsDoc . appendChild ( root ) ; if ( ! descSet . isEmpty ( ) ) { final URI b = new File ( ditaDir , CONFIG_DIR + File . separator + "plugins.xml" ) . toURI ( ) ; for ( final File descFile : descSet ) { logger . debug ( "Read plug-in configuration " ...
public class SparseVector { /** * end constructor */ public Node [ ] toArray ( ) { } }
// logger . info ( " count " + count ) ; Node [ ] array = new Node [ count ] ; int i = 0 ; // System . out . print ( " node : " ) ; Iterator it = iterator ( ) ; while ( it . hasNext ( ) ) { Entry e = ( Entry ) it . next ( ) ; // System . out . print ( " " + e . getIndex ( ) ) ; array [ i ] = new Node ( ) ; array [ i ] ...
public class RGroupQuery { /** * Maps the distribution of an R - group to all possible substitute combinations . * This is best illustrated by an example . < br > * Say R2 occurs twice in the root , and has condition > 0 . So a valid * output configuration can have either one or two substitutes . * The distribu...
if ( listOffset == distribution . length ) { List < RGroup > mapped = new ArrayList < RGroup > ( ) ; for ( RGroup rgrp : mapping ) mapped . add ( rgrp ) ; result . add ( mapped ) ; } else { if ( distribution [ listOffset ] == 0 ) { mapping [ listOffset ] = null ; mapSubstitutes ( rgpList , listOffset + 1 , distribution...
public class ApiOvhDedicatedCloud { /** * Change option user access properties * REST : POST / dedicatedCloud / { serviceName } / vmEncryption / kms / { kmsId } / changeProperties * @ param sslThumbprint [ required ] SSL thumbprint of the remote service , e . g . A7:61:68 : . . . : 61:91:2F * @ param description ...
String qPath = "/dedicatedCloud/{serviceName}/vmEncryption/kms/{kmsId}/changeProperties" ; StringBuilder sb = path ( qPath , serviceName , kmsId ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "description" , description ) ; addBody ( o , "sslThumbprint" , sslThumbprint ) ; Strin...
public class RebootManager { /** * Composes the given reboot message with the minutes and either the custom or standard details * about the pending reboot . */ protected String getRebootMessage ( String key , int minutes ) { } }
String msg = getCustomRebootMessage ( ) ; if ( StringUtil . isBlank ( msg ) ) { msg = "m.reboot_msg_standard" ; } return MessageBundle . compose ( key , MessageBundle . taint ( "" + minutes ) , msg ) ;
public class CommerceTaxFixedRateLocalServiceWrapper { /** * Returns the commerce tax fixed rate with the primary key . * @ param commerceTaxFixedRateId the primary key of the commerce tax fixed rate * @ return the commerce tax fixed rate * @ throws PortalException if a commerce tax fixed rate with the primary ke...
return _commerceTaxFixedRateLocalService . getCommerceTaxFixedRate ( commerceTaxFixedRateId ) ;
public class TreeRule { /** * Parses a string into a rule type enumerator * @ param type The string to parse * @ return The type enumerator * @ throws IllegalArgumentException if the type was empty or invalid */ public static TreeRuleType stringToType ( final String type ) { } }
if ( type == null || type . isEmpty ( ) ) { throw new IllegalArgumentException ( "Rule type was empty" ) ; } else if ( type . toLowerCase ( ) . equals ( "metric" ) ) { return TreeRuleType . METRIC ; } else if ( type . toLowerCase ( ) . equals ( "metric_custom" ) ) { return TreeRuleType . METRIC_CUSTOM ; } else if ( typ...
public class DataCenterFilter { /** * { @ inheritDoc } */ @ Override public DataCenterFilter and ( DataCenterFilter otherFilter ) { } }
notNull ( otherFilter , "Other filter must be not a null" ) ; return new DataCenterFilter ( getPredicate ( ) . and ( otherFilter . getPredicate ( ) ) ) ;
public class TcpIpNetworkingService { /** * Returns the respective endpoint manager based on the qualifier . * Under unified endpoint environments , this will return the respective view of the { @ link TcpIpUnifiedEndpointManager } * eg . { @ link MemberViewUnifiedEndpointManager } or { @ link ClientViewUnifiedEndp...
EndpointManager < TcpIpConnection > mgr = endpointManagers . get ( qualifier ) ; if ( mgr == null ) { logger . finest ( "An endpoint manager for qualifier " + qualifier + " was never registered." ) ; } return mgr ;
public class UnicodeFormatter { /** * 转换 & # 123 ; 这种编码为正常字符 * 有些手机会将中文转换成 & # 123 ; 这种编码 , 这个函数主要用来转换成正常字符 . * @ param str 待转换字符 * @ return String */ public static String decodeNetUnicodeString ( String str ) { } }
if ( Strings . isNullOrEmpty ( str ) ) return str ; Matcher m = NET_UNICODE_PATTERN . matcher ( str ) ; StringBuffer sb = new StringBuffer ( ) ; while ( m . find ( ) ) { String mcStr = m . group ( 1 ) ; int charValue = toInt ( mcStr , - 1 ) ; String s = charValue > 0 ? String . valueOf ( charValue ) : "" ; m . appendRe...
public class AbstractVectorModel { /** * 获取与向量最相似的词语 * @ param vector 向量 * @ param size topN个 * @ return 键值对列表 , 键是相似词语 , 值是相似度 , 按相似度降序排列 */ public List < Map . Entry < K , Float > > nearest ( Vector vector , int size ) { } }
MaxHeap < Map . Entry < K , Float > > maxHeap = new MaxHeap < Map . Entry < K , Float > > ( size , new Comparator < Map . Entry < K , Float > > ( ) { @ Override public int compare ( Map . Entry < K , Float > o1 , Map . Entry < K , Float > o2 ) { return o1 . getValue ( ) . compareTo ( o2 . getValue ( ) ) ; } } ) ; for (...
public class SrvDatabase { /** * < p > Convert org . beigesoft . orm . model . ColumnsValues * to android . content . ContentValues . < / p > * @ param pColumnsVals Columns Values * @ param pIns if insert , update otherwise * @ return ContentValues */ public final ContentValues convertToContentValues ( final Co...
ContentValues contentValues = new ContentValues ( ) ; ColumnsValues cv = filterCv ( pColumnsVals , pIns ) ; for ( Map . Entry < String , Integer > entry : cv . getIntegersMap ( ) . entrySet ( ) ) { contentValues . put ( entry . getKey ( ) . toUpperCase ( ) , entry . getValue ( ) ) ; } for ( Map . Entry < String , Long ...
public class UUID { /** * 从一个 UU64 恢复回一个 UUID 对象 * @ param uu64 64进制表示的 UUID , 内容为 [ \ \ - 0-9a - zA - Z _ ] * @ return UUID 对象 */ public static java . util . UUID fromUU64 ( String uu64 ) { } }
String uu16 = UU16FromUU64 ( uu64 ) ; return java . util . UUID . fromString ( UU ( uu16 ) ) ;
public class RichTextUtil { /** * Rewrites all children / sub - tree of the given parent element . * For rewrite operations the given rewrite content handler is called . * @ param parent Parent element * @ param rewriteContentHandler Rewrite content handler */ public static void rewriteContent ( @ NotNull Element...
// iterate through content list and build new content list List < Content > originalContent = parent . getContent ( ) ; List < Content > newContent = new ArrayList < Content > ( ) ; for ( Content contentElement : originalContent ) { // handle element if ( contentElement instanceof Element ) { Element element = ( Elemen...
public class CmsJspTagContainer { /** * Resets the tag instance and standard context state . < p > */ private void resetState ( ) { } }
// clear all members so the tag object may be reused m_type = null ; m_name = null ; m_param = null ; m_maxElements = null ; m_tag = null ; m_tagClass = null ; m_detailView = false ; m_detailOnly = false ; m_width = null ; m_editableBy = null ; m_bodyContent = null ; m_hasModelGroupAncestor = false ; // reset the curre...
public class TaxinvoiceServiceImp { /** * ( non - Javadoc ) * @ see com . popbill . api . TaxinvoiceService # getMailURL ( java . lang . String , com . popbill . api . taxinvoice . MgtKeyType , java . lang . String ) */ @ Override public String getMailURL ( String CorpNum , MgtKeyType KeyType , String MgtKey ) throws...
if ( KeyType == null ) throw new PopbillException ( - 99999999 , "관리번호형태가 입력되지 않았습니다." ) ; if ( MgtKey == null || MgtKey . isEmpty ( ) ) throw new PopbillException ( - 99999999 , "관리번호가 입력되지 않았습니다." ) ; return getMailURL ( CorpNum , KeyType , MgtKey , null ) ;
public class PrimitiveCastExtensions { /** * Decodes a { @ code CharSequence } into a { @ code AtomicDouble } . * < p > In opposite to the functions of { @ link Double } , this function is * null - safe and does not generate a { @ link NumberFormatException } . * If the given string cannot by parsed , { @ code 0 ...
AtomicDouble . class , PrimitiveCastExtensions . class } ) public static AtomicDouble toAtomicDouble ( CharSequence value ) { return new AtomicDouble ( doubleValue ( value ) ) ;
public class JobScheduleOperations { /** * Adds a job schedule to the Batch account . * @ param jobSchedule The job schedule to be added . * @ param additionalBehaviors A collection of { @ link BatchClientBehavior } instances that are applied to the Batch service request . * @ throws BatchErrorException Exception...
JobScheduleAddOptions options = new JobScheduleAddOptions ( ) ; BehaviorManager bhMgr = new BehaviorManager ( this . customBehaviors ( ) , additionalBehaviors ) ; bhMgr . applyRequestBehaviors ( options ) ; this . parentBatchClient . protocolLayer ( ) . jobSchedules ( ) . add ( jobSchedule , options ) ;
public class StringContext { /** * Finds the index of the first occurrence of the given search string in * the source string , or - 1 if not found . * @ param str the source string * @ param search the string to search for * @ return the start index of the found string or - 1 if not found */ public int findFirs...
return ( str == null || search == null ) ? - 1 : str . indexOf ( search ) ;
public class ListSigningPlatformsResult { /** * A list of all platforms that match the request parameters . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setPlatforms ( java . util . Collection ) } or { @ link # withPlatforms ( java . util . Collection ) } ...
if ( this . platforms == null ) { setPlatforms ( new java . util . ArrayList < SigningPlatform > ( platforms . length ) ) ; } for ( SigningPlatform ele : platforms ) { this . platforms . add ( ele ) ; } return this ;
public class EvaluationMarshaller { /** * Marshall the given parameter object . */ public void marshall ( Evaluation evaluation , ProtocolMarshaller protocolMarshaller ) { } }
if ( evaluation == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( evaluation . getEvaluationId ( ) , EVALUATIONID_BINDING ) ; protocolMarshaller . marshall ( evaluation . getMLModelId ( ) , MLMODELID_BINDING ) ; protocolMarshaller . marshal...
public class Javalin { /** * Adds a lambda handler for a Server Sent Event connection on the specified path . */ public Javalin sse ( @ NotNull String path , @ NotNull Consumer < SseClient > client ) { } }
return sse ( path , client , new HashSet < > ( ) ) ;
public class PyCodeBuilder { /** * Add a single PyExpr object to the output variable . */ void addToOutputVar ( PyExpr pyExpr ) { } }
boolean isList = pyExpr instanceof PyListExpr ; if ( isList && ! getOutputVarIsInited ( ) ) { appendLine ( getOutputVarName ( ) , " = " , pyExpr . getText ( ) ) ; } else { initOutputVarIfNecessary ( ) ; String function = isList ? ".extend(" : ".append(" ; appendLine ( getOutputVarName ( ) , function , pyExpr . getText ...
public class NorthArrowGraphic { /** * Renders a given graphic into a new image , scaled to fit the new size and rotated . */ private static URI createRaster ( final Dimension targetSize , final RasterReference rasterReference , final Double rotation , final Color backgroundColor , final File workingDir ) throws IOExce...
final File path = File . createTempFile ( "north-arrow-" , ".png" , workingDir ) ; final BufferedImage newImage = new BufferedImage ( targetSize . width , targetSize . height , BufferedImage . TYPE_4BYTE_ABGR ) ; final Graphics2D graphics2d = newImage . createGraphics ( ) ; try { final BufferedImage originalImage = Ima...