signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class JDBCSQLXML { /** * Retrieves a new Result for setting the XML value designated by this * SQLXML instance . * @ param resultClass The class of the result , or null . * @ throws java . sql . SQLException if there is an error processing the XML * value or the state is not writable * @ return for set...
checkWritable ( ) ; setWritable ( false ) ; setReadable ( true ) ; if ( JAXBResult . class . isAssignableFrom ( resultClass ) ) { // Must go first presently , since JAXBResult extends SAXResult // ( purely as an implmentation detail ) and it ' s not possible // to instantiate a valid JAXBResult with a Zero - Args // co...
public class AnalysisCache { /** * Analyze a method . * @ param classContext * ClassContext storing method analysis objects for method ' s * class * @ param analysisClass * class the method analysis object should belong to * @ param methodDescriptor * method descriptor identifying the method to analyze ...
IMethodAnalysisEngine < E > engine = ( IMethodAnalysisEngine < E > ) methodAnalysisEngineMap . get ( analysisClass ) ; if ( engine == null ) { throw new IllegalArgumentException ( "No analysis engine registered to produce " + analysisClass . getName ( ) ) ; } Profiler profiler = getProfiler ( ) ; profiler . start ( eng...
public class ValidateApplicationMojo { /** * Reports errors ( in the logger and in a file ) . * @ param errors * @ throws IOException */ private void reportErrors ( Collection < RoboconfError > errors ) throws IOException { } }
// Add a log entry getLog ( ) . info ( "Generating a report for validation errors under " + MavenPluginConstants . VALIDATION_RESULT_PATH ) ; // Generate the report ( file and console too ) StringBuilder sb = MavenPluginUtils . formatErrors ( errors , getLog ( ) ) ; // Write the report . // Reporting only makes sense w...
public class BdbUtil { /** * Creates a unique directory for housing a BDB environment , and returns * its name . * @ param prefix a prefix for the temporary directory ' s name . Cannot be * < code > null < / code > . * @ param suffix a suffix for the temporary directory ' s name . * @ return the environment n...
File tmpDir = UNIQUE_DIRECTORY_CREATOR . create ( prefix , suffix , directory ) ; String randomFilename = UUID . randomUUID ( ) . toString ( ) ; File envNameAsFile = new File ( tmpDir , randomFilename ) ; return envNameAsFile . getAbsolutePath ( ) ;
public class JobClasspathHelper { /** * This method creates an file that contains a line with a MD5 sum * @ param fs * FileSystem where to create the file . * @ param md5sum * The string containing the MD5 sum . * @ param remoteMd5Path * The path where to save the file . * @ throws IOException */ private ...
FSDataOutputStream os = null ; try { os = fs . create ( remoteMd5Path , true ) ; os . writeBytes ( md5sum ) ; os . flush ( ) ; } catch ( Exception e ) { LOG . error ( "{}" , e ) ; } finally { if ( os != null ) { os . close ( ) ; } }
public class XmlMarshallingValidationCallback { /** * Creates the payload source for unmarshalling . * @ param payload * @ return */ private Source getPayloadSource ( Object payload ) { } }
Source source = null ; if ( payload instanceof String ) { source = new StringSource ( ( String ) payload ) ; } else if ( payload instanceof File ) { source = new StreamSource ( ( File ) payload ) ; } else if ( payload instanceof Document ) { source = new DOMSource ( ( Document ) payload ) ; } else if ( payload instance...
public class JPAValidator { /** * Obtains the underlying javax . validation . Validator instance that is used by * this wrapper . * The underlying javax . validation . Validator instance is obtained in one of * two ways . * If this JPAValidatorWrapper was obtained from the JPAValidatorFactory , * then the Val...
final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( fromValidatorFactory ) { if ( isTraceOn && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Obtaining Validator instance from ValidatorFactory..." ) ; } ValidatorFactory validatorFactory = ivValidatorFactoryLocator . getValidatorFactory ( ) ; ivVal...
public class DRL5Expressions { /** * $ ANTLR start synpred17 _ DRL5Expressions */ public final void synpred17_DRL5Expressions_fragment ( ) throws RecognitionException { } }
// src / main / resources / org / drools / compiler / lang / DRL5Expressions . g : 521:8 : ( LEFT _ PAREN primitiveType ) // src / main / resources / org / drools / compiler / lang / DRL5Expressions . g : 521:9 : LEFT _ PAREN primitiveType { match ( input , LEFT_PAREN , FOLLOW_LEFT_PAREN_in_synpred17_DRL5Expressions258...
public class SmbFile { /** * If the path of this < code > SmbFile < / code > falls within a DFS volume , * this method will return the referral path to which it maps . Otherwise * < code > null < / code > is returned . */ public String getDfsPath ( ) throws SmbException { } }
resolveDfs ( null ) ; if ( dfsReferral == null ) { return null ; } String path = "smb1:/" + dfsReferral . server + "/" + dfsReferral . share + unc ; path = path . replace ( '\\' , '/' ) ; if ( isDirectory ( ) ) { path += '/' ; } return path ;
public class Utils { /** * Checks the server for an updated list of Calendars ( in the background ) . * If a Calendar is added on the web ( and it is selected and not * hidden ) then it will be added to the list of calendars on the phone * ( when this finishes ) . When a new calendar from the * web is added to ...
Bundle extras = new Bundle ( ) ; extras . putBoolean ( ContentResolver . SYNC_EXTRAS_MANUAL , true ) ; extras . putBoolean ( "metafeedonly" , true ) ; ContentResolver . requestSync ( account , Calendars . CONTENT_URI . getAuthority ( ) , extras ) ;
public class CommerceOrderPaymentPersistenceImpl { /** * Clears the cache for all commerce order payments . * The { @ link EntityCache } and { @ link FinderCache } are both cleared by this method . */ @ Override public void clearCache ( ) { } }
entityCache . clearCache ( CommerceOrderPaymentImpl . class ) ; finderCache . clearCache ( FINDER_CLASS_NAME_ENTITY ) ; finderCache . clearCache ( FINDER_CLASS_NAME_LIST_WITH_PAGINATION ) ; finderCache . clearCache ( FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION ) ;
public class Labeling { /** * labeling observation sequences . * @ param file contains a list of observation sequence , this file has a format wich can be read by DataReader * @ return string representing label sequences , the format is specified by writer */ public String strLabeling ( File file ) { } }
List < Sentence > obsvSeqs = dataReader . readFile ( file . getPath ( ) ) ; List lblSeqs = labeling ( obsvSeqs ) ; String ret = dataWriter . writeString ( lblSeqs ) ; return ret ;
import java . io . * ; import java . lang . * ; import java . util . * ; class MaximumAdjacentProduct { /** * This function calculates the maximum product of two adjacent elements in an integer list . * Args : * integer _ list : A list of integers * Returns : * The highest product of two adjacent numbers in the...
int max_product = integer_list . get ( 0 ) * integer_list . get ( 1 ) ; for ( int i = 1 ; i < integer_list . size ( ) - 1 ; i ++ ) { int product = integer_list . get ( i ) * integer_list . get ( i + 1 ) ; if ( product > max_product ) { max_product = product ; } } return max_product ;
public class UnitQuaternions { /** * The orientation represents the rotation of the principal axes with * respect to the axes of the coordinate system ( unit vectors [ 1,0,0 ] , * [ 0,1,0 ] and [ 0,0,1 ] ) . * The orientation can be expressed as a unit quaternion . * @ param points * array of Point3d * @ re...
MomentsOfInertia moi = new MomentsOfInertia ( ) ; for ( Point3d p : points ) moi . addPoint ( p , 1.0 ) ; // Convert rotation matrix to quaternion Quat4d quat = new Quat4d ( ) ; quat . set ( moi . getOrientationMatrix ( ) ) ; return quat ;
public class DecisionTableImpl { /** * Each hit results in one output value ( multiple outputs are collected into a single context value ) */ private Object hitToOutput ( EvaluationContext ctx , FEEL feel , DTDecisionRule rule ) { } }
List < CompiledExpression > outputEntries = rule . getOutputEntry ( ) ; Map < String , Object > values = ctx . getAllValues ( ) ; if ( outputEntries . size ( ) == 1 ) { Object value = feel . evaluate ( outputEntries . get ( 0 ) , values ) ; return value ; } else { Map < String , Object > output = new HashMap < > ( ) ; ...
public class EnumUtil { /** * long重新解析为若干个枚举值 , 用于使用long保存多个选项的情况 . */ public static < E extends Enum < E > > EnumSet < E > processBits ( final Class < E > enumClass , final long value ) { } }
return EnumUtils . processBitVector ( enumClass , value ) ;
public class Preconditions { /** * Checks if the URI is valid for streaming to . * @ param uri The URI to check * @ return The passed in URI if it is valid * @ throws IllegalArgumentException if the URI is not valid . */ public static URI checkValidStream ( URI uri ) throws IllegalArgumentException { } }
String scheme = checkNotNull ( uri ) . getScheme ( ) ; scheme = checkNotNull ( scheme , "URI is missing a scheme" ) . toLowerCase ( ) ; if ( rtps . contains ( scheme ) ) { return uri ; } if ( udpTcp . contains ( scheme ) ) { if ( uri . getPort ( ) == - 1 ) { throw new IllegalArgumentException ( "must set port when usin...
public class MaintenanceScheduleHelper { /** * expression or duration is wrong ) , we simply return empty value */ @ SuppressWarnings ( "squid:S1166" ) public static Optional < ZonedDateTime > getNextMaintenanceWindow ( final String cronSchedule , final String duration , final String timezone ) { } }
try { final ExecutionTime scheduleExecutor = ExecutionTime . forCron ( getCronFromExpression ( cronSchedule ) ) ; final ZonedDateTime now = ZonedDateTime . now ( ZoneOffset . of ( timezone ) ) ; final ZonedDateTime after = now . minus ( convertToISODuration ( duration ) ) ; final ZonedDateTime next = scheduleExecutor ....
public class MachinetagsApi { /** * Return a list of unique namespace and predicate pairs , optionally limited by predicate or namespace , in alphabetical order . * < br > * This method does not require authentication . * @ param namespace ( Optional ) Limit the list of pairs returned to those that have this name...
Map < String , String > params = new TreeMap < > ( ) ; params . put ( "method" , "flickr.machinetags.getPairs" ) ; if ( ! JinxUtils . isNullOrEmpty ( namespace ) ) { params . put ( "namespace" , namespace ) ; } if ( ! JinxUtils . isNullOrEmpty ( predicate ) ) { params . put ( "predicate" , predicate ) ; } if ( perPage ...
public class LTPAConfigurationImpl { /** * When the configuration is modified , * < pre > * 1 . If file name and expiration changed , * then remove the file monitor registration and reload LTPA keys . * 2 . Else if only the monitor interval changed , * then remove the file monitor registration and optionally ...
String oldKeyImportFile = keyImportFile ; Long oldKeyTokenExpiration = keyTokenExpiration ; Long oldMonitorInterval = monitorInterval ; loadConfig ( props ) ; if ( isKeysConfigChanged ( oldKeyImportFile , oldKeyTokenExpiration ) ) { unsetFileMonitorRegistration ( ) ; Tr . audit ( tc , "LTPA_KEYS_TO_LOAD" , keyImportFil...
public class InvocationHandlerAdapter { /** * Creates an implementation for any instance of an { @ link java . lang . reflect . InvocationHandler } that delegates * all method interceptions to the given instance which will be stored in a { @ code static } field . * @ param invocationHandler The invocation handler t...
return new ForInstance ( fieldName , CACHED , UNPRIVILEGED , Assigner . DEFAULT , invocationHandler ) ;
public class Async { /** * Starts the server . */ public void start ( ) { } }
try { jmsServer . setConfiguration ( config ) ; jmsServer . setJmsConfiguration ( jmsConfig ) ; jmsServer . start ( ) ; ConnectionFactory connectionFactory = ( ConnectionFactory ) jmsServer . lookup ( "/cf" ) ; if ( connectionFactory == null ) { throw new AsyncException ( "Failed to start EmbeddedJMS server due to prev...
public class DefaultCurrencyUnitDataProvider { /** * loads a file */ private List < String > loadFromFile ( String fileName ) throws Exception { } }
try ( InputStream in = getClass ( ) . getResourceAsStream ( fileName ) ) { if ( in == null ) { throw new FileNotFoundException ( "Data file " + fileName + " not found" ) ; } BufferedReader reader = new BufferedReader ( new InputStreamReader ( in , "UTF-8" ) ) ; String line ; List < String > content = new ArrayList < > ...
public class PrefixedProperties { /** * ( non - Javadoc ) * @ see java . util . Hashtable # contains ( java . lang . Object ) */ @ Override public boolean contains ( final Object value ) { } }
lock . readLock ( ) . lock ( ) ; try { if ( value == null ) { return false ; } for ( @ SuppressWarnings ( "rawtypes" ) final Map . Entry entry : entrySet ( ) ) { final Object otherValue = entry . getValue ( ) ; if ( otherValue != null && otherValue . equals ( value ) ) { return true ; } } return false ; } finally { loc...
public class XMLScanListener { /** * Do whatever processing that needs to be done on this file . */ public void moveThisFile ( File fileSource , File fileDestDir , String strDestName ) { } }
try { fileDestDir . mkdirs ( ) ; FileInputStream fileIn = new FileInputStream ( fileSource ) ; InputStreamReader inStream = new InputStreamReader ( fileIn ) ; StreamSource source = new StreamSource ( inStream ) ; System . out . println ( fileDestDir + " " + strDestName ) ; File fileDest = new File ( fileDestDir , strDe...
public class CharUtils { /** * < p > Converts the character to the Integer it represents , throwing an * exception if the character is not numeric . < / p > * < p > This method converts the char ' 1 ' to the int 1 and so on . < / p > * < pre > * CharUtils . toIntValue ( null , - 1 ) = - 1 * CharUtils . toIntV...
if ( ch == null ) { return defaultValue ; } return toIntValue ( ch . charValue ( ) , defaultValue ) ;
public class Node { /** * - - other */ public void xslt ( Transformer transformer , Node dest ) throws IOException , TransformerException { } }
try ( InputStream in = newInputStream ( ) ; OutputStream out = dest . newOutputStream ( ) ) { transformer . transform ( new StreamSource ( in ) , new StreamResult ( out ) ) ; }
public class Vector3i { /** * { @ inheritDoc } */ @ Override public void normalize ( ) { } }
double norm ; norm = 1. / Math . sqrt ( this . x * this . x + this . y * this . y + this . z * this . z ) ; this . x *= norm ; this . y *= norm ; this . z *= norm ;
public class VirtualNetworksInner { /** * Gets all virtual networks in a subscription . * @ param nextPageLink The NextLink from the previous successful call to List operation . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ return the observable to the PagedList & lt ; VirtualNe...
return listNextWithServiceResponseAsync ( nextPageLink ) . map ( new Func1 < ServiceResponse < Page < VirtualNetworkInner > > , Page < VirtualNetworkInner > > ( ) { @ Override public Page < VirtualNetworkInner > call ( ServiceResponse < Page < VirtualNetworkInner > > response ) { return response . body ( ) ; } } ) ;
public class Utility { /** * Encode a run , possibly a degenerate run ( of < 4 values ) . * @ param length The length of the run ; must be > 0 & & < = 0xFF . */ private static final < T extends Appendable > void encodeRun ( T buffer , byte value , int length , byte [ ] state ) { } }
if ( length < 4 ) { for ( int j = 0 ; j < length ; ++ j ) { if ( value == ESCAPE_BYTE ) appendEncodedByte ( buffer , ESCAPE_BYTE , state ) ; appendEncodedByte ( buffer , value , state ) ; } } else { if ( ( byte ) length == ESCAPE_BYTE ) { if ( value == ESCAPE_BYTE ) appendEncodedByte ( buffer , ESCAPE_BYTE , state ) ; ...
public class ZWaveFrameDecoder { /** * Creates a Z - Wave DataFrame from a ByteBuf . * @ param buf the buffer to process * @ return a DataFrame instance ( or null if a valid one wasn ' t found ) */ private DataFrame createDataFrame ( ByteBuf buf ) { } }
if ( buf . readableBytes ( ) > 3 ) { byte messageType = buf . getByte ( buf . readerIndex ( ) + 3 ) ; switch ( messageType ) { case Version . ID : return new Version ( buf ) ; case MemoryGetId . ID : return new MemoryGetId ( buf ) ; case InitData . ID : return new InitData ( buf ) ; case NodeProtocolInfo . ID : return ...
public class IOUtilities { /** * Transfers bytes from an input stream to an output stream . * Callers of this method are responsible for closing the streams * since they are the ones that opened the streams . */ public static void transfer ( InputStream in , OutputStream out , TransferCallback cb ) throws IOExcepti...
byte [ ] bytes = new byte [ TRANSFER_BUFFER ] ; int count ; while ( ( count = in . read ( bytes ) ) != - 1 ) { out . write ( bytes , 0 , count ) ; if ( cb != null ) { cb . bytesTransferred ( bytes , count ) ; if ( cb . isCancelled ( ) ) { break ; } } }
public class MessagesApi { /** * Get Normalized Message Histogram * Get Histogram on normalized messages . * @ param startDate Timestamp of earliest message ( in milliseconds since epoch ) . ( required ) * @ param endDate Timestamp of latest message ( in milliseconds since epoch ) . ( required ) * @ param sdid ...
ApiResponse < AggregatesHistogramResponse > resp = getAggregatesHistogramWithHttpInfo ( startDate , endDate , sdid , field , interval ) ; return resp . getData ( ) ;
public class IndexingConfigurationBuilder { /** * Enable or disable indexing . * @ deprecated Use { @ link # index ( Index ) } instead */ @ Deprecated public IndexingConfigurationBuilder enabled ( boolean enabled ) { } }
Attribute < Index > index = attributes . attribute ( INDEX ) ; if ( index . get ( ) == Index . NONE & enabled ) index . set ( Index . ALL ) ; else if ( ! enabled ) index . set ( Index . NONE ) ; return this ;
public class RunJobFlowRequest { /** * For Amazon EMR releases 4.0 and later . The list of configurations supplied for the EMR cluster you are creating . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setConfigurations ( java . util . Collection ) } or { @ l...
if ( this . configurations == null ) { setConfigurations ( new com . amazonaws . internal . SdkInternalList < Configuration > ( configurations . length ) ) ; } for ( Configuration ele : configurations ) { this . configurations . add ( ele ) ; } return this ;
public class ProbeManagerImpl { /** * Update the appropriate collections to reflect recently activated probes * for the specified listener . * @ param listener the listener with recently activated probes * @ param probes the collection of probes that were activated */ public void addActiveProbesforListener ( Prob...
// Add the probes for the specified listener . This is purely additive . // Since a listener ' s configuration can ' t be updated after registration , // we ' re adding probes for recently initialized / modified classes . addProbesByListener ( listener , probes ) ; for ( ProbeImpl probe : probes ) { addListenerByProbe ...
public class CmsModulesEdit { /** * Creates the dialog HTML for all defined widgets of the named dialog ( page ) . < p > * @ param dialog the dialog ( page ) to get the HTML for * @ return the dialog HTML for all defined widgets of the named dialog ( page ) */ @ Override protected String createDialogHtml ( String d...
StringBuffer result = new StringBuffer ( 1024 ) ; // create table result . append ( createWidgetTableStart ( ) ) ; // show error header once if there were validation errors result . append ( createWidgetErrorHeader ( ) ) ; if ( dialog . equals ( PAGES [ 0 ] ) ) { result . append ( dialogBlockStart ( key ( "label.module...
public class CachedDiscoveryService { /** * ~ Methods * * * * * */ @ Override public void dispose ( ) { } }
super . dispose ( ) ; _cacheService . dispose ( ) ; _discoveryService . dispose ( ) ; _executorService . shutdown ( ) ; _disposeExecutorService ( ) ;
public class Ifc2x3tc1PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public EClass getIfcTextAlignment ( ) { } }
if ( ifcTextAlignmentEClass == null ) { ifcTextAlignmentEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc2x3tc1Package . eNS_URI ) . getEClassifiers ( ) . get ( 745 ) ; } return ifcTextAlignmentEClass ;
public class PropertiesManager { /** * Load the current value of the given property from the file without * modifying the values of any other properties . In other words , * { @ link # isModified ( Object ) } will return < code > false < / code > for the given * property after this call completes , but it will re...
try { Future < Void > task = loadPropertyNB ( property ) ; task . get ( ) ; } catch ( ExecutionException e ) { Throwable t = e . getCause ( ) ; if ( t instanceof IOException ) { throw ( IOException ) t ; } throw new IOException ( t ) ; } catch ( InterruptedException e ) { throw new IOException ( "Loading of the propert...
public class DataFrameInputStream { /** * Indicates that the current record has finished processing . When invoked , the DataFrameInputStream will be repositioned * at the start of the next record . This method only needs to be called upon a successful record read . If an IOException * occurred while reading data f...
DataFrameRecord . RecordInfo r = this . currentRecordBuilder . build ( ) ; while ( this . currentEntry != null ) { if ( this . currentEntry . isLastRecordEntry ( ) ) { this . currentEntry . getData ( ) . close ( ) ; resetContext ( ) ; } else { fetchNextEntry ( ) ; } } return r ;
public class SaxonServlet { /** * Get the content at the given location using the configured credentials * ( if any ) . */ private InputStream getInputStream ( String url ) throws Exception { } }
HttpGet getMethod = new HttpGet ( url ) ; DefaultHttpClient client = new DefaultHttpClient ( m_cManager ) ; client . getParams ( ) . setIntParameter ( CoreConnectionPNames . CONNECTION_TIMEOUT , TIMEOUT_SECONDS * 1000 ) ; UsernamePasswordCredentials creds = getCreds ( url ) ; if ( creds != null ) { client . getCredenti...
public class Entry { /** * Sets the value of the key property . * @ param value * allowed object is * { @ link Object } */ public void setKey ( org . openprovenance . prov . model . Key value ) { } }
this . key = ( org . openprovenance . prov . sql . Key ) value ;
public class AbstractJacksonContext { /** * / * ( non - Javadoc ) * @ see com . abubusoft . kripton . AbstractContext # createParser ( java . io . File ) */ @ Override public JacksonWrapperParser createParser ( File file ) { } }
try { return new JacksonWrapperParser ( innerFactory . createParser ( file ) , getSupportedFormat ( ) ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; throw new KriptonRuntimeException ( e ) ; }
public class MultiLineString { /** * Returns a list of LineStrings which are currently making up this MultiLineString . * @ return a list of { @ link LineString } s * @ since 3.0.0 */ public List < LineString > lineStrings ( ) { } }
List < List < Point > > coordinates = coordinates ( ) ; List < LineString > lineStrings = new ArrayList < > ( coordinates . size ( ) ) ; for ( List < Point > points : coordinates ) { lineStrings . add ( LineString . fromLngLats ( points ) ) ; } return lineStrings ;
public class WindowUtils { /** * Sets the shape of a window . * This will be done via a com . sun API and may be not available on all platforms . * @ param window to change the shape for * @ param s the new shape for the window . */ public static void setWindowShape ( Window window , Shape s ) { } }
if ( PlatformUtils . isJava6 ( ) ) { setWindowShapeJava6 ( window , s ) ; } else { setWindowShapeJava7 ( window , s ) ; }
public class ExpressRouteCircuitConnectionsInner { /** * Gets the specified Express Route Circuit Connection from the specified express route circuit . * @ param resourceGroupName The name of the resource group . * @ param circuitName The name of the express route circuit . * @ param peeringName The name of the p...
return getWithServiceResponseAsync ( resourceGroupName , circuitName , peeringName , connectionName ) . toBlocking ( ) . single ( ) . body ( ) ;
public class CsvEscapeUtil { /** * Perform an escape operation , based on char [ ] , according to the specified level and type . */ static void escape ( final char [ ] text , final int offset , final int len , final Writer writer ) throws IOException { } }
if ( text == null || text . length == 0 ) { return ; } final int max = ( offset + len ) ; int readOffset = offset ; for ( int i = offset ; i < max ; i ++ ) { final char c = text [ i ] ; /* * Shortcut : most characters will be Alphanumeric , and we won ' t need to do anything at * all for them . */ if ( ( c >= 'a' && ...
public class Link { /** * Creats a new { @ link Link } with the given { @ link Affordance } s . * @ param affordances must not be { @ literal null } . * @ return */ public Link withAffordances ( List < Affordance > affordances ) { } }
return new Link ( this . rel , this . href , this . hreflang , this . media , this . title , this . type , this . deprecation , this . profile , this . name , this . template , affordances ) ;
public class CoinbaseMarketDataServiceRaw { /** * Unauthenticated resource that tells you the price to buy one unit . * @ param pair The currency pair . * @ return The price in the desired { @ code currency } to buy one unit . * @ throws IOException * @ see < a * href = " https : / / developers . coinbase . c...
return coinbase . getBuyPrice ( Coinbase . CB_VERSION_VALUE , base + "-" + counter ) . getData ( ) ;
public class IOUtil { /** * Deletes a file , and if it is a folder , it deletes all its contents ( including sub - folders ) , so that it can be deleted without problem * @ param f The file or folder to delete * @ return the return value of { @ link java . io . File # delete ( ) } */ public static boolean delete ( ...
if ( f == null || ! f . exists ( ) ) return true ; if ( f . isDirectory ( ) ) { File [ ] subFiles = f . listFiles ( ) ; if ( subFiles != null ) { for ( File sf : subFiles ) { IOUtil . delete ( sf ) ; } } } return f . delete ( ) ;
public class EnumSet { /** * Creates an enum set with the same element type as the specified enum * set , initially containing the same elements ( if any ) . * @ param < E > The class of the elements in the set * @ param s the enum set from which to initialize this enum set * @ return A copy of the specified en...
return s . clone ( ) ;
public class EhCacheProvider { /** * ( non - Javadoc ) * @ see com . impetus . kundera . cache . CacheProvider # init ( java . util . Map ) */ @ Override public synchronized void init ( Map < ? , ? > properties ) { } }
if ( manager != null ) { log . warn ( "Attempt to restart an already started CacheFactory. Using previously created EhCacheFactory." ) ; return ; } initializing = true ; try { String configurationResourceName = null ; if ( properties != null ) { configurationResourceName = ( String ) properties . get ( NET_SF_EHCACHE_C...
public class TabularDataConverter { private JSONObject getAsJsonObject ( Object pFrom ) { } }
JSONAware jsonVal = toJSON ( pFrom ) ; if ( ! ( jsonVal instanceof JSONObject ) ) { throw new IllegalArgumentException ( "Expected JSON type for a TabularData is JSONObject, not " + jsonVal . getClass ( ) ) ; } return ( JSONObject ) jsonVal ;
public class HasManyModel { /** * Find all objects from the child list . * TODO : Figure out how to make this accesible without . . . * creating a dummy instance . * @ throws com . mauriciogiordano . easydb . exception . NoContextFoundException in case of null context . * @ return A list of all children . */ pu...
List < String > objects = getChildrenList ( ) ; List < C > children = new ArrayList < C > ( ) ; try { Model dummy = ( Model ) childClazz . newInstance ( ) ; dummy . setContext ( context ) ; for ( String id : objects ) { children . add ( ( C ) dummy . find ( id ) ) ; } } catch ( IllegalAccessException e ) { e . printSta...
public class RequestMessage { /** * @ see javax . servlet . ServletRequest # removeAttribute ( java . lang . String ) */ @ Override public void removeAttribute ( String name ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Removing attribute: " + name ) ; } this . attributes . remove ( name ) ;
public class SimpleSolrPersistentEntity { /** * ( non - Javadoc ) * @ see org . springframework . data . solr . core . mapping . SolrPersistentEntity # getCollectionName ( ) */ @ Override public String getCollectionName ( ) { } }
if ( expression == null ) { return collectionName ; } EvaluationContext ctx = getEvaluationContext ( null ) ; ctx . setVariable ( "targetType" , typeInformation . getType ( ) ) ; return expression . getValue ( ctx , String . class ) ;
public class ChargingStationEventListener { /** * Updates a charging station ' s component availability . * @ param chargingStationId the charging station ' s id . * @ param componentId the component ' s id . * @ param component the component type . * @ param availability the the charging station ' s new availa...
if ( ! component . equals ( ChargingStationComponent . EVSE ) || ! ( componentId instanceof EvseId ) ) { return ; } ChargingStation chargingStation = repository . findOne ( chargingStationId . getId ( ) ) ; if ( chargingStation != null ) { for ( Evse evse : chargingStation . getEvses ( ) ) { if ( evse . getEvseId ( ) ....
public class ListResourcesForWebACLRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( ListResourcesForWebACLRequest listResourcesForWebACLRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( listResourcesForWebACLRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( listResourcesForWebACLRequest . getWebACLId ( ) , WEBACLID_BINDING ) ; protocolMarshaller . marshall ( listResourcesForWebACLRequest . getResourceType ( ) ...
public class BaseSession { /** * Do a remote action . * @ param strCommand Command to perform remotely . * @ param properties Properties for this command ( optional ) . * @ return boolean success . */ public Object doRemoteAction ( String strCommand , Map < String , Object > properties ) throws DBException , Remo...
synchronized ( this . getTask ( ) ) { // Just being careful ( in case the user decides to do some data access ) // Don ' t override this , override doRemoteCommand ( xxx ) ; return this . handleRemoteCommand ( strCommand , properties , this ) ; }
public class DistanceTravelledCalculator { /** * Returns a sequence of { @ link Options } that are same as the source apart * from the { @ link Bounds } which are partitioned according to horizontal and * vertical parameters . For map - reduce purposes we need to be able to * partition the bounds of Options . Pas...
List < Options > list = new ArrayList < > ( ) ; Bounds bounds = options . getBounds ( ) ; double h = bounds . getWidthDegrees ( ) / horizontal ; double v = bounds . getHeightDegrees ( ) / vertical ; for ( int i = 0 ; i < horizontal ; i ++ ) { for ( int j = 0 ; j < vertical ; j ++ ) { double lat = bounds . getTopLeftLat...
public class Startup { /** * Read a external file or a resource . * @ param filename file / resource to access * @ param context printable non - natural language context for errors * @ param mh handler for error messages * @ return file as startup entry , or null when error ( message has been printed ) */ priva...
if ( filename != null ) { try { byte [ ] encoded = Files . readAllBytes ( toPathResolvingUserHome ( filename ) ) ; return new StartupEntry ( false , filename , new String ( encoded ) , LocalDateTime . now ( ) . format ( DateTimeFormatter . ofLocalizedDateTime ( FormatStyle . MEDIUM ) ) ) ; } catch ( AccessDeniedExcepti...
public class RouterClient { /** * Preview fields auto - generated during router create and update operations . Calling this method * does NOT create or update the router . * < p > Sample code : * < pre > < code > * try ( RouterClient routerClient = RouterClient . create ( ) ) { * ProjectRegionRouterName route...
PreviewRouterHttpRequest request = PreviewRouterHttpRequest . newBuilder ( ) . setRouter ( router == null ? null : router . toString ( ) ) . setRouterResource ( routerResource ) . build ( ) ; return previewRouter ( request ) ;
public class AbstractViewHolderAdapter { /** * Sets the parent view , whose appearance should currently be customized by the decorator . This * method should never be called or overridden by any custom adapter implementation . * @ param currentParentView * The parent view , which should be set , as an instance of...
Condition . INSTANCE . ensureNotNull ( currentParentView , "The parent view may not be null" ) ; this . currentParentView = currentParentView ;
public class GaliosFieldTableOps { /** * Evaluate the polynomial using Horner ' s method . Avoids explicit calculating the powers of x . * < p > 01x * * 4 + 0fx * * 3 + 36x * * 2 + 78x + 40 = ( ( ( 01 x + 0f ) x + 36 ) x + 78 ) x + 40 < / p > * < p > Coefficients for largest powers are first , e . g . 2 * x * * 3 +...
int y = input . data [ 0 ] & 0xFF ; for ( int i = 1 ; i < input . size ; i ++ ) { y = multiply ( y , x ) ^ ( input . data [ i ] & 0xFF ) ; } return y ;
public class ExtensionPassiveScan { /** * Sets whether or not the plug - in passive scanner with the given { @ code pluginId } is { @ code enabled } . * @ param pluginId the ID of the plug - in passive scanner * @ param enabled { @ code true } if the scanner should be enabled , { @ code false } otherwise */ void se...
PluginPassiveScanner scanner = getPluginPassiveScanner ( pluginId ) ; if ( scanner != null ) { scanner . setEnabled ( enabled ) ; scanner . save ( ) ; }
public class StreamsUtils { /** * < p > Generates a stream that is computed from a provided int stream by first rolling it in the same * way as the < code > roll ( ) < / code > method does . Then a summarizing int operation is applied on each * substream to form the final int summary stream . No boxing / unboxing i...
Objects . requireNonNull ( intStream ) ; RollingOfIntSpliterator ofIntSpliterator = RollingOfIntSpliterator . of ( intStream . spliterator ( ) , rollingFactor ) ; return StreamSupport . stream ( ofIntSpliterator , intStream . isParallel ( ) ) . onClose ( intStream :: close ) . map ( str -> str . collect ( IntSummarySta...
public class EarDescriptorBuilder { /** * Writes WEB part to application . xml . * @ param filename name of module */ private void writeEjbModule ( String filename ) { } }
Element element = writeModule ( ) ; Element ejb = doc . createElement ( "ejb" ) ; element . appendChild ( ejb ) ; ejb . setTextContent ( filename ) ;
public class CleverTapAPI { /** * Pushes the Notification Viewed event to CleverTap . * @ param extras The { @ link Bundle } object that contains the * notification details */ @ SuppressWarnings ( { } }
"unused" , "WeakerAccess" } ) public void pushNotificationViewedEvent ( Bundle extras ) { if ( extras == null || extras . isEmpty ( ) || extras . get ( Constants . NOTIFICATION_TAG ) == null ) { getConfigLogger ( ) . debug ( getAccountId ( ) , "Push notification: " + ( extras == null ? "NULL" : extras . toString ( ) ) ...
public class CognitoOptionsMarshaller { /** * Marshall the given parameter object . */ public void marshall ( CognitoOptions cognitoOptions , ProtocolMarshaller protocolMarshaller ) { } }
if ( cognitoOptions == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( cognitoOptions . getEnabled ( ) , ENABLED_BINDING ) ; protocolMarshaller . marshall ( cognitoOptions . getUserPoolId ( ) , USERPOOLID_BINDING ) ; protocolMarshaller . mar...
public class AbstractOptionsForUpdateOrDelete { /** * Add a single LWT result listeners . Example of usage : * < pre class = " code " > < code class = " java " > * LWTResultListener lwtListener = new LWTResultListener ( ) { * public void onError ( LWTResult lwtResult ) { * / / Get type of LWT operation that fai...
this . lwtResultListeners = Optional . of ( asList ( lwtResultListener ) ) ; return getThis ( ) ;
public class ThroughputStatServiceImpl { /** * < pre > * 列出pipeLineId下 , start - end时间段下的throughputStat * 首先从数据库中取出这一段时间所以数据 , 该数据都是根据end _ time倒排序的 , 每隔1分钟将这些数据分组 * < / pre > */ public Map < Long , ThroughputInfo > listTimelineThroughput ( TimelineThroughputCondition condition ) { } }
Assert . assertNotNull ( condition ) ; Map < Long , ThroughputInfo > throughputInfos = new LinkedHashMap < Long , ThroughputInfo > ( ) ; List < ThroughputStatDO > throughputStatDOs = throughputDao . listTimelineThroughputStat ( condition ) ; int size = throughputStatDOs . size ( ) ; int k = size - 1 ; for ( Long i = co...
public class Organizer { /** * construct map for collection of criteria object wher the key is * Criteria . getId * @ param aCriterias * @ return the map Criteria is the value and Criteria . getId is the key */ public static Map < String , Criteria > constructCriteriaMap ( Collection < Criteria > aCriterias ) { }...
if ( aCriterias == null ) return null ; Map < String , Criteria > map = new HashMap < String , Criteria > ( aCriterias . size ( ) ) ; Criteria criteria = null ; for ( Iterator < Criteria > i = aCriterias . iterator ( ) ; i . hasNext ( ) ; ) { criteria = ( Criteria ) i . next ( ) ; map . put ( criteria . getId ( ) , cri...
public class druidGLexer { /** * $ ANTLR start " SORT " */ public final void mSORT ( ) throws RecognitionException { } }
try { int _type = SORT ; int _channel = DEFAULT_TOKEN_CHANNEL ; // druidG . g : 622:6 : ( ( ' SORT ' ) ) // druidG . g : 622:8 : ( ' SORT ' ) { // druidG . g : 622:8 : ( ' SORT ' ) // druidG . g : 622:9 : ' SORT ' { match ( "SORT" ) ; } } state . type = _type ; state . channel = _channel ; } finally { // do for sure be...
public class Wro4jAutoConfiguration { /** * Registeres the { @ code wroFilter } through a Spring * { @ link FilterRegistrationBean } . * @ param wroFilter The configured { @ code wroFilter } * @ param wro4jProperties Needed for the url pattern to which the filter * should be registered * @ return The Spring {...
final FilterRegistrationBean filterRegistrationBean = new FilterRegistrationBean ( wroFilter ) ; filterRegistrationBean . addUrlPatterns ( wro4jProperties . getFilterUrl ( ) + "/*" ) ; return filterRegistrationBean ;
public class PartitionReplicaFragmentVersions { /** * Change versions for all replicas with an index greater than { @ code fromReplica } to the new replica versions */ private void setVersions ( long [ ] newVersions , int fromReplica ) { } }
int fromIndex = fromReplica - 1 ; int len = newVersions . length - fromIndex ; arraycopy ( newVersions , fromIndex , versions , fromIndex , len ) ;
public class NodeSchema { /** * \ pre : m _ columns is a bi - map to \ param m . */ public NodeSchema toTVEAndFixColumns ( Map < String , Pair < String , Integer > > nameMap ) { } }
final NodeSchema ns = copyAndReplaceWithTVE ( ) ; // First convert all non - TVE expressions to TVE in a copy m_columns . clear ( ) ; m_columnsMapHelper . clear ( ) ; for ( int indx = 0 ; indx < ns . size ( ) ; ++ indx ) { // then update columns final SchemaColumn sc = ns . getColumn ( indx ) ; assert ( sc . getExpress...
public class UriBasedVehicleInterfaceMixin { /** * Convert the parameter to a URI and validate the correctness of its host * and port . * @ return true if the address and port are valid . */ public static boolean validateResource ( String uriString ) { } }
if ( uriString == null ) { return false ; } try { return validateResource ( createUri ( uriString ) ) ; } catch ( DataSourceException e ) { Log . d ( TAG , "URI is not valid" , e ) ; return false ; }
public class AbstractDatabase { /** * Returns the expiration time of the document . null will be returned if there is * no expiration time set * @ param id The ID of the Document * @ return Date a nullable expiration timestamp of the document or null if time not set . * @ throws CouchbaseLiteException Throws an...
if ( id == null ) { throw new IllegalArgumentException ( "document id cannot be null." ) ; } synchronized ( lock ) { try { if ( getC4Database ( ) . get ( id , true ) == null ) { throw new CouchbaseLiteException ( "Document doesn't exist in the database." , CBLError . Domain . CBLITE , CBLError . Code . NOT_FOUND ) ; } ...
public class JobTemplateSettings { /** * Use Inputs ( inputs ) to define the source file used in the transcode job . There can only be one input in a job * template . Using the API , you can include multiple inputs when referencing a job template . * @ param inputs * Use Inputs ( inputs ) to define the source fil...
if ( inputs == null ) { this . inputs = null ; return ; } this . inputs = new java . util . ArrayList < InputTemplate > ( inputs ) ;
public class CodeGenerator { /** * Check { @ link FieldType } is validate to class type of { @ link Field } * @ param type * @ param field */ private void checkType ( FieldType type , Field field ) { } }
Class < ? > cls = field . getType ( ) ; if ( type == FieldType . OBJECT || type == FieldType . ENUM ) { return ; } String javaType = type . getJavaType ( ) ; if ( Integer . class . getSimpleName ( ) . equals ( javaType ) ) { if ( cls . getSimpleName ( ) . equals ( "int" ) || Integer . class . getSimpleName ( ) . equals...
public class CmsXmlContainerPageFactory { /** * Factory method to unmarshal ( read ) a container page instance from a OpenCms VFS resource * that contains XML data . < p > * < b > Warning : < / b > < br / > * This method does not support requested historic versions , it always loads the * most recent version . ...
// check the cache CmsXmlContainerPage content = getCache ( cms , resource , true ) ; if ( content != null ) { return content ; } content = unmarshal ( cms , cms . readFile ( resource ) , true ) ; // set the cache setCache ( cms , content , true ) ; return content ;
public class EmptyZipkinFactory { /** * Build a new { @ link HttpTracing } instance for interfacing with Zipkin * @ param environment Environment * @ return HttpTracing instance */ @ Override public Optional < HttpTracing > build ( final Environment environment ) { } }
if ( ! isEnabled ( ) ) { LOGGER . warn ( "Zipkin tracing is disabled" ) ; return Optional . empty ( ) ; } LOGGER . info ( "Dropping all collected spans" ) ; return buildTracing ( environment , Reporter . NOOP ) ;
public class DataEncoder { /** * Encodes the given optional byte array into a variable amount of * bytes . If the byte array is null , exactly 1 byte is written . Otherwise , * the amount written can be determined by calling calculateEncodedLength . * @ param value byte array value to encode , may be null * @ p...
if ( value == null ) { dst [ dstOffset ] = NULL_BYTE_HIGH ; return 1 ; } return encode ( value , 0 , value . length , dst , dstOffset ) ;
public class GitHubLoginFunction { /** * okHttp connector to be used as backend for GitHub client . * Uses proxy of jenkins * If cache size > 0 , uses cache * @ return connector to be used as backend for client */ private OkHttpConnector connector ( GitHubServerConfig config ) { } }
OkHttpClient client = new OkHttpClient ( ) . setProxy ( getProxy ( defaultIfBlank ( config . getApiUrl ( ) , GITHUB_URL ) ) ) ; if ( config . getClientCacheSize ( ) > 0 ) { Cache cache = toCacheDir ( ) . apply ( config ) ; client . setCache ( cache ) ; } return new OkHttpConnector ( new OkUrlFactory ( client ) ) ;
public class WCOutputStream31 { /** * / * ( non - Javadoc ) * @ see com . ibm . ws . webcontainer . osgi . response . WCOutputStream # close ( ) */ public void close ( ) throws java . io . IOException { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "close output" ) ; } if ( this . _listener != null && this . isOutputStreamNBClosed ( ) ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "output stream close previously comple...
public class ProviderHelper { /** * Compare two provider group , return add list and remove list * @ param oldGroup old provider group * @ param newGroup new provider group * @ param add provider list need add * @ param remove provider list need remove */ public static void compareGroup ( ProviderGroup oldGroup...
compareProviders ( oldGroup . getProviderInfos ( ) , newGroup . getProviderInfos ( ) , add , remove ) ;
public class StaticArrayBuffer { /** * - - - - - ARRAY METHODS */ @ Override public byte [ ] getBytes ( int position , int length ) { } }
byte [ ] result = new byte [ length ] ; for ( int i = 0 ; i < length ; i ++ ) { result [ i ] = getByte ( position ) ; position += BYTE_LEN ; } return result ;
public class FileTree { /** * Iterates over the file tree of a directory . It receives a visitor and will call its methods * for each file in the directory . * preVisitDirectory ( directory ) * visitFile ( file ) * - recursively the same for every subdirectory * postVisitDirectory ( directory ) * @ param di...
visitor . preVisitDirectory ( directory ) ; File [ ] files = directory . listFiles ( ) ; if ( files != null ) { for ( File file : files ) { if ( file . isDirectory ( ) ) { walkFileTree ( file , visitor ) ; } else { visitor . visitFile ( file ) ; } } } visitor . postVisitDirectory ( directory ) ;
public class GDiscreteFourierTransformOps { /** * Computes the magnitude of the complex image : < br > * magnitude = sqrt ( real < sup > 2 < / sup > + imaginary < sup > 2 < / sup > ) * @ param transform ( Input ) Complex interleaved image * @ param magnitude ( Output ) Magnitude of image */ public static void mag...
if ( transform instanceof InterleavedF32 ) { DiscreteFourierTransformOps . magnitude ( ( InterleavedF32 ) transform , ( GrayF32 ) magnitude ) ; } else if ( transform instanceof InterleavedF64 ) { DiscreteFourierTransformOps . magnitude ( ( InterleavedF64 ) transform , ( GrayF64 ) magnitude ) ; } else { throw new Illega...
public class ApiUtilDAODefaultImpl { /** * GA : add synchronized */ public synchronized void remove_async_request ( final int id ) { } }
// Try to destroye Request object ( added by PV 7/9/06) final AsyncCallObject aco = async_request_table . get ( id ) ; if ( aco != null ) { removePendingRepliesOfRequest ( aco . request ) ; ( ( org . jacorb . orb . ORB ) ApiUtil . getOrb ( ) ) . removeRequest ( aco . request ) ; async_request_table . remove ( id ) ; }
public class ISID { /** * This method checks , if all fields are valid . In these cases an exception will be thrown . * @ throws InternetSCSIException If the integrity is violated . */ protected final void checkIntegrity ( ) throws InternetSCSIException { } }
String exceptionMessage = "" ; switch ( t ) { case OUI_FORMAT : break ; case IANA_ENTERPRISE_NUMBER : break ; case RANDOM : // if ( d ! = 0 ) { // exceptionMessage = " The D field is reserved in this ISID Format . " ; break ; case RESERVED : if ( a != 0 && b != 0 && c != 0 && d != 0 ) { exceptionMessage = "This ISID is...
public class JavaAgent { /** * an agent can be started in a VM as a javaagent allowing it to be embedded with some other main app */ public static void premain ( String args ) { } }
if ( args == null ) { args = "config=config.yaml" ; } try { start ( args . split ( "," ) ) ; } catch ( Exception e ) { System . err . println ( "Hawkular Java Agent failed at startup" ) ; e . printStackTrace ( System . err ) ; }
public class LegacySpy { /** * Alias for { @ link # expectBetween ( int , int , Threads , Query ) } with arguments { @ code allowedStatements } , { @ link Integer # MAX _ VALUE } , { @ code threads } , { @ link Query # ANY } * @ since 2.0 */ @ Deprecated public C expectAtLeast ( int allowedStatements , Threads thread...
return expect ( SqlQueries . minQueries ( allowedStatements ) . threads ( threadMatcher ) ) ;
public class Application { /** * < p class = " changed _ added _ 2_0 " > < span * class = " changed _ modified _ 2_2 " > Install < / span > the listener instance * referenced by argument < code > listener < / code > into the application * as a listener for events of type < code > systemEventClass < / code > * t...
if ( defaultApplication != null ) { defaultApplication . subscribeToEvent ( systemEventClass , sourceClass , listener ) ; } else { throw new UnsupportedOperationException ( ) ; }
public class FTPClient { /** * Deletes the remote file . */ public void deleteFile ( String filename ) throws IOException , ServerException { } }
if ( filename == null ) { throw new IllegalArgumentException ( "Required argument missing" ) ; } Command cmd = new Command ( "DELE" , filename ) ; try { controlChannel . execute ( cmd ) ; } catch ( FTPReplyParseException rpe ) { throw ServerException . embedFTPReplyParseException ( rpe ) ; } catch ( UnexpectedReplyCode...
public class IndexTaskClient { /** * Sends an HTTP request to the task of the specified { @ code taskId } and returns a response if it succeeded . */ private FullResponseHolder submitRequest ( String taskId , @ Nullable String mediaType , // nullable if content is empty HttpMethod method , String encodedPathSuffix , @ ...
final RetryPolicy retryPolicy = retryPolicyFactory . makeRetryPolicy ( ) ; while ( true ) { String path = StringUtils . format ( "%s/%s/%s" , BASE_PATH , StringUtils . urlEncode ( taskId ) , encodedPathSuffix ) ; Optional < TaskStatus > status = taskInfoProvider . getTaskStatus ( taskId ) ; if ( ! status . isPresent ( ...
public class EncodingUtils { /** * Is jce installed ? * @ return the boolean */ public static boolean isJceInstalled ( ) { } }
try { val maxKeyLen = Cipher . getMaxAllowedKeyLength ( "AES" ) ; return maxKeyLen == Integer . MAX_VALUE ; } catch ( final NoSuchAlgorithmException e ) { return false ; }
public class CassandraSchemaManager { /** * Checks if is counter column type . * @ param tableInfo * the table info * @ param defaultValidationClass * the default validation class * @ return true , if is counter column type */ private boolean isCounterColumnType ( TableInfo tableInfo , String defaultValidatio...
return ( csmd != null && csmd . isCounterColumn ( databaseName , tableInfo . getTableName ( ) ) ) || ( defaultValidationClass != null && ( defaultValidationClass . equalsIgnoreCase ( CounterColumnType . class . getSimpleName ( ) ) || defaultValidationClass . equalsIgnoreCase ( CounterColumnType . class . getName ( ) ) ...
public class ServletSupport { /** * Dispatches http - request to url * @ param url * @ throws ServletException to abort request handling */ public static void forward ( String url , ServletRequest req , ServletResponse res ) throws ServletException , IOException { } }
RequestDispatcher dispatch = req . getRequestDispatcher ( url ) ; System . out . println ( new LogEntry ( "about to forward to " + url ) ) ; dispatch . forward ( req , res ) ;