signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class EstimateKeywordTraffic { /** * Runs the example .
* @ param adWordsServices the services factory .
* @ param session the session .
* @ throws ApiException if the API request failed with one or more service errors .
* @ throws RemoteException if the API request failed due to other errors . */
public... | // Get the TrafficEstimatorService .
TrafficEstimatorServiceInterface trafficEstimatorService = adWordsServices . get ( session , TrafficEstimatorServiceInterface . class ) ; // Create keywords . Refer to the TrafficEstimatorService documentation for the maximum
// number of keywords that can be passed in a single requ... |
public class TableRef { /** * Attach a listener to run every time the eventType occurs .
* < pre >
* StorageRef storage = new StorageRef ( " your _ app _ key " , " your _ token " ) ;
* TableRef tableRef = storage . table ( " your _ table " ) ;
* / / Add an update listener
* tableRef . on ( StorageRef . Storag... | return on ( eventType , onItemSnapshot , null ) ; |
public class AbstractSQLInsertClause { /** * Populate the INSERT clause with the properties of the given bean using
* the given Mapper .
* @ param obj object to use for population
* @ param mapper mapper to use
* @ return the current object */
@ SuppressWarnings ( "rawtypes" ) @ WithBridgeMethods ( value = SQLI... | Map < Path < ? > , Object > values = mapper . createMap ( entity , obj ) ; for ( Map . Entry < Path < ? > , Object > entry : values . entrySet ( ) ) { set ( ( Path ) entry . getKey ( ) , entry . getValue ( ) ) ; } return ( C ) this ; |
public class PoolDeleteOptions { /** * Set a timestamp indicating the last modified time of the resource known to the client . The operation will be performed only if the resource on the service has been modified since the specified time .
* @ param ifModifiedSince the ifModifiedSince value to set
* @ return the Po... | if ( ifModifiedSince == null ) { this . ifModifiedSince = null ; } else { this . ifModifiedSince = new DateTimeRfc1123 ( ifModifiedSince ) ; } return this ; |
public class UpdateSubscriptionDefinitionRequestMarshaller { /** * Marshall the given parameter object . */
public void marshall ( UpdateSubscriptionDefinitionRequest updateSubscriptionDefinitionRequest , ProtocolMarshaller protocolMarshaller ) { } } | if ( updateSubscriptionDefinitionRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( updateSubscriptionDefinitionRequest . getName ( ) , NAME_BINDING ) ; protocolMarshaller . marshall ( updateSubscriptionDefinitionRequest . getSubscri... |
public class GitRepo { /** * This can be done recursively but will result in { @ link StackOverflowError } for large repos . */
private void populateComitPerTag ( final RevCommit from , final ObjectId to , final Map < String , Ref > tagPerCommitHash , final Map < String , String > tagPerCommitsHash , final Map < String... | final Set < TraversalWork > moreWork = populateCommitPerTag ( from , to , commitsPerTag , tagPerCommitHash , tagPerCommitsHash , datePerTag , startingTagName ) ; do { final Set < TraversalWork > evenMoreWork = newTreeSet ( ) ; for ( final TraversalWork tw : newArrayList ( moreWork ) ) { moreWork . remove ( tw ) ; final... |
public class From { /** * Creates and chains a Joins object for specifying the JOIN clause of the query .
* @ param joins The Join objects .
* @ return The Joins object that represents the JOIN clause of the query . */
@ NonNull @ Override public Joins join ( @ NonNull Join ... joins ) { } } | if ( joins == null ) { throw new IllegalArgumentException ( "joins cannot be null." ) ; } return new Joins ( this , Arrays . asList ( joins ) ) ; |
public class ClasspathUtility { /** * Search all files that match the given Regex pattern .
* @ param classpathEntryPath the root folder used for search
* @ param searchPattern the regex pattern used as a filter
* @ param cachedJar is a jar cached by Java Webstart without any extension
* @ return list of resour... | final List < String > resources = new ArrayList < > ( ) ; // System . out . println ( " Search into " + classpathEntryPath ) ;
final File classpathEntryFile = new File ( classpathEntryPath ) ; // The classpath entry could be a jar or a folder
if ( classpathEntryFile . isDirectory ( ) ) { // Browse the folder content
re... |
public class Workbench { /** * Adds a nonempty , not acquired workbench entry to the workbench .
* @ param entry a nonempty , not acquired workbench entry . */
public void add ( WorkbenchEntry entry ) { } } | assert ! entry . isEmpty ( ) : entry ; assert ! entry . acquired : entry ; entries . add ( entry ) ; approximatedSize . incrementAndGet ( ) ; |
public class HelloSignClient { /** * Refreshes the OauthData for this client with the provided refresh token .
* @ param refreshToken String
* @ return OauthData new OAuthData returned from HelloSign
* @ throws HelloSignException thrown if there ' s a problem processing the
* HTTP request or the JSON response .... | OauthData data = new OauthData ( httpClient . withAuth ( auth ) . withPostField ( OAUTH_GRANT_TYPE , OAUTH_GRANT_TYPE_REFRESH_TOKEN ) . withPostField ( OAUTH_REFRESH_TOKEN , refreshToken ) . post ( OAUTH_TOKEN_URL ) . asJson ( ) ) ; if ( data != null ) { setAccessToken ( data . getAccessToken ( ) , data . getTokenType ... |
public class HttpDateFormatImpl { /** * Get access to the format wrapper class that is local to this particular
* worker thread .
* < br >
* @ return HttpLocalFormat */
private HttpLocalFormat getFormat ( ) { } } | HttpLocalFormat format = threadStorage . get ( ) ; if ( null == format ) { format = new HttpLocalFormat ( ) ; threadStorage . set ( format ) ; } return format ; |
public class UserApi { /** * Creates a GitLabApiForm instance that will optionally include the
* with _ custom _ attributes query param if enabled .
* @ return a GitLabApiForm instance that will optionally include the
* with _ custom _ attributes query param if enabled */
private GitLabApiForm createGitLabApiForm... | GitLabApiForm formData = new GitLabApiForm ( ) ; return ( customAttributesEnabled ? formData . withParam ( "with_custom_attributes" , true ) : formData ) ; |
public class BruteForceInferencer { /** * Gets the product of all the factors in the factor graph . If working in
* the log - domain , this will do factor addition .
* @ return The product of all the factors . */
private static VarTensor getProductOfAllFactors ( FactorGraph fg , Algebra s ) { } } | VarTensor joint = new VarTensor ( s , new VarSet ( ) , s . one ( ) ) ; for ( int a = 0 ; a < fg . getNumFactors ( ) ; a ++ ) { Factor f = fg . getFactor ( a ) ; VarTensor factor = safeNewVarTensor ( s , f ) ; assert ! factor . containsBadValues ( ) : factor ; joint . prod ( factor ) ; } return joint ; |
public class Trigger { /** * Sets the inertia associated with the trigger in milliseconds .
* @ param inertiaMillis The inertia associated with the trigger in milliseconds . Cannot be null or negative . */
public void setInertia ( Long inertiaMillis ) { } } | if ( this . alert == null ) { // Only during deserialization .
this . inertia = inertiaMillis ; } else { requireArgument ( inertiaMillis != null && inertiaMillis >= 0 , "Inertia cannot be negative." ) ; Long longestIntervalLength = AlertUtils . getMaximumIntervalLength ( this . alert . getExpression ( ) ) ; if ( inerti... |
public class CPMeasurementUnitPersistenceImpl { /** * Creates a new cp measurement unit with the primary key . Does not add the cp measurement unit to the database .
* @ param CPMeasurementUnitId the primary key for the new cp measurement unit
* @ return the new cp measurement unit */
@ Override public CPMeasuremen... | CPMeasurementUnit cpMeasurementUnit = new CPMeasurementUnitImpl ( ) ; cpMeasurementUnit . setNew ( true ) ; cpMeasurementUnit . setPrimaryKey ( CPMeasurementUnitId ) ; String uuid = PortalUUIDUtil . generate ( ) ; cpMeasurementUnit . setUuid ( uuid ) ; cpMeasurementUnit . setCompanyId ( companyProvider . getCompanyId (... |
public class LinkPredicates { /** * Returns a Predicate that is matching links having the specified name { @ link Link # getName ( ) name }
* @ param name the expected name of the link
* @ return Predicate used to select links */
public static Predicate < Link > havingName ( final String name ) { } } | return link -> name . equals ( link . getName ( ) ) ; |
public class AjcHelper { /** * Constructs AspectJ compiler classpath string
* @ param project the Maven Project
* @ param pluginArtifacts the plugin Artifacts
* @ param outDirs the outputDirectories
* @ return a os spesific classpath string */
@ SuppressWarnings ( "unchecked" ) public static String createClassP... | String cp = new String ( ) ; Set < Artifact > classPathElements = Collections . synchronizedSet ( new LinkedHashSet < Artifact > ( ) ) ; Set < Artifact > dependencyArtifacts = project . getDependencyArtifacts ( ) ; classPathElements . addAll ( dependencyArtifacts == null ? Collections . < Artifact > emptySet ( ) : depe... |
public class Database { /** * Executes a query and converts the results to instances of given class using default mechanisms . */
public @ NotNull < T > List < T > findAll ( @ NotNull Class < T > cl , @ NotNull SqlQuery query ) { } } | return executeQuery ( resultProcessorForClass ( cl ) , query ) ; |
public class LUDecompositionBase_ZDRM { /** * Solve the using the lower triangular matrix in LU . Diagonal elements are assumed
* to be 1 */
protected void solveL ( double [ ] vv ) { } } | int ii = 0 ; for ( int i = 0 ; i < n ; i ++ ) { int ip = indx [ i ] ; double sumReal = vv [ ip * 2 ] ; double sumImg = vv [ ip * 2 + 1 ] ; vv [ ip * 2 ] = vv [ i * 2 ] ; vv [ ip * 2 + 1 ] = vv [ i * 2 + 1 ] ; if ( ii != 0 ) { // for ( int j = ii - 1 ; j < i ; j + + )
// sum - = dataLU [ i * n + j ] * vv [ j ] ;
int ind... |
public class TextInputFormat { @ Override public void configure ( Configuration parameters ) { } } | super . configure ( parameters ) ; if ( charsetName == null || ! Charset . isSupported ( charsetName ) ) { throw new RuntimeException ( "Unsupported charset: " + charsetName ) ; } |
public class MMTImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ SuppressWarnings ( "unchecked" ) @ Override public void eSet ( int featureID , Object newValue ) { } } | switch ( featureID ) { case AfplibPackage . MMT__RG : getRG ( ) . clear ( ) ; getRG ( ) . addAll ( ( Collection < ? extends MMTRG > ) newValue ) ; return ; } super . eSet ( featureID , newValue ) ; |
public class LssClient { /** * pause domain ' s stream in the live stream service .
* @ param request The request object containing all options for pause a domain ' s stream
* @ return the response */
public ResumeDomainStreamResponse resumeDomainStream ( ResumeDomainStreamRequest request ) { } } | checkNotNull ( request , "The parameter request should NOT be null." ) ; checkStringNotEmpty ( request . getDomain ( ) , "Domain should NOT be empty." ) ; checkStringNotEmpty ( request . getApp ( ) , "App should NOT be empty." ) ; checkStringNotEmpty ( request . getStream ( ) , "Stream should NOT be empty." ) ; Interna... |
public class PorterStemmer { /** * cvc ( i ) is true < = > i - 2 , i - 1 , i has the form consonant - vowel - consonant
* and also if the second c is not w , x or y . this is used when trying to
* restore an e at the end of a short word . e . g .
* cav ( e ) , lov ( e ) , hop ( e ) , crim ( e ) , but snow , box ,... | if ( i < 2 || ! isConsonant ( i ) || isConsonant ( i - 1 ) || ! isConsonant ( i - 2 ) ) { return false ; } { int ch = b [ i ] ; if ( ch == 'w' || ch == 'x' || ch == 'y' ) { return false ; } } return true ; |
public class TagProjectRequestMarshaller { /** * Marshall the given parameter object . */
public void marshall ( TagProjectRequest tagProjectRequest , ProtocolMarshaller protocolMarshaller ) { } } | if ( tagProjectRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( tagProjectRequest . getId ( ) , ID_BINDING ) ; protocolMarshaller . marshall ( tagProjectRequest . getTags ( ) , TAGS_BINDING ) ; } catch ( Exception e ) { throw new S... |
public class WNumberField { /** * { @ inheritDoc } */
@ Override public void setData ( final Object data ) { } } | // This override is necessary to maintain other internal state
NumberFieldModel model = getOrCreateComponentModel ( ) ; try { super . setData ( convertValue ( data ) ) ; model . text = null ; model . validNumber = true ; } catch ( SystemException e ) { super . setData ( data ) ; model . text = data . toString ( ) ; mod... |
public class BinarySearcher { /** * Search bytes in byte array returns indexes within this byte - array of all
* occurrences of the specified ( search bytes ) byte array in the specified
* range
* @ param srcBytes
* @ param searchBytes
* @ param searchStartIndex
* @ param searchEndIndex
* @ return result ... | final int destSize = searchBytes . length ; final List < Integer > positionIndexList = new ArrayList < Integer > ( ) ; int cursor = searchStartIndex ; while ( cursor < searchEndIndex + 1 ) { final int index = indexOf ( srcBytes , searchBytes , cursor , searchEndIndex ) ; if ( index >= 0 ) { positionIndexList . add ( in... |
public class Animate { /** * Animate any element with specific animation . Animation is done by CSS and runs multiple times .
* Animation is started when element is appended to the DOM or new ( not same ) animation is added
* to already displayed element . Animation runs on hidden elements too and is not paused / s... | if ( widget != null && animation != null ) { // on valid input
if ( widget . getStyleName ( ) . contains ( animation ) ) { // animation is present , remove it and run again .
stopAnimation ( widget , animation ) ; Scheduler . get ( ) . scheduleFixedDelay ( new Scheduler . RepeatingCommand ( ) { @ Override public boolea... |
public class COSUnderFileSystem { /** * Creates an COS { @ code ClientConfiguration } using an Alluxio Configuration .
* @ return the COS { @ link ClientConfig } */
private static ClientConfig createCOSClientConfig ( String regionName , UnderFileSystemConfiguration conf ) { } } | ClientConfig config = new ClientConfig ( new Region ( regionName ) ) ; config . setConnectionTimeout ( ( int ) conf . getMs ( PropertyKey . COS_CONNECTION_TIMEOUT ) ) ; config . setSocketTimeout ( ( int ) conf . getMs ( PropertyKey . COS_SOCKET_TIMEOUT ) ) ; config . setMaxConnectionsCount ( conf . getInt ( PropertyKey... |
public class ExpectUtils { /** * TODO Simulate " Could not open connection to the host , on port . . . . "
* TODO Simulate " Connection refused " */
public static Expect4j telnet ( String hostname , int port ) throws Exception { } } | // This library has trouble with EOF
final TelnetClient client = new TelnetClient ( ) ; TerminalTypeOptionHandler ttopt = new TerminalTypeOptionHandler ( "VT100" , false , false , true , true ) ; EchoOptionHandler echoopt = new EchoOptionHandler ( true , false , true , false ) ; SuppressGAOptionHandler gaopt = new Supp... |
public class HttpServerShellCmdHandler { /** * it is called when receiving a http request .
* @ param parsedHttpRequest
* @ param response */
@ Override public final synchronized void onHttpRequest ( final ParsedHttpRequest parsedHttpRequest , final HttpServletResponse response ) throws IOException , ServletExcepti... | LOG . log ( Level . INFO , "HttpServeShellCmdHandler in webserver onHttpRequest is called: {0}" , parsedHttpRequest . getRequestUri ( ) ) ; final String queryStr = parsedHttpRequest . getQueryString ( ) ; if ( parsedHttpRequest . getTargetEntity ( ) . equalsIgnoreCase ( "Evaluators" ) ) { final byte [ ] b = HttpShellJo... |
public class AbstractEntityFieldProcessor { /** * Gets the valid jpa column name .
* @ param entity
* the entity
* @ param f
* the f
* @ return the valid jpa column name */
protected final String getValidJPAColumnName ( Class < ? > entity , Field f ) { } } | String name = null ; if ( f . isAnnotationPresent ( Column . class ) ) { Column c = f . getAnnotation ( Column . class ) ; if ( ! c . name ( ) . isEmpty ( ) ) { name = c . name ( ) ; } else { name = f . getName ( ) ; } } else if ( f . isAnnotationPresent ( Basic . class ) ) { name = f . getName ( ) ; } if ( f . isAnnot... |
public class Notify { /** * Updates Icon parameter of once displayed Notify .
* This method is shortcut when using FONT AWESOME iconic font .
* @ param type IconType to get CSS class name to set */
public final void updateIcon ( final IconType type ) { } } | if ( type != null ) updateIcon ( Styles . FONT_AWESOME_BASE + " " + type . getCssName ( ) ) ; |
public class MultiFileJournalHelper { /** * Get the Journal Files that exist the Journal Directory , sorted by name . */
static File [ ] getSortedArrayOfJournalFiles ( File journalDirectory , String filenamePrefix ) { } } | JournalFileFilter filter = new JournalFileFilter ( filenamePrefix ) ; File [ ] journalFiles = journalDirectory . listFiles ( filter ) ; Arrays . sort ( journalFiles , new FilenameComparator ( ) ) ; return journalFiles ; |
public class AfplibPackageImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public EClass getGSGCH ( ) { } } | if ( gsgchEClass == null ) { gsgchEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( AfplibPackage . eNS_URI ) . getEClassifiers ( ) . get ( 463 ) ; } return gsgchEClass ; |
public class Preconditions { /** * A { @ code double } specialized version of { @ link # checkPrecondition ( Object ,
* Predicate , Function ) }
* @ param value The value
* @ param predicate The predicate
* @ param describer The describer of the predicate
* @ return value
* @ throws PreconditionViolationExc... | final boolean ok ; try { ok = predicate . test ( value ) ; } catch ( final Throwable e ) { final Violations violations = singleViolation ( failedPredicate ( e ) ) ; throw new PreconditionViolationException ( failedMessage ( Double . valueOf ( value ) , violations ) , e , violations . count ( ) ) ; } return innerCheckD ... |
public class CheckClassAdapter { /** * Checks an identifier .
* @ param signature
* a string containing the signature that must be checked .
* @ param pos
* index of first character to be checked .
* @ return the index of the first character after the checked part . */
private static int checkIdentifier ( fin... | if ( ! Character . isJavaIdentifierStart ( getChar ( signature , pos ) ) ) { throw new IllegalArgumentException ( signature + ": identifier expected at index " + pos ) ; } ++ pos ; while ( Character . isJavaIdentifierPart ( getChar ( signature , pos ) ) ) { ++ pos ; } return pos ; |
public class StrUtils { /** * Compare 2 array
* @ return true if each item equal */
public static boolean arraysEqual ( Object [ ] array1 , Object [ ] array2 ) { } } | if ( array1 == null || array1 . length == 0 || array2 == null || array2 . length == 0 ) DialectException . throwEX ( "StrUtils arraysEqual() method can not compare empty arrays" ) ; for ( int i = 0 ; array1 != null && array2 != null && i < array1 . length ; i ++ ) if ( ! array1 [ i ] . equals ( array2 [ i ] ) ) return ... |
public class ExternalBeanAttributesFactory { /** * Validates { @ link BeanAttributes } .
* @ param attributes { @ link BeanAttributes } to validate */
public static void validateBeanAttributes ( BeanAttributes < ? > attributes , BeanManager manager ) { } } | validateStereotypes ( attributes , manager ) ; validateQualifiers ( attributes , manager ) ; validateTypes ( attributes , manager ) ; validateScope ( attributes , manager ) ; |
public class AdHocNTBase { /** * Log ad hoc batch info
* @ param batch planned statement batch */
private void logBatch ( final CatalogContext context , final AdHocPlannedStmtBatch batch , final Object [ ] userParams ) { } } | final int numStmts = batch . getPlannedStatementCount ( ) ; final int numParams = userParams == null ? 0 : userParams . length ; final String readOnly = batch . readOnly ? "yes" : "no" ; final String singlePartition = batch . isSinglePartitionCompatible ( ) ? "yes" : "no" ; final String user = getUsername ( ) ; final S... |
public class BaseDelegatingExpirationPolicy { /** * Add policy .
* @ param name the name
* @ param policy the policy */
public void addPolicy ( final String name , final ExpirationPolicy policy ) { } } | LOGGER . trace ( "Adding expiration policy [{}] with name [{}]" , policy , name ) ; this . policies . put ( name , policy ) ; |
public class Radar { /** * Animates the radar beam of the component . This has no effect
* on the functionality but is only eye candy .
* @ param RUN enables / disables the animation of the beam */
public void animate ( final boolean RUN ) { } } | if ( isEnabled ( ) ) { if ( RUN ) { if ( timeline . getState ( ) != Timeline . TimelineState . PLAYING_FORWARD && timeline . getState ( ) != Timeline . TimelineState . SUSPENDED ) { timeline = new Timeline ( this ) ; timeline . addPropertyToInterpolate ( "rotationAngle" , this . rotationAngle , 2 * Math . PI ) ; timeli... |
public class PropertiesHelper { /** * Converts Properties to Map
* @ param properties properties to convert .
* @ return map version of properties . */
public Map < String , Object > convertPropertiesToMap ( Properties properties ) { } } | return properties . entrySet ( ) . stream ( ) . collect ( toLinkedMap ( e -> e . getKey ( ) . toString ( ) , e -> e . getValue ( ) ) ) ; |
public class Polygon { /** * Adds the corner of Polygon .
* @ param v The coordinates of a new added corner . */
public void vertex ( Vector3D v ) { } } | MODE = LINES_3D ; this . cornerX . add ( v . getX ( ) ) ; this . cornerY . add ( v . getY ( ) ) ; this . cornerZ . add ( v . getZ ( ) ) ; setNumberOfCorner ( this . cornerX . size ( ) ) ; calcG ( ) ; |
public class BatterySkin { /** * * * * * * Private Methods * * * * * */
private void setBar ( final double VALUE ) { } } | double factor = VALUE / gauge . getRange ( ) ; Color barColor = gauge . getBarColor ( ) ; if ( gauge . isGradientBarEnabled ( ) && ! gauge . getGradientBarStops ( ) . isEmpty ( ) ) { barColor = gauge . getGradientLookup ( ) . getColorAt ( factor ) ; } else if ( gauge . getSectionsVisible ( ) && ! sections . isEmpty ( )... |
public class VirtualMachinesInner { /** * Sets the state of the virtual machine to generalized .
* @ param resourceGroupName The name of the resource group .
* @ param vmName The name of the virtual machine .
* @ throws IllegalArgumentException thrown if parameters fail the validation
* @ throws CloudException ... | return generalizeWithServiceResponseAsync ( resourceGroupName , vmName ) . toBlocking ( ) . single ( ) . body ( ) ; |
public class Pcg32 { /** * Returns the next pseudorandom , Gaussian ( " normally " ) distributed
* { @ code double } value with mean { @ code 0.0 } and standard
* deviation { @ code 1.0 } from this random number generator ' s sequence .
* @ see java . util . Random # nextGaussian ( ) */
public double nextGaussian... | // See Knuth , ACP , Section 3.4.1 Algorithm C .
if ( haveNextNextGaussian ) { haveNextNextGaussian = false ; return nextNextGaussian ; } else { double v1 , v2 , s ; do { v1 = 2 * nextDouble ( ) - 1 ; // between - 1 and 1
v2 = 2 * nextDouble ( ) - 1 ; // between - 1 and 1
s = v1 * v1 + v2 * v2 ; } while ( s >= 1 || s =... |
public class FactorTable { /** * Computes the probability of the sequence OF being at the end of the table
* given that the first tag in table is GIVEN . given is at the beginning , of is
* at the end .
* @ return the probability of the sequence of being at the end of the table */
public double unnormalizedCondit... | if ( of . length != windowSize - 1 ) { throw new IllegalArgumentException ( "unnormalizedConditionalLogProbGivenFirst requires of one less than clique size (" + windowSize + ") but was " + Arrays . toString ( of ) ) ; } // compute P ( given , of )
int [ ] labels = new int [ windowSize ] ; labels [ 0 ] = given ; System ... |
public class SelectorBuilderImpl { /** * Copies the whole set of predicates , by creating new instances of each one in the given set .
* @ return the new set of Predicate objects with different instance for each of the Predicate */
private Set < Predicate > copyPredicatesSet ( ) { } } | Set < Predicate > predicatesCopy = Sets . newLinkedHashSet ( ) ; for ( Predicate predicate : this . predicates ) { Predicate copyPredicate = new Predicate ( ) ; copyPredicate . setField ( predicate . getField ( ) ) ; copyPredicate . setOperator ( predicate . getOperator ( ) ) ; copyPredicate . getValues ( ) . addAll ( ... |
public class ToIntFunctionBuilder { /** * One of ways of creating builder . This is possibly the least verbose way where compiler should be able to guess the generic parameters . */
@ Nonnull public static < T > ToIntFunction < T > toIntFunctionFrom ( Consumer < ToIntFunctionBuilder < T > > buildingFunction ) { } } | ToIntFunctionBuilder builder = new ToIntFunctionBuilder ( ) ; buildingFunction . accept ( builder ) ; return builder . build ( ) ; |
public class HttpUtils { /** * Submits http post data to an HttpURLConnection .
* @ param conn teh connection
* @ param encodedData the encoded data to be sent
* @ throws IOException on any connection */
public static void sendPostData ( HttpURLConnection conn , String encodedData ) throws IOException { } } | StreamManager sm = new StreamManager ( ) ; try { conn . setDoOutput ( true ) ; conn . setRequestMethod ( "POST" ) ; if ( conn . getRequestProperty ( "Content-Type" ) == null ) { conn . setRequestProperty ( "Content-Type" , "application/x-www-form-urlencoded" ) ; } if ( encodedData != null ) { if ( conn . getRequestProp... |
public class ExpandableGridView { /** * Expands the group , which corresponds to a specific index .
* @ param groupIndex
* The index of the group , which should be expanded , as an { @ link Integer } value
* @ return True , if the group has been expanded , false otherwise */
public final boolean expandGroup ( fin... | ExpandableListAdapter adapter = getExpandableListAdapter ( ) ; if ( adapter != null && ! isGroupExpanded ( groupIndex ) ) { expandedGroups . add ( groupIndex ) ; notifyDataSetChanged ( ) ; return true ; } return false ; |
public class Log { /** * Send an INFO log message with { @ link SUBSYSTEM # MAIN } as default one .
* @ param tag Used to identify the source of a log message . It usually identifies the class or
* activity where the log call occurs .
* @ param msg The message you would like logged .
* @ return */
public static... | return i ( SUBSYSTEM . MAIN , tag , msg ) ; |
public class RunsInner { /** * Gets a link to download the run logs .
* @ param resourceGroupName The name of the resource group to which the container registry belongs .
* @ param registryName The name of the container registry .
* @ param runId The run ID .
* @ throws IllegalArgumentException thrown if parame... | return getLogSasUrlWithServiceResponseAsync ( resourceGroupName , registryName , runId ) . map ( new Func1 < ServiceResponse < RunGetLogResultInner > , RunGetLogResultInner > ( ) { @ Override public RunGetLogResultInner call ( ServiceResponse < RunGetLogResultInner > response ) { return response . body ( ) ; } } ) ; |
public class NIOReadStream { /** * Move all bytes in current read buffers to output array , free read buffers
* back to thread local memory pool .
* @ param output */
void getBytes ( byte [ ] output ) { } } | if ( m_totalAvailable < output . length ) { throw new IllegalStateException ( "Requested " + output . length + " bytes; only have " + m_totalAvailable + " bytes; call tryRead() first" ) ; } int bytesCopied = 0 ; while ( bytesCopied < output . length ) { BBContainer firstC = m_readBBContainers . peekFirst ( ) ; if ( fir... |
public class JMSDestinationResourceFactoryBuilder { /** * Creates a resource factory that creates handles of the type specified
* by the { @ link ResourceFactory # CREATES _ OBJECT _ CLASS } property .
* @ param props the resource - specific type information
* @ return the resource factory
* @ throws Exception ... | final boolean trace = TraceComponent . isAnyTracingEnabled ( ) ; if ( trace && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "createResourceFactory" , props ) ; // Place holder for admin object properties like queue / topic
Hashtable < String , Object > adminObjectSvcProps = new Hashtable < String , Object > ( ) ; // Sto... |
public class TransportRequestHandler { /** * Responds to a single message with some Encodable object . If a failure occurs while sending ,
* it will be logged and the channel closed . */
private ChannelFuture respond ( Encodable result ) { } } | SocketAddress remoteAddress = channel . remoteAddress ( ) ; return channel . writeAndFlush ( result ) . addListener ( future -> { if ( future . isSuccess ( ) ) { logger . trace ( "Sent result {} to client {}" , result , remoteAddress ) ; } else { logger . error ( String . format ( "Error sending result %s to %s; closin... |
public class RenderAPI { /** * 自我渲染
* @ param template */
public static void selfRender ( XWPFTemplate template ) { } } | ObjectUtils . requireNonNull ( template , "Template is null, should be setted first." ) ; List < ElementTemplate > elementTemplates = template . getElementTemplates ( ) ; if ( null == elementTemplates || elementTemplates . isEmpty ( ) ) return ; RenderPolicy policy = null ; for ( ElementTemplate runTemplate : elementTe... |
public class SDBaseOps { /** * Create a new 1d array with values evenly spaced between values ' start ' and ' stop '
* For example , linspace ( start = 3.0 , stop = 4.0 , number = 3 ) will generate [ 3.0 , 3.5 , 4.0]
* @ param name Name of the new variable
* @ param dataType Data type of the output array
* @ pa... | SDVariable ret = f ( ) . linspace ( sd ( ) . constant ( start ) , sd ( ) . constant ( stop ) , sd ( ) . constant ( number ) , dataType ) ; return updateVariableNameAndReference ( ret , name ) ; |
public class PropertyAccessorHelper { /** * Sets a byte - array onto a field .
* @ param target
* the target
* @ param field
* the field
* @ param fieldVal
* the field value
* @ throws PropertyAccessException
* the property access exception */
public static void set ( Object target , Field field , Strin... | PropertyAccessor < ? > accessor = PropertyAccessorFactory . getPropertyAccessor ( field ) ; Object value = accessor . fromString ( target . getClass ( ) , fieldVal ) ; set ( target , field , value ) ; |
public class ID3v2Tag { /** * Returns the data found in the frame specified by the id . If the frame
* doesn ' t exist , then a zero length array is returned .
* @ param id the id of the frame to get the data from
* @ return the data found in the frame */
public byte [ ] getFrameData ( String id ) { } } | if ( frames . containsKey ( id ) ) { return ( ( ID3v2Frame ) frames . get ( id ) ) . getFrameData ( ) ; } return null ; |
public class CmsObject { /** * Removes a resource from the current project of the user . < p >
* This is used to reduce the current users project with the
* specified resource , in case that the resource is already part of the project .
* The resource is not really removed like in a regular copy operation ,
* i... | // TODO : this should be also possible if the resource has been deleted
CmsResource resource = readResource ( resourcename , CmsResourceFilter . ALL ) ; getResourceType ( resource ) . removeResourceFromProject ( this , m_securityManager , resource ) ; |
public class KeyValueLocator { /** * Helper method to handle potentially different node sizes in the actual list and in the config .
* @ return true if they are not equal , false if they are . */
private static boolean handleNotEqualNodeSizes ( int configNodeSize , int actualNodeSize ) { } } | if ( configNodeSize != actualNodeSize ) { if ( LOGGER . isDebugEnabled ( ) ) { LOGGER . debug ( "Node list and configuration's partition hosts sizes : {} <> {}, rescheduling" , actualNodeSize , configNodeSize ) ; } return true ; } return false ; |
public class Variant { /** * Opposite of the { @ link # toDate ( double ) } method . */
static double fromDate ( Date dt ) { } } | // the number of milliseconds since January 1 , 1970 , 00:00:00 GMT
long t = dt . getTime ( ) ; // the number of milliseconds since January 1 , 1970 , 00:00:00 Local Time
Calendar c = new GregorianCalendar ( ) ; c . setTime ( dt ) ; t += ( c . get ( Calendar . ZONE_OFFSET ) + c . get ( Calendar . DST_OFFSET ) ) ; // th... |
public class JBossAdminApi { /** * curl - v - - digest - u " admin " - F " file = @ git / cadmium / test . cadmium . localhost . war ; filename = test . cadmium . localhost . war " http : / / localhost : 9990 / management / add - content
* result : { " outcome " : " success " , " result " : { " BYTES _ VALUE " : " Sb... | HttpPost post = new HttpPost ( "http://" + host + ":" + port + "/management/add-content" ) ; try { MultipartEntity entity = new MultipartEntity ( ) ; entity . addPart ( "filename" , new StringBody ( warName ) ) ; entity . addPart ( "attachment" , new FileBody ( warFile , ContentType . APPLICATION_OCTET_STREAM . getMime... |
public class Try { /** * Calls the callable and if it returns a value , the Try is successful with that value or if throws
* and exception the Try captures that
* @ param callable the code to call
* @ param < V > the value type
* @ return a Try which is the result of the call */
public static < V > Try < V > tr... | try { return Try . succeeded ( callable . call ( ) ) ; } catch ( Exception e ) { return Try . failed ( e ) ; } |
public class ApiBuilder { /** * Adds a PATCH request handler for the specified path to the { @ link Javalin } instance .
* The method can only be called inside a { @ link Javalin # routes ( EndpointGroup ) } .
* @ see < a href = " https : / / javalin . io / documentation # handlers " > Handlers in docs < / a > */
p... | staticInstance ( ) . patch ( prefixPath ( path ) , handler ) ; |
public class PackageIndexWriter { /** * Generate the package index page for the right - hand frame .
* @ param configuration the current configuration of the doclet .
* @ throws DocFileIOException if there is a problem generating the package index page */
public static void generate ( ConfigurationImpl configuratio... | DocPath filename = DocPaths . overviewSummary ( configuration . frames ) ; PackageIndexWriter packgen = new PackageIndexWriter ( configuration , filename ) ; packgen . buildPackageIndexFile ( "doclet.Window_Overview_Summary" , true ) ; |
public class AttributeFormFieldRegistry { /** * Create a new { @ link DataSourceField } instance for the given attribute info . This field can provide additional
* validators on the field type ( if they are registered ) , to protect the data . < br / >
* If the attribute info object has the < code > formInputType <... | DataSourceField field = null ; List < Validator > validators = new ArrayList < Validator > ( ) ; if ( info . getFormInputType ( ) != null ) { String formInputType = info . getFormInputType ( ) ; DataSourceFieldFactory factory = DATA_SOURCE_FIELDS . get ( formInputType ) ; if ( null != factory ) { field = factory . crea... |
public class GoogRequire { /** * Returns a reference to the module object using { @ code goog . module . get } */
public Expression googModuleGet ( ) { } } | if ( chunk ( ) instanceof VariableDeclaration ) { throw new IllegalStateException ( "requires with aliases shouldn't use goog.module.get" ) ; } return dottedIdWithRequires ( "goog.module.get" , ImmutableSet . of ( this ) ) . call ( stringLiteral ( symbol ( ) ) ) ; |
public class FormAuthenticator { public void setErrorPage ( String path ) { } } | if ( path == null || path . trim ( ) . length ( ) == 0 ) { _formErrorPath = null ; _formErrorPage = null ; } else { if ( ! path . startsWith ( "/" ) ) { log . warn ( "form-error-page must start with /" ) ; path = "/" + path ; } _formErrorPage = path ; _formErrorPath = path ; if ( _formErrorPath != null && _formErrorPat... |
public class AbstractItem { /** * This bridge method is to maintain binary compatibility with { @ link TopLevelItem # getParent ( ) } . */
@ WithBridgeMethods ( value = Jenkins . class , castRequired = true ) @ Override public @ Nonnull ItemGroup getParent ( ) { } } | if ( parent == null ) { throw new IllegalStateException ( "no parent set on " + getClass ( ) . getName ( ) + "[" + name + "]" ) ; } return parent ; |
public class FetchTupleElement { /** * This function fetches an element from an array at a specific index .
* @ param arr Array that the function fetches an element from .
* @ param idx The index of the element that needs to be fetched .
* @ return Element from array at the specific index .
* Examples :
* > >... | if ( idx < 0 ) { idx = arr . length + idx ; } return arr [ idx ] ; |
public class UserInterfaceApi { /** * Open New Mail Window Open the New Mail window , according to settings from
* the request if applicable - - - SSO Scope : esi - ui . open _ window . v1
* @ param datasource
* The server name you would like data from ( optional , default to
* tranquility )
* @ param token
... | postUiOpenwindowNewmailWithHttpInfo ( datasource , token , uiNewMail ) ; |
public class KDTree { /** * Returns true if candidate is a full owner in respect to a competitor .
* The candidate has been the closer point to the current rectangle or even
* has been a point within the rectangle . The competitor is competing with the
* candidate for a few points out of the rectangle although it... | // get extreme point
Instance extreme = ( Instance ) candidate . copy ( ) ; for ( int i = 0 ; i < m_Instances . numAttributes ( ) ; i ++ ) { if ( ( competitor . value ( i ) - candidate . value ( i ) ) > 0 ) { extreme . setValue ( i , node . m_NodeRanges [ i ] [ MAX ] ) ; } else { extreme . setValue ( i , node . m_NodeR... |
public class BasicBinder { /** * Register the configuration file ( bindings . xml ) at the given URL */
public final void registerConfiguration ( URL nextLocation ) { } } | BindingConfiguration configuration = BindingXmlLoader . load ( nextLocation ) ; for ( Provider nextProvider : configuration . getProviders ( ) ) { try { registerConverterProvider ( nextProvider . getProviderClass ( ) . newInstance ( ) ) ; } catch ( InstantiationException e ) { throw new IllegalStateException ( "Cannot ... |
public class ScorecardModel { /** * Scorecard model builder : JIT a subclass with the fast version wired in to
* ' score ( row ) ' */
public static ScorecardModel make ( final String name , final double initialScore , RuleTable [ ] rules ) { } } | // Get the list of features
String [ ] colNames = new String [ rules . length ] ; for ( int i = 0 ; i < rules . length ; i ++ ) colNames [ i ] = rules [ i ] . _name ; // javassist support for rewriting class files
ClassPool _pool = ClassPool . getDefault ( ) ; try { // Make a javassist class in the java hierarchy
Strin... |
public class DefaultLogger { /** * Logs a message , if the priority is suitable . In non - emacs mode , task
* level messages are prefixed by the task name which is right - justified .
* @ param event A BuildEvent containing message information . Must not be
* < code > null < / code > . */
@ Override public void ... | final int priority = event . getPriority ( ) ; // Filter out messages based on priority
if ( priority <= msgOutputLevel ) { final StringBuilder message = new StringBuilder ( ) ; if ( event . getTask ( ) != null && ! emacsMode ) { // Print out the name of the task if we ' re in one
final String name = event . getTask ( ... |
public class AuthorizationStrategy { /** * Returns all the registered { @ link AuthorizationStrategy } descriptors . */
public static @ Nonnull DescriptorExtensionList < AuthorizationStrategy , Descriptor < AuthorizationStrategy > > all ( ) { } } | return Jenkins . getInstance ( ) . < AuthorizationStrategy , Descriptor < AuthorizationStrategy > > getDescriptorList ( AuthorizationStrategy . class ) ; |
public class ChunkedHashStore { /** * Adds the elements returned by an iterator to this store , associating them with specified values ,
* possibly building the associated value frequency map .
* @ param elements an iterator returning elements .
* @ param values an iterator on values parallel to { @ code elements... | if ( pl != null ) { pl . expectedUpdates = - 1 ; pl . start ( "Adding elements..." ) ; } final long [ ] triple = new long [ 3 ] ; while ( elements . hasNext ( ) ) { Hashes . spooky4 ( transform . toBitVector ( elements . next ( ) ) , seed , triple ) ; add ( triple , values != null ? values . nextLong ( ) : filteredSize... |
public class FileUtil { /** * 文件或目录是否存在 */
public static boolean existsAny ( String ... paths ) { } } | return Arrays . stream ( paths ) . anyMatch ( path -> new File ( path ) . exists ( ) ) ; |
public class DeleteFileSystemWindowsResponseMarshaller { /** * Marshall the given parameter object . */
public void marshall ( DeleteFileSystemWindowsResponse deleteFileSystemWindowsResponse , ProtocolMarshaller protocolMarshaller ) { } } | if ( deleteFileSystemWindowsResponse == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( deleteFileSystemWindowsResponse . getFinalBackupId ( ) , FINALBACKUPID_BINDING ) ; protocolMarshaller . marshall ( deleteFileSystemWindowsResponse . getF... |
public class SpringBootUtilTask { /** * Build up a command string to launch in new process */
private List < String > buildCommand ( ) { } } | List < String > command = new ArrayList < String > ( ) ; command . add ( cmd ) ; command . add ( "thin" ) ; command . add ( "--sourceAppPath=" + getSourceAppPath ( ) ) ; command . add ( "--targetLibCachePath=" + getTargetLibCachePath ( ) ) ; command . add ( "--targetThinAppPath=" + getTargetThinAppPath ( ) ) ; if ( get... |
public class SliceUtf8 { /** * Gets the UTF - 8 encoded code point at the { @ code position } .
* Note : This method does not explicitly check for valid UTF - 8 , and may
* return incorrect results or throw an exception for invalid UTF - 8. */
public static int getCodePointAt ( Slice utf8 , int position ) { } } | int unsignedStartByte = utf8 . getByte ( position ) & 0xFF ; if ( unsignedStartByte < 0x80 ) { // normal ASCII
// 0xxx _ xxxx
return unsignedStartByte ; } if ( unsignedStartByte < 0xc0 ) { // illegal bytes
// 10xx _ xxxx
throw new InvalidUtf8Exception ( "Illegal start 0x" + toHexString ( unsignedStartByte ) . toUpperCa... |
public class TreeMap { /** * ( non - Javadoc )
* @ see com . ibm . ws . objectManager . Map # containsKey ( java . lang . Object , com . ibm . ws . objectManager . Transaction ) */
public synchronized boolean containsKey ( Object key , Transaction transaction ) throws ObjectManagerException { } } | if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , "get" , new Object [ ] { key , transaction } ) ; boolean returnValue = false ; if ( getEntry ( key , transaction ) != null ) returnValue = true ; if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) ... |
public class ProjectUtilities { /** * Using the natures name , check whether the current project has FindBugs
* nature .
* @ return boolean < code > true < / code > , if the FindBugs nature is assigned to
* the project , < code > false < / code > otherwise . */
public static boolean hasFindBugsNature ( IProject p... | try { return ProjectUtilities . isJavaProject ( project ) && project . hasNature ( FindbugsPlugin . NATURE_ID ) ; } catch ( CoreException e ) { FindbugsPlugin . getDefault ( ) . logException ( e , "Error while testing SpotBugs nature for project " + project ) ; } return false ; |
public class Util { /** * Get long type property value from a property map .
* If { @ code properties } is null or property value is null , default value is returned
* @ param properties map of properties
* @ param key property name
* @ param defaultVal default value of the property
* @ return integer value o... | if ( properties == null ) { return defaultVal ; } Object propertyVal = properties . get ( key ) ; if ( propertyVal == null ) { return defaultVal ; } if ( ! ( propertyVal instanceof Long ) ) { throw new IllegalArgumentException ( "Property : " + key + " must be a long" ) ; } return ( Long ) propertyVal ; |
public class DBSnapshotAttribute { /** * The value or values for the manual DB snapshot attribute .
* If the < code > AttributeName < / code > field is set to < code > restore < / code > , then this element returns a list of IDs
* of the AWS accounts that are authorized to copy or restore the manual DB snapshot . I... | if ( attributeValues == null ) { this . attributeValues = null ; return ; } this . attributeValues = new com . amazonaws . internal . SdkInternalList < String > ( attributeValues ) ; |
public class TableFactoryService { /** * Converts the prefix of properties with wildcards ( e . g . , " format . * " ) . */
private static List < String > extractWildcardPrefixes ( List < String > propertyKeys ) { } } | return propertyKeys . stream ( ) . filter ( p -> p . endsWith ( "*" ) ) . map ( s -> s . substring ( 0 , s . length ( ) - 1 ) ) . collect ( Collectors . toList ( ) ) ; |
public class Fat16RootDirectory { /** * Reads a { @ code Fat16RootDirectory } as indicated by the specified
* { @ code Fat16BootSector } .
* @ param bs the boot sector that describes the root directory to read
* @ param readOnly if the directory shold be created read - only
* @ return the directory that was rea... | final Fat16RootDirectory result = new Fat16RootDirectory ( bs , readOnly ) ; result . read ( ) ; return result ; |
public class StringUtils { /** * Determines whether the String value contains any digits , guarding against null values .
* @ param value the String value being evaluated for digits containment .
* @ return a boolean value indicating whether the String value contains any digits .
* @ see # toCharArray ( String ) ... | for ( char chr : toCharArray ( value ) ) { if ( Character . isDigit ( chr ) ) { return true ; } } return false ; |
public class PluginConfig { /** * For internal use only , please do not rely on this method .
* @ return the environment specific configuration key . The original key will be returned if no prefixed configuration is specified for the current env . */
private static String extendedKey ( Properties properties , String ... | String extendedKey = extendedKey ( key ) ; return properties . containsKey ( extendedKey ) ? extendedKey : key ; |
public class QueueResultsProcessing { /** * Stores the output from a Frontier into the queue , pausing and waiting if the given queue is too large
* @ param resultsMap map of String and String representing the output of a Frontier ' s DFS */
@ Override public void processOutput ( Map < String , String > resultsMap ) ... | queue . add ( resultsMap ) ; if ( queue . size ( ) > 10000 ) { log . info ( "Queue size " + queue . size ( ) + ", waiting" ) ; try { Thread . sleep ( 500 ) ; } catch ( InterruptedException ex ) { log . info ( "Interrupted " , ex ) ; } } |
public class CPDefinitionOptionValueRelPersistenceImpl { /** * Returns all the cp definition option value rels where key = & # 63 ; .
* @ param key the key
* @ return the matching cp definition option value rels */
@ Override public List < CPDefinitionOptionValueRel > findByKey ( String key ) { } } | return findByKey ( key , QueryUtil . ALL_POS , QueryUtil . ALL_POS , null ) ; |
public class BulkProcessor { /** * Attempts a flush operation , handling failed documents based on configured error listeners .
* @ return A result object detailing the success or failure of the request , including information about any
* failed documents .
* @ throws EsHadoopException in the event that the bulk ... | BulkResponse bulkResult = null ; boolean trackingArrayExpanded = false ; String bulkLoggingID = createDebugTxnID ( ) ; try { // double check data - it might be a false flush ( called on clean - up )
if ( data . length ( ) > 0 ) { int totalDocs = data . entries ( ) ; int docsSent = 0 ; int docsSkipped = 0 ; int docsAbor... |
public class Include { private void includeFile ( File file ) throws IOException { } } | if ( ! file . exists ( ) ) throw new FileNotFoundException ( file . toString ( ) ) ; if ( file . isDirectory ( ) ) { List list = new List ( List . Unordered ) ; String [ ] ls = file . list ( ) ; for ( int i = 0 ; i < ls . length ; i ++ ) list . add ( ls [ i ] ) ; StringWriter sw = new StringWriter ( ) ; list . write ( ... |
public class BirthDateFromAncestorsEstimator { /** * Apply a standard adjustment from an ancestor ' s marriage date to a
* person ' s birth date .
* @ param date the ancestor ' s marriage date
* @ return the adjusted date */
private LocalDate ancestorAdjustment ( final LocalDate date ) { } } | if ( date == null ) { return null ; } return date . plusYears ( typicals . ageAtMarriage ( ) + typicals . gapBetweenChildren ( ) ) . withMonthOfYear ( 1 ) . withDayOfMonth ( 1 ) ; |
public class H2O { /** * Calculate a unique model id that includes User - Agent info ( if it can be discovered ) .
* For the user agent info to be discovered , this needs to be called from a Jetty thread .
* This lets us distinguish models created from R vs . other front - ends , for example .
* At some future po... | StringBuilder sb = new StringBuilder ( ) ; sb . append ( desc ) . append ( "_model_" ) ; // Append user agent string if we can figure it out .
String source = ServletUtils . getUserAgent ( ) ; if ( source != null ) { StringBuilder ua = new StringBuilder ( ) ; if ( source . contains ( "Safari" ) ) { ua . append ( "safar... |
public class JPAApplInfo { /** * Adds all of the Persistence Units defined in the specified
* persistence . xml file to the application , sorting by scope
* and archive name . < p >
* @ param pxml provides access to a persistence . xml file as well
* as the archive name and scope . */
public void addPersistence... | final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "addPersistenceUnits" , pxml ) ; JPAPuScope puScope = pxml . getPuScope ( ) ; String scopeKey = ( puScope == JPAPuScope . EAR_Scope ) ? EAR_SCOPE_MODULE_NAME : pxml . getArchiveName ( ) ; J... |
public class MeshGenerator { /** * Generates a solid cuboid mesh . This mesh includes the positions , normals , texture coords and tangents . The center is at the middle of the cuboid .
* @ param size The size of the cuboid to generate , on x , y and z
* @ return The vertex data */
public static VertexData generate... | final VertexData destination = new VertexData ( ) ; final VertexAttribute positionsAttribute = new VertexAttribute ( "positions" , DataType . FLOAT , 3 ) ; destination . addAttribute ( 0 , positionsAttribute ) ; final TFloatList positions = new TFloatArrayList ( ) ; final VertexAttribute normalsAttribute = new VertexAt... |
public class ApiOvhOrder { /** * Get prices and contracts information
* REST : GET / order / dedicated / server / { serviceName } / feature / { duration }
* @ param feature [ required ] the feature
* @ param serviceName [ required ] The internal name of your dedicated server
* @ param duration [ required ] Dura... | String qPath = "/order/dedicated/server/{serviceName}/feature/{duration}" ; StringBuilder sb = path ( qPath , serviceName , duration ) ; query ( sb , "feature" , feature ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return convertTo ( resp , OvhOrder . class ) ; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.