signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class PatternsImpl { /** * Updates a pattern .
* @ param appId The application ID .
* @ param versionId The version ID .
* @ param patternId The pattern ID .
* @ param pattern An object representing a pattern .
* @ throws IllegalArgumentException thrown if parameters fail the validation
* @ throws Er... | return updatePatternWithServiceResponseAsync ( appId , versionId , patternId , pattern ) . toBlocking ( ) . single ( ) . body ( ) ; |
public class SecurityAccessControl { /** * / * ( non - Javadoc )
* @ see nyla . solutions . core . security . data . AccessControl # getPermissions ( ) */
@ Override public synchronized List < Permission > getPermissions ( ) { } } | if ( permissions == null || permissions . isEmpty ( ) ) return null ; return new ArrayList < Permission > ( this . permissions ) ; |
public class EmbeddedWrappers { /** * Creates a new { @ link EmbeddedWrapper } with the given rel .
* @ param source can be { @ literal null } , will return { @ literal null } if so .
* @ param rel must not be { @ literal null } or empty .
* @ return */
@ SuppressWarnings ( "unchecked" ) @ Nullable public Embedde... | if ( source == null ) { return null ; } if ( source instanceof EmbeddedWrapper ) { return ( EmbeddedWrapper ) source ; } if ( source instanceof Collection ) { return new EmbeddedCollection ( ( Collection < Object > ) source , rel ) ; } if ( preferCollections ) { return new EmbeddedCollection ( Collections . singleton (... |
public class SettingsCommand { /** * CLI Utility Methods */
static SettingsCommand get ( Map < String , String [ ] > clArgs ) { } } | for ( Command cmd : Command . values ( ) ) { if ( cmd . category == null ) continue ; for ( String name : cmd . names ) { final String [ ] params = clArgs . remove ( name ) ; if ( params == null ) continue ; switch ( cmd . category ) { case BASIC : return SettingsCommandPreDefined . build ( cmd , params ) ; case MIXED ... |
public class XMLUtil { /** * Read an XML file and replies the DOM document .
* @ param file is the file to read
* @ return the DOM document red from the { @ code file } .
* @ throws IOException if the stream cannot be read .
* @ throws SAXException if the stream does not contains valid XML data .
* @ throws P... | assert file != null : AssertMessages . notNullParameter ( ) ; try ( FileInputStream fis = new FileInputStream ( file ) ) { return readXML ( fis ) ; } |
public class MenuFlyoutExample { /** * Adds an example menu item with the given text and an example action to the a parent component .
* @ param parent the component to add the menu item to .
* @ param text the text to display on the menu item .
* @ param selectedMenuText the WText to display the selected menu it... | WMenuItem menuItem = new WMenuItem ( text , new ExampleMenuAction ( selectedMenuText ) ) ; menuItem . setActionObject ( text ) ; if ( parent instanceof WSubMenu ) { ( ( WSubMenu ) parent ) . add ( menuItem ) ; } else { ( ( WMenuItemGroup ) parent ) . add ( menuItem ) ; } |
public class CookieUtils { /** * Convert the V0 Cookie into a Cookie header string .
* @ param cookie
* @ return the value of the header . */
private static String convertV0Cookie ( HttpCookie cookie ) { } } | StringBuilder buffer = new StringBuilder ( 40 ) ; // Append name = value
buffer . append ( cookie . getName ( ) ) ; String value = cookie . getValue ( ) ; if ( null != value && 0 != value . length ( ) ) { buffer . append ( '=' ) ; buffer . append ( value ) ; } else { // PK48196 - send an empty value string
buffer . app... |
public class SimpleApplication { /** * Write command - line help to the provided stream . If { @ code exit } is
* { @ code true } , exit with status code { @ link # EXIT _ FAILURE } .
* @ param o Options
* @ param exit Exit flag */
private void printHelp ( Options o , boolean exit , OutputStream os ) { } } | final PrintWriter pw = new PrintWriter ( os ) ; final String syntax = getUsage ( ) ; String header = getApplicationName ( ) ; header = header . concat ( "\nOptions:" ) ; HelpFormatter hf = new HelpFormatter ( ) ; hf . printHelp ( pw , 80 , syntax , header , o , 2 , 2 , null , false ) ; pw . flush ( ) ; if ( exit ) { ba... |
public class Optionals { /** * Accumulate the results only from those Optionals which have a value present , using the
* supplied Monoid ( a combining BiFunction / BinaryOperator and identity element that takes two
* input values of the same type and returns the combined result ) { @ see cyclops2 . Monoids } .
* ... | return sequencePresent ( optionals ) . map ( s -> s . reduce ( reducer ) ) ; |
public class PathHandler { /** * Adds a path prefix and a handler for that path . If the path does not start
* with a / then one will be prepended .
* The match is done on a prefix bases , so registering / foo will also match / bar . Exact
* path matches are taken into account first .
* If / is specified as the... | return addPrefixPath ( path , handler ) ; |
public class RulesApplier { /** * Determines if a token is matched by a rule element .
* @ param token the token to be matched by the element
* @ param element the element to be matched against the token
* @ return < code > true < / code > if there ' s a match , < code > false < / code > otherwise */
private bool... | boolean match ; boolean negated ; // Sees if the mask must or not match .
// Negated is optional , so it can be null , true or false .
// If null , consider as false .
if ( element . isNegated ( ) == null ) { match = false ; negated = false ; } else { match = element . isNegated ( ) . booleanValue ( ) ; negated = eleme... |
public class MultiAnalysisResult { /** * Provides the result for a sub - analysis .
* @ param subAnalysisLabel The label that was assigned to this sub - analysis in the
* MultiAnalysis request .
* @ return The result of the given sub - analysis . */
public QueryResult getResultFor ( String subAnalysisLabel ) { } ... | if ( ! this . analysesResults . containsKey ( subAnalysisLabel ) ) { throw new IllegalArgumentException ( "No results for a sub-analysis with that label." ) ; } return this . analysesResults . get ( subAnalysisLabel ) ; |
public class UniversalIdStrMessage { /** * Creates a new { @ link UniversalIdStrMessage } object .
* @ return */
@ SuppressWarnings ( "unchecked" ) public static UniversalIdStrMessage newInstance ( ) { } } | Date now = new Date ( ) ; UniversalIdStrMessage msg = new UniversalIdStrMessage ( ) ; msg . setId ( QueueUtils . IDGEN . generateId128Hex ( ) . toLowerCase ( ) ) . setTimestamp ( now ) ; return msg ; |
public class SwingGui { /** * Called when the source text for a script has been updated . */
@ Override public void updateSourceText ( Dim . SourceInfo sourceInfo ) { } } | RunProxy proxy = new RunProxy ( this , RunProxy . UPDATE_SOURCE_TEXT ) ; proxy . sourceInfo = sourceInfo ; SwingUtilities . invokeLater ( proxy ) ; |
public class ForwardPagingRestUi { /** * starts the REST server using JDK HttpServer ( com . sun . net . httpserver . HttpServer ) */
private static void startRestService ( CqlSession session ) throws IOException , InterruptedException { } } | final HttpServer server = JdkHttpServerFactory . createHttpServer ( BASE_URI , new VideoApplication ( session ) , false ) ; final ExecutorService executor = Executors . newSingleThreadExecutor ( ) ; server . setExecutor ( executor ) ; Runtime . getRuntime ( ) . addShutdownHook ( new Thread ( ( ) -> { System . out . pri... |
public class Logger { /** * Issue a formatted log message with a level of INFO .
* @ param format the format string as per { @ link String # format ( String , Object . . . ) } or resource bundle key therefor
* @ param param1 the sole parameter */
public void infof ( String format , Object param1 ) { } } | if ( isEnabled ( Level . INFO ) ) { doLogf ( Level . INFO , FQCN , format , new Object [ ] { param1 } , null ) ; } |
public class Measure { /** * getter for normalizedUnit - gets iso
* @ generated
* @ return value of the feature */
public String getNormalizedUnit ( ) { } } | if ( Measure_Type . featOkTst && ( ( Measure_Type ) jcasType ) . casFeat_normalizedUnit == null ) jcasType . jcas . throwFeatMissing ( "normalizedUnit" , "ch.epfl.bbp.uima.types.Measure" ) ; return jcasType . ll_cas . ll_getStringValue ( addr , ( ( Measure_Type ) jcasType ) . casFeatCode_normalizedUnit ) ; |
public class RAMDirectoryUtil { /** * Write a number of files from a ram directory to a data output .
* @ param out the data output
* @ param dir the ram directory
* @ param names the names of the files to write
* @ throws IOException */
public static void writeRAMFiles ( DataOutput out , RAMDirectory dir , Str... | out . writeInt ( names . length ) ; for ( int i = 0 ; i < names . length ; i ++ ) { Text . writeString ( out , names [ i ] ) ; long length = dir . fileLength ( names [ i ] ) ; out . writeLong ( length ) ; if ( length > 0 ) { // can we avoid the extra copy ?
IndexInput input = null ; try { input = dir . openInput ( name... |
public class CmsProjectSelectDialog { /** * Initializes the form component . < p >
* @ return the form component */
private FormLayout initForm ( ) { } } | FormLayout form = new FormLayout ( ) ; form . setWidth ( "100%" ) ; IndexedContainer sites = CmsVaadinUtils . getAvailableSitesContainer ( m_context . getCms ( ) , CAPTION_PROPERTY ) ; m_siteComboBox = prepareComboBox ( sites , org . opencms . workplace . Messages . GUI_LABEL_SITE_0 ) ; m_siteComboBox . select ( m_cont... |
public class MavenRemoteRepositories { /** * Overload of { @ link # createRemoteRepository ( String , URL , String ) } that thrown an exception if URL is wrong .
* @ param id The unique ID of the repository to create ( arbitrary name )
* @ param url The base URL of the Maven repository
* @ param layout he reposit... | try { return createRemoteRepository ( id , new URL ( url ) , layout ) ; } catch ( MalformedURLException e ) { throw new IllegalArgumentException ( "invalid URL" , e ) ; } |
public class FastLogFormatter { /** * - - - FORMATTER - - - */
public String format ( LogRecord record ) { } } | line . setLength ( 0 ) ; line . append ( '[' ) ; line . append ( Instant . ofEpochMilli ( record . getMillis ( ) ) . toString ( ) ) ; final Level l = record . getLevel ( ) ; line . append ( "] " ) ; if ( l == Level . SEVERE ) { line . append ( SEVERE ) ; } else if ( l == Level . WARNING ) { line . append ( WARNING ) ; ... |
public class TxUtils { /** * Converts a transaction status to a text representation
* @ param status The status index
* @ return status as String or " STATUS _ INVALID ( value ) "
* @ see javax . transaction . Status */
public static String getStatusAsString ( int status ) { } } | if ( status >= Status . STATUS_ACTIVE && status <= Status . STATUS_ROLLING_BACK ) { return TX_STATUS_STRINGS [ status ] ; } else { return "STATUS_INVALID(" + status + ")" ; } |
public class HandlerUtils { /** * Sends the given response and status code to the given channel .
* @ param channelHandlerContext identifying the open channel
* @ param httpRequest originating http request
* @ param message which should be sent
* @ param statusCode of the message to send
* @ param headers add... | return sendResponse ( channelHandlerContext , HttpHeaders . isKeepAlive ( httpRequest ) , message , statusCode , headers ) ; |
public class DefaultApplicationPage { /** * { @ inheritDoc }
* Only one pageComponent is shown at a time , so if it ' s the active one ,
* remove all components from this page . */
protected void doRemovePageComponent ( PageComponent pageComponent ) { } } | if ( pageComponent == getActiveComponent ( ) ) { this . control . removeAll ( ) ; this . control . validate ( ) ; this . control . repaint ( ) ; } |
public class BufferedValueModel { /** * Reverts the value held by the value model back to the value held by the
* wrapped value model . */
public final void revert ( ) { } } | if ( isBuffering ( ) ) { if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Reverting buffered value '" + getValue ( ) + "' to value '" + wrappedModel . getValue ( ) + "'" ) ; } setValue ( wrappedModel . getValue ( ) ) ; } else { if ( logger . isDebugEnabled ( ) ) { logger . debug ( "No buffered edit to commit; not... |
public class AbstractVersionInfo { /** * parse and format a date string .
* @ param pversionDate string with date in versionDateFormat
* @ return the same date formated as dateFormatDisplay */
protected final String parseAndFormatDate ( final String pversionDate ) { } } | Date date ; if ( StringUtils . isEmpty ( pversionDate ) ) { date = new Date ( ) ; } else { try { date = versionDateFormat . parse ( pversionDate ) ; } catch ( final IllegalArgumentException e ) { date = new Date ( ) ; } } return dateFormatDisplay . format ( date ) ; |
public class Tile { /** * Removes the given TimeSection from the list of sections .
* Sections in the Medusa library usually are less eye - catching
* than Areas .
* @ param SECTION */
public void removeTimeSection ( final TimeSection SECTION ) { } } | if ( null == SECTION ) return ; getTimeSections ( ) . remove ( SECTION ) ; getTimeSections ( ) . sort ( new TimeSectionComparator ( ) ) ; fireTileEvent ( SECTION_EVENT ) ; |
public class AmazonWorkMailClient { /** * Returns an overview of the members of a group . Users and groups can be members of a group .
* @ param listGroupMembersRequest
* @ return Result of the ListGroupMembers operation returned by the service .
* @ throws EntityNotFoundException
* The identifier supplied for ... | request = beforeClientExecution ( request ) ; return executeListGroupMembers ( request ) ; |
public class Interval { /** * Gets the overlap between this interval and another interval .
* Intervals are inclusive of the start instant and exclusive of the end .
* An interval overlaps another if it shares some common part of the
* datetime continuum . This method returns the amount of the overlap ,
* only ... | interval = DateTimeUtils . getReadableInterval ( interval ) ; if ( overlaps ( interval ) == false ) { return null ; } long start = Math . max ( getStartMillis ( ) , interval . getStartMillis ( ) ) ; long end = Math . min ( getEndMillis ( ) , interval . getEndMillis ( ) ) ; return new Interval ( start , end , getChronol... |
public class DialogPrimitiveFactoryImpl { /** * ( non - Javadoc )
* @ see org . restcomm . protocols . ss7 . tcap . api . tc . dialog . DialogPrimitiveFactory
* # createEnd ( org . restcomm . protocols . ss7 . tcap . api . tc . dialog . Dialog ) */
public TCEndRequest createEnd ( Dialog d ) { } } | if ( d == null ) { throw new NullPointerException ( "Dialog is null" ) ; } TCEndRequestImpl tcer = new TCEndRequestImpl ( ) ; tcer . setDialog ( d ) ; tcer . setOriginatingAddress ( d . getLocalAddress ( ) ) ; // FIXME : add dialog portion fill
return tcer ; |
public class GenericQueueMessage { /** * { @ inheritDoc } */
@ Deprecated @ Override public GenericQueueMessage < ID , DATA > qData ( DATA data ) { } } | setData ( data ) ; return this ; |
public class UtlInvBase { /** * < p > Adds total tax by category for farther invoice adjusting . < / p >
* @ param pTxdLns Tax Data lines
* @ param pCatId tax category ID
* @ param pSubt subtotal without taxes
* @ param pSubtFc subtotal FC without taxes
* @ param pPercent tax rate
* @ param pAs AS
* @ par... | SalesInvoiceServiceLine txdLn = null ; for ( SalesInvoiceServiceLine tdl : pTxdLns ) { if ( tdl . getItsId ( ) . equals ( pCatId ) ) { txdLn = tdl ; } } if ( txdLn == null ) { txdLn = new SalesInvoiceServiceLine ( ) ; txdLn . setItsId ( pCatId ) ; InvItemTaxCategory tc = new InvItemTaxCategory ( ) ; tc . setItsId ( pCa... |
public class VoiceApi { /** * Start monitoring an agent
* Start supervisor monitoring of an agent . Use the parameters to specify how the monitoring should behave . Once you & # 39 ; ve enabled monitoring , you can change the monitoring mode using [ / voice / calls / { id } / switch - to - listen - in ( Mute ) ] ( / ... | com . squareup . okhttp . Call call = startMonitoringValidateBeforeCall ( startMonitoringData , null , null ) ; Type localVarReturnType = new TypeToken < ApiSuccessResponse > ( ) { } . getType ( ) ; return apiClient . execute ( call , localVarReturnType ) ; |
public class RecoveryPointByBackupVaultMarshaller { /** * Marshall the given parameter object . */
public void marshall ( RecoveryPointByBackupVault recoveryPointByBackupVault , ProtocolMarshaller protocolMarshaller ) { } } | if ( recoveryPointByBackupVault == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( recoveryPointByBackupVault . getRecoveryPointArn ( ) , RECOVERYPOINTARN_BINDING ) ; protocolMarshaller . marshall ( recoveryPointByBackupVault . getBackupVaul... |
public class AbstractCache { /** * This method imports all elements from VocabCache passed as argument
* If element already exists ,
* @ param vocabCache */
public void importVocabulary ( @ NonNull VocabCache < T > vocabCache ) { } } | AtomicBoolean added = new AtomicBoolean ( false ) ; for ( T element : vocabCache . vocabWords ( ) ) { if ( this . addToken ( element ) ) added . set ( true ) ; } // logger . info ( " Current state : { } ; Adding value : { } " , this . documentsCounter . get ( ) , vocabCache . totalNumberOfDocs ( ) ) ;
if ( added . get ... |
public class ImportManager { /** * Checks if the module for importer has been loaded in the memory . If bundle doesn ' t exists , it loades one and
* updates the mapping records of the bundles .
* @ param moduleProperties
* @ return true , if the bundle corresponding to the importer is in memory ( uploaded or was... | String importModuleName = moduleProperties . getProperty ( ImportDataProcessor . IMPORT_MODULE ) ; String attrs [ ] = importModuleName . split ( "\\|" ) ; String bundleJar = attrs [ 1 ] ; String moduleType = attrs [ 0 ] ; try { AbstractImporterFactory importerFactory = m_loadedBundles . get ( bundleJar ) ; if ( importe... |
public class HeapBuffer { /** * Allocates a new direct buffer .
* @ param initialCapacity The initial capacity of the buffer to allocate ( in bytes ) .
* @ param maxCapacity The maximum capacity of the buffer .
* @ return The direct buffer .
* @ throws IllegalArgumentException If { @ code capacity } or { @ code... | checkArgument ( initialCapacity <= maxCapacity , "initial capacity cannot be greater than maximum capacity" ) ; return new HeapBuffer ( HeapBytes . allocate ( ( int ) Math . min ( Memory . Util . toPow2 ( initialCapacity ) , MAX_SIZE ) ) , 0 , initialCapacity , maxCapacity ) ; |
public class MenuDrawer { /** * Returns the ViewGroup used as a parent for the content view .
* @ return The content view ' s parent . */
public ViewGroup getContentContainer ( ) { } } | if ( mDragMode == MENU_DRAG_CONTENT ) { return mContentContainer ; } else { return ( ViewGroup ) findViewById ( android . R . id . content ) ; } |
public class ConsoleCommandHandler { /** * Called by handleCommand . */
String doHandleCommand ( final String command ) { } } | app . handleCommand ( command ) ; final String output = buffer . toString ( ) ; buffer . setLength ( 0 ) ; return output ; |
public class FormatTrackingHSSFListenerPlus { /** * Formats the given numeric of date cells contents as a String , in as
* close as we can to the way that Excel would do so . Uses the various
* format records to manage this .
* TODO - move this to a central class in such a way that hssf . usermodel can
* make u... | double value ; if ( cell instanceof NumberRecord ) { value = ( ( NumberRecord ) cell ) . getValue ( ) ; } else if ( cell instanceof FormulaRecord ) { value = ( ( FormulaRecord ) cell ) . getValue ( ) ; } else { throw new IllegalArgumentException ( "Unsupported CellValue Record passed in " + cell ) ; } // Get the built ... |
public class CmsNewResourceBuilder { /** * Triggers the resource creation . < p >
* @ return the created resource
* @ throws CmsException if something goes wrong */
public CmsResource createResource ( ) throws CmsException { } } | String path = OpenCms . getResourceManager ( ) . getNameGenerator ( ) . getNewFileName ( m_cms , m_pathWithPattern , 5 , m_explorerNameGeneration ) ; Locale contentLocale = OpenCms . getLocaleManager ( ) . getDefaultLocale ( m_cms , CmsResource . getFolderPath ( path ) ) ; CmsRequestContext context = m_cms . getRequest... |
public class SortContext { /** * Sort the given list by using the given property to evaluate against
* each element in the list comparing the resulting values . For example ,
* if the object list contained User instances that had a lastName
* property , then you could sort the list by last name via :
* < code >... | BeanComparator comparator = newBeanComparator ( type , property , reverse ) ; Collections . sort ( list , comparator ) ; |
public class DescribeInstancePatchStatesForPatchGroupResult { /** * The high - level patch state for the requested instances .
* @ param instancePatchStates
* The high - level patch state for the requested instances . */
public void setInstancePatchStates ( java . util . Collection < InstancePatchState > instancePa... | if ( instancePatchStates == null ) { this . instancePatchStates = null ; return ; } this . instancePatchStates = new com . amazonaws . internal . SdkInternalList < InstancePatchState > ( instancePatchStates ) ; |
public class NumberMath { /** * For this operation , consider the operands independently . Throw an exception if the right operand
* ( shift distance ) is not an integral type . For the left operand ( shift value ) also require an integral
* type , but do NOT promote from Integer to Long . This is consistent with J... | if ( isFloatingPoint ( right ) || isBigDecimal ( right ) ) { throw new UnsupportedOperationException ( "Shift distance must be an integral type, but " + right + " (" + right . getClass ( ) . getName ( ) + ") was supplied" ) ; } return getMath ( left ) . leftShiftImpl ( left , right ) ; |
public class SerializationUtils { /** * Deserialize / read a { @ link State } instance from a file .
* @ param fs the { @ link FileSystem } instance for opening the file
* @ param jobStateFilePath the path to the file
* @ param state an empty { @ link State } instance to deserialize into
* @ param < T > the { @... | try ( InputStream is = fs . open ( jobStateFilePath ) ) { deserializeStateFromInputStream ( is , state ) ; } |
public class PublicanPODocBookBuilder { /** * Add an entry to a PO file .
* @ param tag The XML element name .
* @ param source The original source string .
* @ param translation The translated string .
* @ param fuzzy If the translation is fuzzy .
* @ param poFile The PO file to add to . */
protected void ad... | // perform a check to make sure the source isn ' t an empty string , as this could be the case after removing the comments
if ( source == null || source . length ( ) == 0 ) return ; poFile . append ( "\n" ) ; if ( ! isNullOrEmpty ( tag ) ) { poFile . append ( "#. Tag: " ) . append ( tag ) . append ( "\n" ) ; } if ( fuz... |
public class Label { /** * Number of total { @ link Executor } s that belong to this label that are functioning .
* This excludes executors that belong to offline nodes . */
@ Exported public int getTotalExecutors ( ) { } } | int r = 0 ; for ( Node n : getNodes ( ) ) { Computer c = n . toComputer ( ) ; if ( c != null && c . isOnline ( ) ) r += c . countExecutors ( ) ; } return r ; |
public class SSD1306MessageFactory { /** * Setup page start and end address . < br >
* This command is only for horizontal or vertical addressing mode .
* @ param startAddress Page start Address , range : 0-7
* @ param endAddress Page end Address , range : 0-7
* @ return command sequence */
public static byte [... | if ( startAddress < 0 || startAddress > 7 || endAddress < 0 || endAddress > 7 ) { throw new IllegalArgumentException ( "Start and end address must be between 0 and 7." ) ; } return new byte [ ] { COMMAND_CONTROL_BYTE , SET_PAGE_ADDR , COMMAND_CONTROL_BYTE , startAddress , COMMAND_CONTROL_BYTE , endAddress } ; |
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link GeodeticDatumType } { @ code > }
* @ param value
* Java instance representing xml element ' s value .
* @ return
* the new instance of { @ link JAXBElement } { @ code < } { @ link GeodeticDatumType } { @ code >... | return new JAXBElement < GeodeticDatumType > ( _GeodeticDatum_QNAME , GeodeticDatumType . class , null , value ) ; |
public class LexTokenReader { /** * Read a simple identifier without a module name prefix .
* @ return a simple name . */
private String rdIdentifier ( ) { } } | StringBuilder id = new StringBuilder ( ) ; id . append ( ch ) ; while ( restOfName ( rdCh ( ) ) ) { id . append ( ch ) ; } return id . toString ( ) ; |
public class RuleImpl { /** * Retrieve the set of all < i > root fact object < / i > parameter
* < code > Declarations < / code > .
* @ return The Set of < code > Declarations < / code > in order which specify the
* < i > root fact objects < / i > . */
@ SuppressWarnings ( "unchecked" ) public Map < String , Decl... | if ( this . dirty || ( this . declarations == null ) ) { this . declarations = this . getExtendedLhs ( this , null ) . getOuterDeclarations ( ) ; this . dirty = false ; } return this . declarations ; |
public class VEvent { /** * Overrides default copy method to add support for copying alarm sub - components .
* @ return a copy of the instance
* @ throws ParseException where values in the instance cannot be parsed
* @ throws IOException where values in the instance cannot be read
* @ throws URISyntaxException... | final VEvent copy = ( VEvent ) super . copy ( ) ; copy . alarms = new ComponentList < VAlarm > ( alarms ) ; return copy ; |
public class ParserRegistry { /** * Serializes a full configuration to an { @ link OutputStream }
* @ param os the output stream where the configuration should be serialized to
* @ param globalConfiguration the global configuration . Can be null
* @ param configurations a map of named configurations
* @ throws ... | BufferedOutputStream output = new BufferedOutputStream ( os ) ; XMLStreamWriter subWriter = XMLOutputFactory . newInstance ( ) . createXMLStreamWriter ( output ) ; XMLExtendedStreamWriter writer = new XMLExtendedStreamWriterImpl ( subWriter ) ; serialize ( writer , globalConfiguration , configurations ) ; subWriter . c... |
public class RestClientUtil { /** * 发送es restful sql请求 / _ xpack / sql , 获取返回值 , 返回值类型由beanType决定
* @ param beanType
* @ param entity
* @ param < T >
* @ return
* @ throws ElasticSearchException */
public < T > T sqlObject ( Class < T > beanType , String entity ) throws ElasticSearchException { } } | SQLRestResponse result = this . client . executeRequest ( "/_xpack/sql" , entity , new SQLRestResponseHandler ( ) ) ; return ResultUtil . buildSQLObject ( result , beanType ) ; |
public class RemoteCORBAObjectInstanceImpl { /** * ( non - Javadoc )
* @ see com . ibm . ws . clientcontainer . remote . common . object . RemoteObjectInstance # getObject ( com . ibm . ws . serialization . SerializationService ) */
@ Override public Object getObject ( ) throws RemoteObjectInstanceException { } } | Object object ; ClassLoader tccl = AccessController . doPrivileged ( new PrivilegedAction < ClassLoader > ( ) { @ Override public ClassLoader run ( ) { return Thread . currentThread ( ) . getContextClassLoader ( ) ; } } ) ; try { Class < ? > interfaceToNarrowTo = Class . forName ( interfaceNameToNarrowTo , false , tccl... |
public class SipServletRequestImpl { /** * ( non - Javadoc )
* @ see javax . servlet . sip . SipServletRequest # createResponse ( int , java . lang . String ) */
public SipServletResponse createResponse ( final int statusCode , final String reasonPhrase ) { } } | return createResponse ( statusCode , reasonPhrase , true , false ) ; |
public class DescribeWorkspacesResult { /** * Information about the WorkSpaces .
* Because < a > CreateWorkspaces < / a > is an asynchronous operation , some of the returned information could be
* incomplete .
* < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use
* { @ link... | if ( this . workspaces == null ) { setWorkspaces ( new com . amazonaws . internal . SdkInternalList < Workspace > ( workspaces . length ) ) ; } for ( Workspace ele : workspaces ) { this . workspaces . add ( ele ) ; } return this ; |
public class StringUtils { /** * Repeat string .
* @ param c the c
* @ param count the count
* @ return the string */
public static String repeat ( char c , int count ) { } } | StringBuilder builder = new StringBuilder ( ) ; for ( int i = 0 ; i < count ; i ++ ) { builder . append ( c ) ; } return builder . toString ( ) ; |
public class ChainLight { /** * Applies attached body initial transform to all lights rays */
void applyAttachment ( ) { } } | if ( body == null || staticLight ) return ; restorePosition . setToTranslation ( bodyPosition ) ; rotateAroundZero . setToRotationRad ( bodyAngle + bodyAngleOffset ) ; for ( int i = 0 ; i < rayNum ; i ++ ) { tmpVec . set ( startX [ i ] , startY [ i ] ) . mul ( rotateAroundZero ) . mul ( restorePosition ) ; startX [ i ]... |
public class HTODInvalidationBuffer { /** * Call this method to check whether a specified id exists in the invalidation explicit or scan buffer .
* @ param id
* - cache id .
* @ return boolean - true means a specified id is found . */
protected synchronized boolean contains ( Object id ) { } } | boolean found = false ; if ( this . explicitBuffer . containsKey ( id ) || this . scanBuffer . contains ( id ) ) { found = true ; } return found ; |
public class Role { /** * Filters the scopes corresponding to a type
* @ param < S > the type of the scope to filter .
* @ param scopeType the type of scope
* @ return the scopes of the given type */
@ SuppressWarnings ( "unchecked" ) public < S extends Scope > Set < S > getScopesByType ( Class < S > scopeType ) ... | Set < S > typedScopes = new HashSet < > ( ) ; for ( Scope scope : getScopes ( ) ) { if ( scopeType . isInstance ( scope ) ) { typedScopes . add ( ( S ) scope ) ; } } return typedScopes ; |
public class HttpsConnectorFactory { /** * Given a list of protocols available to the JVM that we can serve up to the client , partition
* this list into two groups : a group of protocols we can serve and a group where we can ' t . This
* list takes into account protocols that may have been disabled at the JVM leve... | final List < Pattern > enabled = Arrays . stream ( enabledByJVM ) . map ( Pattern :: compile ) . collect ( Collectors . toList ( ) ) ; final List < Pattern > disabled = Arrays . stream ( excludedByConfig ) . map ( Pattern :: compile ) . collect ( Collectors . toList ( ) ) ; final List < Pattern > included = Arrays . st... |
public class Document { /** * Overwrites the form fields for this document . This is useful when
* manually migrating form fields from a template .
* @ param formFields List
* @ throws HelloSignException thrown if there is a problem adding the
* FormFields to this Document . */
public void setFormFields ( List ... | clearList ( DOCUMENT_FORM_FIELDS ) ; for ( FormField formField : formFields ) { addFormField ( formField ) ; } |
public class HttpResourceHandler { /** * Fetches the HttpMethod from annotations and returns String representation of HttpMethod .
* Return emptyString if not present .
* @ param method Method handling the http request .
* @ return String representation of HttpMethod from annotations or emptyString as a default .... | Set < HttpMethod > httpMethods = new HashSet < > ( ) ; if ( method . isAnnotationPresent ( GET . class ) ) { httpMethods . add ( HttpMethod . GET ) ; } if ( method . isAnnotationPresent ( PUT . class ) ) { httpMethods . add ( HttpMethod . PUT ) ; } if ( method . isAnnotationPresent ( POST . class ) ) { httpMethods . ad... |
public class ListUtil { /** * returns count of items in the list
* @ param list
* @ param delimiter
* @ return list len */
public static int len ( String list , String delimiter , boolean ignoreEmpty ) { } } | if ( delimiter . length ( ) == 1 ) return len ( list , delimiter . charAt ( 0 ) , ignoreEmpty ) ; char [ ] del = delimiter . toCharArray ( ) ; int len = StringUtil . length ( list ) ; if ( len == 0 ) return 0 ; int count = 0 ; int last = 0 ; char c ; for ( int i = 0 ; i < len ; i ++ ) { c = list . charAt ( i ) ; for ( ... |
public class Director { /** * Finds all assets matching the search string and the specified type .
* If type is AssetType . all then all matching assets will be returned .
* @ param searchStr the search string
* @ param type the assetType to search for
* @ return Map of Resource type to repository resouce lists... | Map < ResourceType , List < RepositoryResource > > results = new HashMap < ResourceType , List < RepositoryResource > > ( ) ; List < RepositoryResource > addOns = new ArrayList < RepositoryResource > ( ) ; List < RepositoryResource > features = new ArrayList < RepositoryResource > ( ) ; List < RepositoryResource > samp... |
public class DefaultStreamTokenizer { /** * Checks , if any prebuffered tokens left , otherswise checks underlying stream
* @ return */
@ Override public boolean hasMoreTokens ( ) { } } | log . info ( "Tokens size: [" + tokens . size ( ) + "], position: [" + position . get ( ) + "]" ) ; if ( ! tokens . isEmpty ( ) ) return position . get ( ) < tokens . size ( ) ; else return streamHasMoreTokens ( ) ; |
public class PathMatchingResourcePatternResolver { /** * Recursively retrieve files that match the given pattern ,
* adding them to the given result list .
* @ param fullPattern the pattern to match against ,
* with prepended root directory path
* @ param dir the current directory
* @ param result the Set of ... | File [ ] dirContents = dir . listFiles ( ) ; if ( dirContents == null ) { return ; } for ( File content : dirContents ) { String currPath = content . getAbsolutePath ( ) . replace ( File . separator , "/" ) ; if ( content . isDirectory ( ) && getPathMatcher ( ) . matchStart ( fullPattern , currPath + "/" ) ) { if ( con... |
public class ReportUtil { /** * Get expression elements from report layout
* @ param layout
* report layout
* @ return list of expression elements from report layout */
public static List < ExpressionBean > getExpressions ( ReportLayout layout ) { } } | List < ExpressionBean > expressions = new LinkedList < ExpressionBean > ( ) ; for ( Band band : layout . getBands ( ) ) { for ( int i = 0 , rows = band . getRowCount ( ) ; i < rows ; i ++ ) { List < BandElement > list = band . getRow ( i ) ; for ( BandElement be : list ) { if ( be instanceof ExpressionBandElement ) { i... |
public class CmsExplorer { /** * Generates the footer of the explorer initialization code . < p >
* @ param numberOfPages the number of pages
* @ param selectedPage the selected page to display
* @ return js code for initializing the explorer view
* @ see # getInitializationHeader ( )
* @ see # getInitializat... | StringBuffer content = new StringBuffer ( 1024 ) ; content . append ( "top.dU(document," ) ; content . append ( numberOfPages ) ; content . append ( "," ) ; content . append ( selectedPage ) ; content . append ( "); \n" ) ; // display eventual error message
if ( getSettings ( ) . getErrorMessage ( ) != null ) { // disp... |
public class MessageDigestUtilImpl { /** * 获取指定算法对应的MessageDigest
* @ param algorithms 算法
* @ return MessageDigest */
private MessageDigest getMessageDigest ( Algorithms algorithms ) { } } | try { return MessageDigest . getInstance ( algorithms . getAlgorithms ( ) ) ; } catch ( NoSuchAlgorithmException exception ) { throw new SecureException ( "当前系统没有指定的算法提供者:[" + "" + "]" , exception ) ; } |
public class GoogleAnalyticsRequest { /** * < div class = " ind " >
* Optional .
* < p > Each custom dimension has an associated index . There is a maximum of 20 custom dimensions ( 200 for Premium accounts ) . The name suffix must be a positive integer between 1 and 200 , inclusive . < / p >
* < table border = "... | customDimentions . put ( "cd" + index , value ) ; return ( T ) this ; |
public class PropertiesUtil { /** * Resolve the given value with the given properties . */
public static String resolve ( String value , Map < String , String > properties ) { } } | do { int i = value . indexOf ( "${" ) ; if ( i < 0 ) return value ; int j = value . indexOf ( '}' , i + 2 ) ; if ( j < 0 ) return value ; String name = value . substring ( i + 2 , j ) ; String val = properties . get ( name ) ; if ( val == null ) val = "" ; value = value . substring ( 0 , i ) + val + value . substring (... |
public class CollectionUtil { /** * List转换
* @ param fromList
* @ param function
* @ return */
public static < F , T > List < T > transform ( Collection < F > fromList , Function < ? super F , ? extends T > function ) { } } | if ( CollectionUtil . isEmpty ( fromList ) ) { return Collections . emptyList ( ) ; } List < T > ret = new ArrayList < T > ( fromList . size ( ) ) ; for ( F f : fromList ) { T t = function . apply ( f ) ; if ( t == null ) { continue ; } ret . add ( t ) ; } return ret ; |
public class AWSDatabaseMigrationServiceClient { /** * Modifies the specified endpoint .
* @ param modifyEndpointRequest
* @ return Result of the ModifyEndpoint operation returned by the service .
* @ throws InvalidResourceStateException
* The resource is in a state that prevents it from being used for database... | request = beforeClientExecution ( request ) ; return executeModifyEndpoint ( request ) ; |
public class IOUtil { /** * check if given encoding is ok
* @ param encoding
* @ throws PageException */
public static void checkEncoding ( String encoding ) throws IOException { } } | try { URLEncoder . encode ( "" , encoding ) ; } catch ( UnsupportedEncodingException e ) { throw new IOException ( "invalid encoding [" + encoding + "]" ) ; } |
public class Log { /** * set the value file
* @ param file value to set
* @ throws ApplicationException */
public void setFile ( String file ) throws ApplicationException { } } | if ( StringUtil . isEmpty ( file ) ) return ; if ( file . indexOf ( '/' ) != - 1 || file . indexOf ( '\\' ) != - 1 ) throw new ApplicationException ( "value [" + file + "] from attribute [file] at tag [log] can only contain a filename, file separators like [\\/] are not allowed" ) ; if ( ! file . endsWith ( ".log" ) ) ... |
public class JavaSourceUtils { /** * 合并枚举常量集合 */
public static List < EnumConstantDeclaration > mergeEnumConstants ( List < EnumConstantDeclaration > one , List < EnumConstantDeclaration > two ) { } } | if ( isAllNull ( one , two ) ) return null ; List < EnumConstantDeclaration > ecds = null ; if ( isAllNotNull ( one , two ) ) { ecds = new ArrayList < > ( ) ; List < EnumConstantDeclaration > notMatched = new ArrayList < > ( ) ; notMatched . addAll ( two ) ; for ( EnumConstantDeclaration outer : one ) { boolean found =... |
public class OGraphDatabase { /** * Retrieves the outgoing edges of vertex iVertex having the requested properties iProperties
* @ param iVertex
* Target vertex
* @ param iProperties
* Map where keys are property names and values the expected values
* @ return */
public Set < OIdentifiable > getOutEdgesHaving... | final ODocument vertex = iVertex . getRecord ( ) ; checkVertexClass ( vertex ) ; return filterEdgesByProperties ( ( OMVRBTreeRIDSet ) vertex . field ( VERTEX_FIELD_OUT ) , iProperties ) ; |
public class Transform3D { /** * Set the position .
* This function changes only the elements of
* the matrix related to the translation .
* The scaling and the shearing are not changed .
* After a call to this function , the matrix will
* contains ( ? means any value ) :
* < pre >
* < / pre >
* @ param... | this . m03 = x ; this . m13 = y ; this . m23 = z ; |
public class InvocationManager { /** * Returns the invocation cache hit count . */
public long getInvocationCacheHitCount ( ) { } } | LruCache < Object , I > invocationCache = _invocationCache ; if ( invocationCache != null ) { return invocationCache . getHitCount ( ) ; } else { return 0 ; } |
public class L { /** * < p > < b > DEBUG : < / b > This level of logging should be used to further note what is happening on the device that
* could be relevant to investigate and debug unexpected behaviors . You should log only what is needed to gather
* enough information about what is going on about your compone... | if ( BuildConfig . DEBUG ) { Log . d ( LOG_TAG , msg , cause ) ; } |
public class Connection { /** * { @ inheritDoc } */
public void setClientInfo ( final String name , final String value ) throws SQLClientInfoException { } } | if ( this . closed ) { throw new SQLClientInfoException ( ) ; } // end of if
this . clientInfo . put ( name , value ) ; |
public class DateInterval { /** * / * [ deutsch ]
* < p > Erzeugt ein unbegrenztes Intervall bis zum angegebenen
* Endedatum . < / p >
* @ param end date of upper boundary ( inclusive )
* @ return new date interval
* @ since 2.0 */
public static DateInterval until ( PlainDate end ) { } } | Boundary < PlainDate > past = Boundary . infinitePast ( ) ; return new DateInterval ( past , Boundary . of ( CLOSED , end ) ) ; |
public class RoleAssignmentsInner { /** * Creates a role assignment .
* @ param scope The scope of the role assignment to create . The scope can be any REST resource instance . For example , use ' / subscriptions / { subscription - id } / ' for a subscription , ' / subscriptions / { subscription - id } / resourceGrou... | return createWithServiceResponseAsync ( scope , roleAssignmentName , parameters ) . toBlocking ( ) . single ( ) . body ( ) ; |
public class TabularSummaryOutput { /** * { @ inheritDoc } */
@ Override public void visitBenchmark ( final BenchmarkResult benchRes ) { } } | final int numberOfColumns = 9 ; NiceTable table = new NiceTable ( numberOfColumns ) ; table = generateHeader ( table ) ; for ( final AbstractMeter meter : benchRes . getRegisteredMeters ( ) ) { table . addHeader ( meter . getName ( ) , '=' , Alignment . Center ) ; for ( final ClassResult classRes : benchRes . getInclud... |
public class CmsNewResourceXmlPage { /** * Returns a sorted Map of all available body files of the OpenCms modules . < p >
* @ param cms the current cms object
* @ param currWpPath the current path in the OpenCms workplace
* @ return a sorted map with the body file title as key and absolute path to the body file ... | return getElements ( cms , CmsWorkplace . VFS_DIR_DEFAULTBODIES , currWpPath , true ) ; |
public class CmsSystemInfo { /** * Returns the context for static resources served from the class path , e . g . " / opencms / opencms / handleStatic " . < p >
* @ return the static resource context */
public String getStaticResourceContext ( ) { } } | if ( m_staticResourcePathFragment == null ) { m_staticResourcePathFragment = CmsStaticResourceHandler . getStaticResourceContext ( OpenCms . getStaticExportManager ( ) . getVfsPrefix ( ) , getVersionNumber ( ) ) ; } return m_staticResourcePathFragment ; |
public class UploadObjectObserver { /** * Notified from
* { @ link AmazonS3EncryptionClient # uploadObject ( UploadObjectRequest ) } to
* initiate a multi - part upload .
* @ param req
* the upload object request
* @ return the initiated multi - part uploadId */
public String onUploadInitiation ( UploadObject... | InitiateMultipartUploadResult res = s3 . initiateMultipartUpload ( newInitiateMultipartUploadRequest ( req ) ) ; return this . uploadId = res . getUploadId ( ) ; |
public class PDFView { /** * Place the minimap current rectangle considering the minimap bounds
* the zoom level , and the current X / Y offsets */
private void calculateMinimapAreaBounds ( ) { } } | if ( minimapBounds == null ) { return ; } if ( zoom == 1f ) { miniMapRequired = false ; } else { // Calculates the bounds of the current displayed area
float x = ( - currentXOffset - toCurrentScale ( currentFilteredPage * optimalPageWidth ) ) / toCurrentScale ( optimalPageWidth ) * minimapBounds . width ( ) ; float wid... |
public class JavacState { /** * Return those files belonging to prev , but not now . */
private Set < Source > calculateRemovedSources ( ) { } } | Set < Source > removed = new HashSet < > ( ) ; for ( String src : prev . sources ( ) . keySet ( ) ) { if ( now . sources ( ) . get ( src ) == null ) { removed . add ( prev . sources ( ) . get ( src ) ) ; } } return removed ; |
public class BasePersistence { /** * { @ inheritDoc } */
@ Override public List < T > findByNamedQuery ( String queryName , Object ... params ) { } } | return getPersistenceProvider ( ) . findByNamedQuery ( persistenceClass , queryName , params ) ; |
public class ScoreSettingsService { /** * Generate Score Criteria Settings from Score Settings */
public final void generateDashboardScoreSettings ( ) { } } | ScoreCriteriaSettings dashboardScoreCriteriaSettings = new ScoreCriteriaSettings ( ) ; dashboardScoreCriteriaSettings . setMaxScore ( this . scoreSettings . getMaxScore ( ) ) ; dashboardScoreCriteriaSettings . setType ( ScoreValueType . DASHBOARD ) ; dashboardScoreCriteriaSettings . setComponentAlert ( ComponentAlert .... |
public class SystemConfiguration { /** * Returns for given < code > _ key < / code > the related value as Properties . If
* no attribute is found an empty Properties is returned .
* Can concatenates Properties for Keys . < br / >
* e . b . Key , Key01 , Key02 , Key03
* @ param _ key key of searched attribute
... | final Properties ret = new Properties ( ) ; final String value = getAttributeValue ( _key ) ; if ( value != null ) { try { ret . load ( new StringReader ( value ) ) ; } catch ( final IOException e ) { throw new EFapsException ( SystemConfiguration . class , "getAttributeValueAsProperties" , e ) ; } } if ( _concatenate ... |
public class Neighbour { /** * Marks all the proxies from this Neighbour .
* This is used for resynching the state between what this
* ME has registered and what the ME has sent . */
void markAllProxies ( ) { } } | if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "markAllProxies" ) ; final Enumeration enu = iProxies . elements ( ) ; // Cycle through each of the proxies
while ( enu . hasMoreElements ( ) ) { final MESubscription sub = ( MESubscription ) enu . nextElement ( ) ; // Mark ... |
public class Crouton { /** * Creates a { @ link Crouton } with provided text - resource and style for a given
* activity and displays it directly .
* @ param activity
* The { @ link Activity } that the { @ link Crouton } should be attached
* to .
* @ param textResourceId
* The resource id of the text you wa... | showText ( activity , activity . getString ( textResourceId ) , style ) ; |
public class MonthDay { /** * Returns a copy of this month - day with the specified chronology .
* This instance is immutable and unaffected by this method call .
* This method retains the values of the fields , thus the result will
* typically refer to a different instant .
* The time zone of the specified chr... | newChronology = DateTimeUtils . getChronology ( newChronology ) ; newChronology = newChronology . withUTC ( ) ; if ( newChronology == getChronology ( ) ) { return this ; } else { MonthDay newMonthDay = new MonthDay ( this , newChronology ) ; newChronology . validate ( newMonthDay , getValues ( ) ) ; return newMonthDay ... |
public class CmsAfterPublishStaticExportHandler { /** * Exports all template resources found in a list of published resources . < p >
* @ param cms the cms context , in the root site as Export user
* @ param publishedTemplateResources list of potential candidates to export
* @ param report an I _ CmsReport instan... | CmsStaticExportManager manager = OpenCms . getStaticExportManager ( ) ; int size = publishedTemplateResources . size ( ) ; int count = 1 ; if ( LOG . isDebugEnabled ( ) ) { LOG . debug ( Messages . get ( ) . getBundle ( ) . key ( Messages . LOG_EXPORT_TEMPLATES_1 , new Integer ( size ) ) ) ; } report . println ( Messag... |
public class DefaultConsistentHashFactory { /** * Merges two consistent hash objects that have the same number of segments , numOwners and hash function .
* For each segment , the primary owner of the first CH has priority , the other primary owners become backups . */
@ Override public DefaultConsistentHash union ( ... | return dch1 . union ( dch2 ) ; |
public class TransitionSet { /** * Sets the play order of this set ' s child transitions .
* @ param ordering { @ link # ORDERING _ TOGETHER } to play this set ' s child
* transitions together , { @ link # ORDERING _ SEQUENTIAL } to play the child
* transitions in sequence .
* @ return This transitionSet object... | switch ( ordering ) { case ORDERING_SEQUENTIAL : mPlayTogether = false ; break ; case ORDERING_TOGETHER : mPlayTogether = true ; break ; default : throw new AndroidRuntimeException ( "Invalid parameter for TransitionSet " + "ordering: " + ordering ) ; } return this ; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.