signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class SdkUtils { /** * Sets the thumb color that displays users initials * @ param initialsView TextView used to display number of collaborators * @ param position Used to pick a material color from an array */ public static void setColorForInitialsThumb ( TextView initialsView , int position ) { } }
int backgroundColor = THUMB_COLORS [ ( position ) % THUMB_COLORS . length ] ; setColorsThumb ( initialsView , backgroundColor , Color . WHITE ) ;
public class Classes { /** * Return wrapped instance of a Java Proxy implemented on a { @ link InstanceInvocationHandler } handler . If given * < code > instance < / code > is not a Java Proxy return it as it is and return null if < code > instance < / code > is null . It * is considered a bug if < code > instance ...
if ( instance == null ) { return null ; } if ( ! ( instance instanceof Proxy ) ) { return instance ; } if ( ! ( Proxy . getInvocationHandler ( instance ) instanceof InstanceInvocationHandler ) ) { throw new BugError ( "Cannot unproxy instance |%s|. Proxy handler does not implement |%s|" , instance . getClass ( ) , Inst...
public class ObjectToJsonArrayBinding { /** * Converting the JsonArray to a String value and setting that on a JDBC PreparedStatement */ @ Override public void set ( BindingSetStatementContext < JsonArray > ctx ) throws SQLException { } }
ctx . statement ( ) . setString ( ctx . index ( ) , Objects . toString ( ctx . convert ( converter ( ) ) . value ( ) , null ) ) ;
public class WebSecurityScannerClient { /** * List Findings under a given ScanRun . * < p > Sample code : * < pre > < code > * try ( WebSecurityScannerClient webSecurityScannerClient = WebSecurityScannerClient . create ( ) ) { * ScanRunName parent = ScanRunName . of ( " [ PROJECT ] " , " [ SCAN _ CONFIG ] " , "...
ListFindingsRequest request = ListFindingsRequest . newBuilder ( ) . setParent ( parent ) . setFilter ( filter ) . build ( ) ; return listFindings ( request ) ;
public class PluginController { /** * Reload plugins * @ param model * @ return */ @ RequestMapping ( value = "/api/plugins/reload" , method = RequestMethod . GET ) public @ ResponseBody HashMap < String , Object > reloadPlugins ( Model model ) { } }
try { PluginManager . destroy ( ) ; } catch ( Exception e ) { } return pluginInformation ( ) ;
public class JSRInlinerAdapter { /** * Creates the new instructions , inlining each instantiation of each * subroutine until the code is fully elaborated . */ private void emitCode ( ) { } }
LinkedList < Instantiation > worklist = new LinkedList < Instantiation > ( ) ; // Create an instantiation of the " root " subroutine , which is just the // main routine worklist . add ( new Instantiation ( null , mainSubroutine ) ) ; // Emit instantiations of each subroutine we encounter , including the // main subrout...
public class JcString { /** * < div color = ' red ' style = " font - size : 24px ; color : red " > < b > < i > < u > JCYPHER < / u > < / i > < / b > < / div > * < div color = ' red ' style = " font - size : 18px ; color : red " > < i > return the original string in uppercase < / i > < / div > * < br / > */ public J...
JcString ret = new JcString ( null , this , new FunctionInstance ( FUNCTION . String . UPPER , 1 ) ) ; QueryRecorder . recordInvocationConditional ( this , "upper" , ret ) ; return ret ;
public class NLS { /** * Bind the given message ' s substitution locations with the given string values . * @ param message the message to be manipulated * @ param binding1 An object to be inserted into the message * @ param binding2 A second object to be inserted into the message * @ return the manipulated Str...
return internalBind ( message , null , String . valueOf ( binding1 ) , String . valueOf ( binding2 ) ) ;
public class DataService { /** * Common method to prepare the request params for findById operation for both sync and async calls * @ param entity * the entity * @ return IntuitMessage the intuit message * @ throws FMSException */ private < T extends IEntity > IntuitMessage prepareDownload ( T entity ) throws F...
Object rid = verifyEntityId ( entity ) ; IntuitMessage intuitMessage = new IntuitMessage ( ) ; RequestElements requestElements = intuitMessage . getRequestElements ( ) ; // set the request params Map < String , String > requestParameters = requestElements . getRequestParameters ( ) ; requestParameters . put ( RequestEl...
public class Files { /** * Dump byte input stream content to standard output till end of input stream . Input stream is closed . * @ param inputStream source byte input stream . * @ throws IOException if reading from input stream fails . */ public static void dump ( InputStream inputStream ) throws IOException { } ...
if ( ! ( inputStream instanceof BufferedInputStream ) ) { inputStream = new BufferedInputStream ( inputStream ) ; } try { byte [ ] buffer = new byte [ BUFFER_SIZE ] ; int length ; while ( ( length = inputStream . read ( buffer ) ) != - 1 ) { System . out . write ( buffer , 0 , length ) ; } } finally { inputStream . clo...
public class GeoServiceImpl { /** * Isn ' t there a method for this in GeoTools ? * @ param crs * CRS string in the form of ' EPSG : < srid > ' . * @ return SRID as integer . */ public int getSridFromCrs ( String crs ) { } }
int crsInt ; if ( crs . indexOf ( ':' ) != - 1 ) { crsInt = Integer . parseInt ( crs . substring ( crs . indexOf ( ':' ) + 1 ) ) ; } else { try { crsInt = Integer . parseInt ( crs ) ; } catch ( NumberFormatException e ) { crsInt = 0 ; } } return crsInt ;
public class PhysicalZipFile { /** * Get a mmap ' d chunk of the file , where chunkIdx denotes which 2GB chunk of the file to return ( 0 for the first * 2GB of the file , or for files smaller than 2GB ; 1 for the 2-4GB chunk , etc . ) . * @ param chunkIdx * The index of the 2GB chunk to read * @ return The { @ ...
if ( closed . get ( ) ) { throw new IOException ( getClass ( ) . getSimpleName ( ) + " already closed" ) ; } if ( chunkIdx < 0 || chunkIdx >= mappedByteBuffersCached . length ) { throw new IOException ( "Chunk index out of range" ) ; } // Fast path : only look up singleton map if mappedByteBuffersCached is null if ( ma...
public class LBiObjLongFunctionBuilder { /** * One of ways of creating builder . In most cases ( considering all _ functional _ builders ) it requires to provide generic parameters ( in most cases redundantly ) */ @ Nonnull public static < T1 , T2 , R > LBiObjLongFunctionBuilder < T1 , T2 , R > biObjLongFunction ( ) { ...
return new LBiObjLongFunctionBuilder ( ) ;
public class FloatField { /** * Move the physical binary data to this SQL parameter row . * @ param statement The SQL prepare statement . * @ param iType the type of SQL statement . * @ param iParamColumn The column in the prepared statement to set the data . * @ exception SQLException From SQL calls . */ publi...
if ( this . isNull ( ) ) { if ( ( this . isNullable ( ) ) && ( iType != DBConstants . SQL_SELECT_TYPE ) ) statement . setNull ( iParamColumn , Types . FLOAT ) ; else statement . setFloat ( iParamColumn , Float . NaN ) ; } else { if ( DBConstants . FALSE . equals ( this . getRecord ( ) . getTable ( ) . getDatabase ( ) ....
public class Sql { /** * Executes the given SQL statement ( typically an INSERT statement ) . * This variant allows you to receive the values of any auto - generated columns , * such as an autoincrement ID field ( or fields ) when you know the column name ( s ) of the ID field ( s ) . * An array variant of { @ li...
return executeInsert ( sql , Arrays . asList ( params ) , Arrays . asList ( keyColumnNames ) ) ;
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link FeaturePropertyType } { @ code > } * @ param value * Java instance representing xml element ' s value . * @ return * the new instance of { @ link JAXBElement } { @ code < } { @ link FeaturePropertyType } { @ co...
return new JAXBElement < FeaturePropertyType > ( _AppearanceMember_QNAME , FeaturePropertyType . class , null , value ) ;
public class MethodUtils { /** * < p > Invokes a named { @ code static } method whose parameter type matches the object type . < / p > * < p > This method delegates the method search to { @ link # getMatchingAccessibleMethod ( Class , String , Class [ ] ) } . < / p > * < p > This method supports calls to methods ta...
args = ArrayUtils . nullToEmpty ( args ) ; parameterTypes = ArrayUtils . nullToEmpty ( parameterTypes ) ; final Method method = getMatchingAccessibleMethod ( cls , methodName , parameterTypes ) ; if ( method == null ) { throw new NoSuchMethodException ( "No such accessible method: " + methodName + "() on class: " + cls...
public class StringUtility { /** * Splits a string on the given delimiter . * Does include all empty elements on the split . * @ param words the words will be added to this collection . * @ return the collection provided in words parameter */ public static < C extends Collection < String > > C splitString ( Strin...
return splitString ( line , 0 , line . length ( ) , delim , words ) ;
public class TraitSetType { /** * Gets the value of the attributeSet property . * This accessor method returns a reference to the live list , * not a snapshot . Therefore any modification you make to the * returned list will be present inside the JAXB object . * This is why there is not a < CODE > set < / CODE ...
if ( attributeSet == null ) { attributeSet = new ArrayList < TraitSetType . AttributeSet > ( ) ; } return this . attributeSet ;
public class ScribeIndex { /** * Unregisters a component scribe . * @ param scribe the scribe to unregister */ public void unregister ( ICalComponentScribe < ? extends ICalComponent > scribe ) { } }
experimentalCompByName . remove ( scribe . getComponentName ( ) . toUpperCase ( ) ) ; experimentalCompByClass . remove ( scribe . getComponentClass ( ) ) ;
public class ApiOvhTelephony { /** * Get this object properties * REST : GET / telephony / { billingAccount } / line / { serviceName } / phone / phonebook / { bookKey } / phonebookContact / { id } * @ param billingAccount [ required ] The name of your billingAccount * @ param serviceName [ required ] * @ param ...
String qPath = "/telephony/{billingAccount}/line/{serviceName}/phone/phonebook/{bookKey}/phonebookContact/{id}" ; StringBuilder sb = path ( qPath , billingAccount , serviceName , bookKey , id ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return convertTo ( resp , OvhPhonebookContact . class ) ;
public class MapIterate { /** * For each < em > value < / em > of the map , predicate is evaluated with the element as the parameter . * Each element which causes predicate to evaluate to false is added to the targetCollection . */ public static < K , V , R extends Map < K , V > > R rejectMapOnEntry ( Map < K , V > m...
MapIterate . forEachKeyValue ( map , new Procedure2 < K , V > ( ) { public void value ( K argument1 , V argument2 ) { if ( ! predicate . accept ( argument1 , argument2 ) ) { target . put ( argument1 , argument2 ) ; } } } ) ; return target ;
public class TypeUsesMap { /** * return null */ private IType verifyTypeNameDoesNotHaveRelativePackage ( IType type , String strNs , String strRelativeName ) { } }
String ns = type . getNamespace ( ) ; if ( ns != null && ns . contains ( strNs ) ) { ns = ns . substring ( strNs . length ( ) ) ; // noinspection LoopStatementThatDoesntLoop for ( StringTokenizer tokenizer = new StringTokenizer ( ns , "." ) ; tokenizer . hasMoreTokens ( ) ; ) { String token = tokenizer . nextToken ( ) ...
public class IncomingFileTransfer { /** * This method negotiates the stream and then transfer ' s the file over the negotiated stream . * The transferred file will be saved at the provided location . * This method will return immediately , file transfer progress can be monitored through several * methods : * < ...
if ( file == null ) { throw new IllegalArgumentException ( "File cannot be null" ) ; } if ( ! file . exists ( ) ) { file . createNewFile ( ) ; } if ( ! file . canWrite ( ) ) { throw new IllegalArgumentException ( "Cannot write to provided file" ) ; } Thread transferThread = new Thread ( new Runnable ( ) { @ Override pu...
public class ACE { /** * Sets application data . * @ param applicationData application data . */ public void setApplicationData ( final byte [ ] applicationData ) { } }
this . applicationData = applicationData == null || applicationData . length == 0 ? null : Arrays . copyOf ( applicationData , applicationData . length ) ;
public class ChromeCast { /** * < p > Loads and starts playing specified media < / p > * < p > If no application is running at the moment then exception is thrown . < / p > * @ param mediaTitle name to be displayed * @ param thumb url of video thumbnail to be displayed , relative to media url * @ param url medi...
Status status = getStatus ( ) ; Application runningApp = status . getRunningApp ( ) ; if ( runningApp == null ) { throw new ChromeCastException ( "No application is running in ChromeCast" ) ; } Map < String , Object > metadata = new HashMap < String , Object > ( 2 ) ; metadata . put ( "title" , mediaTitle ) ; metadata ...
public class AWSSimpleSystemsManagementClient { /** * Lists your resource data sync configurations . Includes information about the last time a sync attempted to start , * the last sync status , and the last time a sync successfully completed . * The number of sync configurations might be too large to return using ...
request = beforeClientExecution ( request ) ; return executeListResourceDataSync ( request ) ;
public class OpenTSDBGenericWriter { /** * Write the results of the query . * @ param server * @ param query - the query and its results . * @ param results */ @ Override public void internalWrite ( Server server , Query query , ImmutableList < Result > results ) throws Exception { } }
this . startOutput ( ) ; for ( String formattedResult : messageFormatter . formatResults ( results , server ) ) { log . debug ( "Sending result: {}" , formattedResult ) ; this . sendOutput ( formattedResult ) ; } this . finishOutput ( ) ;
public class L3ToSBGNPDConverter { /** * Looks for the display name of this PhysicalEntity . If there is none , then it looks for the * display name of its EntityReference . If still no name at hand , it tries the standard * name , and then first element in name lists . * A good BioPAX file will use a short and s...
// Use gene symbol of PE for ( Xref xref : pe . getXref ( ) ) { String sym = extractGeneSymbol ( xref ) ; if ( sym != null ) return sym ; } // Use gene symbol of ER EntityReference er = null ; if ( pe instanceof SimplePhysicalEntity ) { er = ( ( SimplePhysicalEntity ) pe ) . getEntityReference ( ) ; } if ( er != null )...
public class CadmiumCli { /** * < p > Automatically wires in all CliCommand subtypes using Reflections library . < / p > * @ see < a href = " http : / / code . google . com / p / reflections / " > Reflections < / a > * @ see < a href = " http : / / jcommander . org / " > JCommander < / a > * @ param jCommander Th...
Map < String , CliCommand > commands = new LinkedHashMap < String , CliCommand > ( ) ; Reflections reflections = new Reflections ( "com.meltmedia.cadmium" ) ; Set < Class < ? extends CliCommand > > subTypes = reflections . getSubTypesOf ( CliCommand . class ) ; for ( Class < ? extends CliCommand > cliCommandClass : sub...
public class Category { /** * Delegates to { @ link org . slf4j . Logger # error ( String ) } method in SLF4J . */ public void fatal ( Object message ) { } }
differentiatedLog ( FATAL_MARKER , CATEGORY_FQCN , LocationAwareLogger . ERROR_INT , message , null ) ;
public class JDBCRepositoryBuilder { /** * Set the source of JDBC connections , overriding any configuration * supported by these methods : * < ul > * < li > { @ link # setDriverClassName } * < li > { @ link # setDriverURL } * < li > { @ link # setUserName } * < li > { @ link # setPassword } * < / ul > */...
mDataSource = dataSource ; mDriverClassName = null ; mURL = null ; mUsername = null ; mPassword = null ;
public class MessageStore { /** * Request that the receiver prints its xml representation * ( recursively ) onto standard out . * @ throws IOException */ @ Override public final void xmlRequestWriteOnSystemOut ( ) throws IOException { } }
FormattedWriter writer = new FormattedWriter ( new OutputStreamWriter ( System . out ) ) ; xmlWriteOn ( writer ) ; writer . flush ( ) ;
public class ProtobufInputMarshaller { /** * Create a new session into which to read the stream data */ public static ReadSessionResult readSession ( MarshallerReaderContext context , int id ) throws IOException , ClassNotFoundException { } }
return readSession ( context , id , EnvironmentFactory . newEnvironment ( ) , new SessionConfigurationImpl ( ) ) ;
public class Utils { /** * Parse a double from a String in a safe manner * @ param val the string to parse * @ param defValue the default value to return in parsing fails * @ return the parsed double , or default value */ public static double parseDouble ( String val , double defValue ) { } }
if ( TextUtils . isEmpty ( val ) ) return defValue ; try { return Double . parseDouble ( val ) ; } catch ( NumberFormatException e ) { return defValue ; }
public class RegexUtil { /** * Fixes a bad problem with regular expression replacement strings . * Replaces \ and $ for escaped versions for regex replacement . * This was somehow fixed in java 5 ( a similar method was added ) . Since Jawr supports 1.4, * this method is used instead . * @ param replacement * ...
// Double the backslashes , so they are left as they are after replacement . String result = replacement . replaceAll ( "\\\\" , "\\\\\\\\" ) ; // Add backslashes after dollar signs result = result . replaceAll ( "\\$" , "\\\\\\$" ) ; return result ;
public class RRFedNonFedBudgetV1_1Generator { /** * This method gets BudgetYear1DataType details like BudgetPeriodStartDate , BudgetPeriodEndDate , BudgetPeriod * KeyPersons , OtherPersonnel , TotalCompensation , Equipment , ParticipantTraineeSupportCosts , Travel , OtherDirectCosts * DirectCosts , IndirectCosts , ...
BudgetYear1DataType budgetYear = BudgetYear1DataType . Factory . newInstance ( ) ; ScaleTwoDecimal totalDirectCostSharing = ScaleTwoDecimal . ZERO ; ScaleTwoDecimal totalIndirectCostSharing = ScaleTwoDecimal . ZERO ; if ( periodInfo != null ) { budgetYear . setBudgetPeriodStartDate ( s2SDateTimeService . convertDateToC...
public class TimeZoneNamesImpl { /** * ( non - Javadoc ) * @ see android . icu . text . TimeZoneNames # getMetaZoneDisplayName ( java . lang . String , android . icu . text . TimeZoneNames . NameType ) */ @ Override public String getMetaZoneDisplayName ( String mzID , NameType type ) { } }
if ( mzID == null || mzID . length ( ) == 0 ) { return null ; } return loadMetaZoneNames ( mzID ) . getName ( type ) ;
public class SpringApplication { /** * Template method delegating to * { @ link # configurePropertySources ( ConfigurableEnvironment , String [ ] ) } and * { @ link # configureProfiles ( ConfigurableEnvironment , String [ ] ) } in that order . * Override this method for complete control over Environment customiza...
if ( this . addConversionService ) { ConversionService conversionService = ApplicationConversionService . getSharedInstance ( ) ; environment . setConversionService ( ( ConfigurableConversionService ) conversionService ) ; } configurePropertySources ( environment , args ) ; configureProfiles ( environment , args ) ;
public class SepaVersion { /** * Erzeugt den Namen der Java - Klasse des zugehoerigen SEPA - Generators . * @ param jobName der Job - Name . Z . Bsp . " UebSEPA " . * @ return der Name der Java - Klasse des zugehoerigen SEPA - Generators . */ public String getGeneratorClass ( String jobName ) { } }
StringBuilder sb = new StringBuilder ( ) ; sb . append ( PainGeneratorIf . class . getPackage ( ) . getName ( ) ) ; sb . append ( ".Gen" ) ; sb . append ( jobName ) ; sb . append ( this . type . getValue ( ) ) ; sb . append ( new DecimalFormat ( DF_MAJOR ) . format ( this . major ) ) ; sb . append ( new DecimalFormat (...
public class CdnConfigurationMarshaller { /** * Marshall the given parameter object . */ public void marshall ( CdnConfiguration cdnConfiguration , ProtocolMarshaller protocolMarshaller ) { } }
if ( cdnConfiguration == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( cdnConfiguration . getAdSegmentUrlPrefix ( ) , ADSEGMENTURLPREFIX_BINDING ) ; protocolMarshaller . marshall ( cdnConfiguration . getContentSegmentUrlPrefix ( ) , CONTEN...
public class Utils { /** * The main goal of the resilientUrlDecode is to have a UrlDecode that keeps working * even if the input is seriously flawed or even uses a rejected standard . * @ param input the UrlEncoded input string * @ return Url decoded result string */ public static String resilientUrlDecode ( Stri...
String cookedInput = input ; if ( cookedInput . indexOf ( '%' ) > - 1 ) { // Transform all existing UTF - 8 standard into UTF - 16 standard . cookedInput = VALID_STANDARD . matcher ( cookedInput ) . replaceAll ( "%00%$1" ) ; // Discard chopped encoded char at the end of the line ( there is no way to know what it was ) ...
public class ReadExcelUtils { /** * 获取指定Sheet页的列名 , 列名必须在第1列 , 0 - based * @ param sheet 指定Sheet页 * @ return 返回List * @ throws ReadExcelException */ public static List < String > getColumnOfSheet ( Sheet sheet ) throws ReadExcelException { } }
// 获取列名 Row row = sheet . getRow ( 1 ) ; if ( row == null ) { throw new ReadExcelException ( "The Column name is invalid!" ) ; } List < String > columnList = new ArrayList < String > ( ) ; // 遍历列名并存入List中 for ( int i = 0 ; i < row . getLastCellNum ( ) ; i ++ ) { Cell cell = row . getCell ( i ) ; if ( cell != null ) { c...
public class GenIncrementalDomCodeVisitor { /** * Visits the { @ link HtmlAttributeNode } . The attribute nodes will typically be children of the * corresponding { @ link HtmlOpenTagNode } or in a let / param of kind attributes , e . g . * < pre > * { let $ attrs kind = " attributes " } * attr = " value " * {...
IncrementalDomCodeBuilder jsCodeBuilder = getJsCodeBuilder ( ) ; if ( node . hasValue ( ) ) { // Attribute keys can only be print statements or constants . As such , the first child // should be the key and the second the value . checkState ( isComputableAsJsExprsVisitor . exec ( node . getChild ( 0 ) ) ) ; jsCodeBuild...
public class GuestPanicInformation { @ Nonnull public static GuestPanicInformation hyperV ( @ Nonnull GuestPanicInformationHyperV hyperV ) { } }
GuestPanicInformation self = new GuestPanicInformation ( ) ; self . type = GuestPanicInformationType . hyper_v ; self . hyperV = hyperV ; return self ;
public class SessionsInner { /** * Gets an integration account session . * @ param resourceGroupName The resource group name . * @ param integrationAccountName The integration account name . * @ param sessionName The integration account session name . * @ throws IllegalArgumentException thrown if parameters fai...
return getWithServiceResponseAsync ( resourceGroupName , integrationAccountName , sessionName ) . toBlocking ( ) . single ( ) . body ( ) ;
public class SimpleRandomMutation { /** * Implements the mutation operation */ private void doMutation ( double probability , DoubleSolution solution ) { } }
for ( int i = 0 ; i < solution . getNumberOfVariables ( ) ; i ++ ) { if ( randomGenerator . getRandomValue ( ) <= probability ) { Double value = solution . getLowerBound ( i ) + ( ( solution . getUpperBound ( i ) - solution . getLowerBound ( i ) ) * randomGenerator . getRandomValue ( ) ) ; solution . setVariableValue (...
public class StaleIpPermission { /** * The security group pairs . Returns the ID of the referenced security group and VPC , and the ID and status of the * VPC peering connection . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setUserIdGroupPairs ( java . ...
if ( this . userIdGroupPairs == null ) { setUserIdGroupPairs ( new com . amazonaws . internal . SdkInternalList < UserIdGroupPair > ( userIdGroupPairs . length ) ) ; } for ( UserIdGroupPair ele : userIdGroupPairs ) { this . userIdGroupPairs . add ( ele ) ; } return this ;
public class ServerService { /** * Add secondary network * @ param servers server references * @ param config secondary network config * @ return OperationFuture wrapper for list of Server */ public OperationFuture < List < Server > > addSecondaryNetwork ( List < Server > servers , AddNetworkConfig config ) { } }
List < JobFuture > futures = servers . stream ( ) . map ( server -> addSecondaryNetwork ( server , config ) . jobFuture ( ) ) . collect ( toList ( ) ) ; return new OperationFuture < > ( servers , new ParallelJobsFuture ( futures ) ) ;
public class CloudSdk { /** * Returns the version of the Cloud SDK installation . Version is determined by reading the VERSION * file located in the Cloud SDK directory . */ public CloudSdkVersion getVersion ( ) throws CloudSdkVersionFileException { } }
Path versionFile = getPath ( ) . resolve ( VERSION_FILE_NAME ) ; if ( ! Files . isRegularFile ( versionFile ) ) { throw new CloudSdkVersionFileNotFoundException ( "Cloud SDK version file not found at " + versionFile . toString ( ) ) ; } String contents = "" ; try { List < String > lines = Files . readAllLines ( version...
public class CmsPublishProject { /** * Returns < code > true < / code > if the selection has blocking locks . < p > * @ return < code > true < / code > if the selection has blocking locks */ public boolean isLockStateOk ( ) { } }
org . opencms . workplace . commons . CmsLock lockDialog = new org . opencms . workplace . commons . CmsLock ( getJsp ( ) ) ; lockDialog . setParamIncluderelated ( CmsStringUtil . TRUE ) ; lockDialog . setBlockingFilter ( getBlockingFilter ( ) ) ; if ( ! isDirectPublish ( ) ) { lockDialog . setParamResource ( "/" ) ; }...
public class IOManager { /** * Creates a new { @ link Channel . ID } in one of the temp directories . Multiple * invocations of this method spread the channels evenly across the different directories . * @ return A channel to a temporary directory . */ public Channel . ID createChannel ( ) { } }
final int num = getNextPathNum ( ) ; return new Channel . ID ( this . paths [ num ] , num , this . random ) ;
public class AbstractFacade { /** * { @ inheritDoc } */ @ Override public < E extends R > E retrieve ( final UniqueKey < E > uniqueKey ) { } }
final Optional < E > first = retrieveMany ( uniqueKey ) . stream ( ) . findFirst ( ) ; return first . orElseThrow ( ( ) -> new CoreRuntimeException ( "Impossible to load component " + uniqueKey . classField ( ) . getCanonicalName ( ) + " with key parts " + uniqueKey . value ( ) . toString ( ) ) ) ;
public class ZipOutputStream { /** * Sets the ZIP file comment . * @ param comment the comment string * @ exception IllegalArgumentException if the length of the specified * ZIP file comment is greater than 0xFFFF bytes */ public void setComment ( String comment ) { } }
if ( comment != null ) { this . comment = zc . getBytes ( comment ) ; if ( this . comment . length > 0xffff ) throw new IllegalArgumentException ( "ZIP file comment too long." ) ; }
public class StereoTool { /** * < p > Given three points ( A , B , C ) , makes the vectors A - B and A - C , and makes * the cross product of these two vectors ; this has the effect of making a * third vector at right angles to AB and AC . < / p > * < p > NOTE : the returned normal is normalized ; that is , it ha...
Vector3d vectorAB = new Vector3d ( ) ; Vector3d vectorAC = new Vector3d ( ) ; Vector3d normal = new Vector3d ( ) ; StereoTool . getRawNormal ( ptA , ptB , ptC , normal , vectorAB , vectorAC ) ; normal . normalize ( ) ; return normal ;
public class ClassHelper { /** * Get the name of the package the passed object resides in . * @ param aObject * The class to get the information from . May be < code > null < / code > . * @ return The package name of the passed object . */ @ Nullable public static String getClassPackageName ( @ Nullable final Obj...
return aObject == null ? null : getClassPackageName ( aObject . getClass ( ) ) ;
public class TypeQualifierNullnessAnnotationDatabase { /** * Convert a NullnessAnnotation into the ClassDescriptor of the equivalent * JSR - 305 nullness type qualifier . * @ param n * a NullnessAnnotation * @ return ClassDescriptor of the equivalent JSR - 305 nullness type qualifier */ private ClassDescriptor ...
if ( n == NullnessAnnotation . CHECK_FOR_NULL ) { return JSR305NullnessAnnotations . CHECK_FOR_NULL ; } else if ( n == NullnessAnnotation . NONNULL ) { return JSR305NullnessAnnotations . NONNULL ; } else if ( n == NullnessAnnotation . NULLABLE ) { return JSR305NullnessAnnotations . NULLABLE ; } else if ( n == NullnessA...
public class Smb2IoctlResponse { /** * { @ inheritDoc } * @ see jcifs . internal . smb2 . ServerMessageBlock2 # isErrorResponseStatus ( ) */ @ Override protected boolean isErrorResponseStatus ( ) { } }
int status = getStatus ( ) ; return status != NtStatus . NT_STATUS_INVALID_PARAMETER && ! ( status == NtStatus . NT_STATUS_INVALID_PARAMETER && ( this . ctlCode == Smb2IoctlRequest . FSCTL_SRV_COPYCHUNK || this . ctlCode == Smb2IoctlRequest . FSCTL_SRV_COPYCHUNK_WRITE ) ) && ! ( status == NtStatus . NT_STATUS_BUFFER_OV...
public class GeoPackageIOUtils { /** * Format the bytes into readable text * @ param bytes * bytes * @ return bytes text */ public static String formatBytes ( long bytes ) { } }
double value = bytes ; String unit = "B" ; if ( bytes >= 1024 ) { int exponent = ( int ) ( Math . log ( bytes ) / Math . log ( 1024 ) ) ; exponent = Math . min ( exponent , 4 ) ; switch ( exponent ) { case 1 : unit = "KB" ; break ; case 2 : unit = "MB" ; break ; case 3 : unit = "GB" ; break ; case 4 : unit = "TB" ; bre...
public class VerticalRecordsProcessor { /** * 表の開始位置 ( 見出し ) の位置情報を取得する 。 * @ param sheet * @ param anno * @ param accessor * @ param config * @ return 表の開始位置 。 指定したラベルが見つからない場合 、 設定によりnullを返す 。 * @ throws AnnotationInvalidException アノテーションの値が不正で 、 表の開始位置が位置が見つからない場合 。 * @ throws CellNotFoundExcepti...
if ( Utils . isNotEmpty ( anno . headerAddress ( ) ) ) { try { return Optional . of ( CellPosition . of ( anno . headerAddress ( ) ) ) ; } catch ( IllegalArgumentException e ) { throw new AnnotationInvalidException ( anno , MessageBuilder . create ( "anno.attr.invalidAddress" ) . var ( "property" , accessor . getNameWi...
public class AtomicAllocator { /** * This method seeks for unused zero - copy memory allocations * @ param bucketId Id of the bucket , serving allocations * @ return size of memory that was deallocated */ protected synchronized long seekUnusedZero ( Long bucketId , Aggressiveness aggressiveness ) { } }
AtomicLong freeSpace = new AtomicLong ( 0 ) ; int totalElements = ( int ) memoryHandler . getAllocatedHostObjects ( bucketId ) ; // these 2 variables will contain jvm - wise memory access frequencies float shortAverage = zeroShort . getAverage ( ) ; float longAverage = zeroLong . getAverage ( ) ; // threshold is calcul...
public class StyleSet { /** * 设置cell文本对齐样式 * @ param halign 横向位置 * @ param valign 纵向位置 * @ return this * @ since 4.0.0 */ public StyleSet setAlign ( HorizontalAlignment halign , VerticalAlignment valign ) { } }
StyleUtil . setAlign ( this . headCellStyle , halign , valign ) ; StyleUtil . setAlign ( this . cellStyle , halign , valign ) ; StyleUtil . setAlign ( this . cellStyleForNumber , halign , valign ) ; StyleUtil . setAlign ( this . cellStyleForDate , halign , valign ) ; return this ;
public class DocumentsClient { /** * Returns the list of all documents of the knowledge base . * < p > Sample code : * < pre > < code > * try ( DocumentsClient documentsClient = DocumentsClient . create ( ) ) { * KnowledgeBaseName parent = KnowledgeBaseName . of ( " [ PROJECT ] " , " [ KNOWLEDGE _ BASE ] " ) ; ...
ListDocumentsRequest request = ListDocumentsRequest . newBuilder ( ) . setParent ( parent == null ? null : parent . toString ( ) ) . build ( ) ; return listDocuments ( request ) ;
public class BBCImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public void setBCdoName ( String newBCdoName ) { } }
String oldBCdoName = bCdoName ; bCdoName = newBCdoName ; if ( eNotificationRequired ( ) ) eNotify ( new ENotificationImpl ( this , Notification . SET , AfplibPackage . BBC__BCDO_NAME , oldBCdoName , bCdoName ) ) ;
public class AutoMlClient { /** * Lists column specs in a table spec . * < p > Sample code : * < pre > < code > * try ( AutoMlClient autoMlClient = AutoMlClient . create ( ) ) { * TableSpecName parent = TableSpecName . of ( " [ PROJECT ] " , " [ LOCATION ] " , " [ DATASET ] " , " [ TABLE _ SPEC ] " ) ; * for ...
ListColumnSpecsRequest request = ListColumnSpecsRequest . newBuilder ( ) . setParent ( parent == null ? null : parent . toString ( ) ) . build ( ) ; return listColumnSpecs ( request ) ;
public class RuleBasedTokenizer { /** * This function normalizes multi - period expressions ( . . . ) to make * tokenization easier . * @ param line * @ return string */ private String generateMultidots ( String line ) { } }
line = multiDots . matcher ( line ) . replaceAll ( " DOTMULTI$1 " ) ; final Matcher dotMultiDot = dotmultiDot . matcher ( line ) ; while ( dotMultiDot . find ( ) ) { line = dotmultiDotAny . matcher ( line ) . replaceAll ( "DOTDOTMULTI $1" ) ; line = dotMultiDot . replaceAll ( "DOTDOTMULTI" ) ; // reset the matcher othe...
public class SrvBalanceStd { /** * < p > Lazy getter for balanceAtAllDirtyCheck . < / p > * @ param pAddParam additional param * @ return BalanceAtAllDirtyCheck * @ throws Exception - an exception */ public final synchronized BalanceAtAllDirtyCheck lazyGetBalanceAtAllDirtyCheck ( final Map < String , Object > pAd...
if ( this . balanceAtAllDirtyCheck == null ) { BalanceAtAllDirtyCheck balLoc = new BalanceAtAllDirtyCheck ( ) ; balLoc . setItsId ( 1L ) ; this . balanceAtAllDirtyCheck = getSrvOrm ( ) . retrieveEntity ( pAddParam , balLoc ) ; if ( this . balanceAtAllDirtyCheck == null ) { getSrvOrm ( ) . insertEntity ( pAddParam , bal...
public class SQLLexer { /** * Split SQL statements on semicolons with quoted string and comment support . * Degenerate formats such as escape as the last character or unclosed strings are ignored and * left to the SQL parser to complain about . This is a simple string splitter that errs on the * side of not split...
List < String > statements = new ArrayList < > ( ) ; // Use a character array for efficient character - at - a - time scanning . char [ ] buf = sql . toCharArray ( ) ; // Set to null outside of quoted segments or the quote character inside them . Character cQuote = null ; // Set to null outside of comments or to the st...
public class AsyncBenchmark { /** * Prints the results of the voting simulation and statistics * about performance . * @ throws Exception if anything unexpected happens . */ public synchronized void printResults ( ) throws Exception { } }
ClientStats stats = fullStatsContext . fetch ( ) . getStats ( ) ; // 1 . Voting Board statistics , Voting results and performance statistics String display = "\n" + HORIZONTAL_RULE + " Voting Results\n" + HORIZONTAL_RULE + "\nA total of %,9d votes were received during the benchmark...\n" + " - %,9d Accepted\n" + " - %,...
public class DeleteConferenceProviderRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( DeleteConferenceProviderRequest deleteConferenceProviderRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( deleteConferenceProviderRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( deleteConferenceProviderRequest . getConferenceProviderArn ( ) , CONFERENCEPROVIDERARN_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException...
public class AnnotatedElementMap { /** * Returns the property value specified by ' key ' within this map . */ public Object getProperty ( PropertyKey key ) { } }
if ( ! isValidKey ( key ) ) throw new IllegalArgumentException ( "Key " + key + " is not valid for " + _mapClass ) ; // Look for the property value on the associated annotated element Class propertySet = key . getPropertySet ( ) ; Annotation annot = _annotElem . getAnnotation ( propertySet ) ; if ( annot != null ) retu...
public class AbstractSlingBean { /** * Determine a typed parent resource . */ public ResourceHandle getParent ( String resourceType ) { } }
ResourceHandle result = getResource ( ) ; while ( result . isValid ( ) && ! result . isResourceType ( resourceType ) ) { result = result . getParent ( ) ; } if ( ! result . isValid ( ) ) { result = getParent ( resourceType , getPath ( ) ) ; // implicit fallback to the path } return result ;
public class SchemaMapper { /** * Reads a schema and adds generated types to the given code model . * @ param codeModel * the java code - generation context that should be used to * generated new types * @ param className * the name of the parent class the represented by this schema * @ param packageName ...
JPackage jpackage = codeModel . _package ( packageName ) ; ObjectNode schemaNode = readSchema ( schemaUrl ) ; return ruleFactory . getSchemaRule ( ) . apply ( className , schemaNode , null , jpackage , new Schema ( null , schemaNode , null ) ) ;
import java . util . * ; class Main { /** * This function calculates the perfect square numbers in a given range . * Example : * findPerfectSquares ( 1 , 30 ) - > [ 1 , 4 , 9 , 16 , 25] * findPerfectSquares ( 50 , 100 ) - > [ 64 , 81 , 100] * findPerfectSquares ( 100 , 200 ) - > [ 100 , 121 , 144 , 169 , 196] ...
List < Integer > perfectSquaresList = new ArrayList < > ( ) ; for ( int num = start ; num <= end ; num ++ ) { double sqrt = Math . sqrt ( num ) ; if ( ( sqrt - Math . floor ( sqrt ) ) == 0 ) { perfectSquaresList . add ( num ) ; } } return perfectSquaresList ;
public class FluentValidateInterceptor { /** * 将需要额外验证的验证器封装为 { @ link ValidatorChain } * @ param fluentValid 参数上的注解装饰 * @ return 验证器链 */ private ValidatorChain getAddOnValidatorChain ( FluentValid fluentValid ) { } }
ValidatorChain chain = new ValidatorChain ( ) ; chain . setValidators ( getAddOnValidators ( fluentValid ) ) ; return chain ;
public class CommerceOrderUtil { /** * Returns all the commerce orders where groupId = & # 63 ; and userId = & # 63 ; and orderStatus = & # 63 ; . * @ param groupId the group ID * @ param userId the user ID * @ param orderStatus the order status * @ return the matching commerce orders */ public static List < Co...
return getPersistence ( ) . findByG_U_O ( groupId , userId , orderStatus ) ;
public class TriggerDef { /** * Retrieves the SQL character sequence required to ( re ) create the * trigger , as a StringBuffer * @ return the SQL character sequence required to ( re ) create the * trigger */ public String getSQL ( ) { } }
StringBuffer sb = new StringBuffer ( 256 ) ; sb . append ( Tokens . T_CREATE ) . append ( ' ' ) ; sb . append ( Tokens . T_TRIGGER ) . append ( ' ' ) ; sb . append ( name . getSchemaQualifiedStatementName ( ) ) . append ( ' ' ) ; sb . append ( actionTimingString ) . append ( ' ' ) ; sb . append ( eventTimingString ) . ...
public class CmsThreadStore { /** * Takes care of the persistence of data normally held in memory . < p > */ protected void persistData ( ) { } }
try { // save the resource locks to db m_securityManager . writeLocks ( ) ; // save the log entries to db m_securityManager . updateLog ( ) ; } catch ( Throwable t ) { if ( LOG . isErrorEnabled ( ) ) { LOG . error ( org . opencms . lock . Messages . get ( ) . getBundle ( ) . key ( org . opencms . lock . Messages . ERR_...
public class AmazonCloudFrontClient { /** * Updates the configuration for a web distribution . * < important > * When you update a distribution , there are more required fields than when you create a distribution . When you * update your distribution by using this API action , follow the steps here to get the cur...
request = beforeClientExecution ( request ) ; return executeUpdateDistribution ( request ) ;
public class JoinerMultiReducer { /** * TODO : DRY this code up with what ' s in ChainedAggregatorImpl */ private boolean increment ( List [ ] lengths , int [ ] indices , int j , int overrideIndex ) { } }
if ( j == - 1 ) return false ; if ( j == overrideIndex ) { return increment ( lengths , indices , j - 1 , overrideIndex ) ; } indices [ j ] ++ ; if ( indices [ j ] >= lengths [ j ] . size ( ) ) { indices [ j ] = 0 ; return increment ( lengths , indices , j - 1 , overrideIndex ) ; } return true ;
public class Scope { /** * { @ inheritDoc } */ @ Override public void dispatchEvent ( IEvent event ) { } }
Set < IConnection > conns = getClientConnections ( ) ; for ( IConnection conn : conns ) { try { conn . dispatchEvent ( event ) ; } catch ( RuntimeException e ) { log . error ( "Exception during dispatching event: {}" , event , e ) ; } }
public class StreamPersistedValueData { /** * { @ inheritDoc } */ public void writeExternal ( ObjectOutput out ) throws IOException { } }
if ( url == null ) { super . writeExternal ( out ) ; return ; } out . writeInt ( orderNumber ) ; // write the path byte [ ] buf = url . toString ( ) . getBytes ( "UTF-8" ) ; out . writeInt ( buf . length ) ; out . write ( buf ) ;
public class Synthetic { /** * Returns a sequence of events where some items are more popular than others , according to a * zipfian distribution . * @ param items the number of items in the distribution * @ param constant the skew factor for the distribution * @ param events the number of events in the distrib...
return generate ( new ZipfianGenerator ( items , constant ) , events ) ;
public class DynoJedisPipeline { /** * * * Binary Operations * * * */ @ Override public Response < String > set ( final byte [ ] key , final byte [ ] value ) { } }
return new PipelineOperation < String > ( ) { @ Override Response < String > execute ( Pipeline jedisPipeline ) throws DynoException { long startTime = System . nanoTime ( ) / 1000 ; try { return jedisPipeline . set ( key , value ) ; } finally { long duration = System . nanoTime ( ) / 1000 - startTime ; opMonitor . rec...
public class BlockingSlopPusherJob { /** * Loop over entries in the slop table and attempt to push them to the * deserving server */ public void run ( ) { } }
// don ' t try to run slop pusher job when rebalancing if ( metadataStore . getServerStateUnlocked ( ) . equals ( MetadataStore . VoldemortState . REBALANCING_MASTER_SERVER ) ) { logger . error ( "Cannot run slop pusher job since Voldemort server is rebalancing" ) ; return ; } logger . info ( "Started blocking slop pus...
public class AwsServiceClientImpl { /** * Executes the AWS request , and decodes the result into an instance of the * specified type . The response will be decoded using the codec registry specified when the app * client was configured . If no codec registry was configured , a default codec registry will be * use...
return proxy . execute ( request , resultClass ) ;
public class DomConfigurationFactory { /** * Parse an URL tag . * @ param el tag element * @ return Configuration URL . */ private Url parseUrl ( Node el ) { } }
return new Url ( nodeAttribute ( el , TAG_VAR_ATTR_NAME , Url . DEFAULT_NAME ) , nodeAttribute ( el , TAG_ATTR_GHOST , PatternElement . DEFAULT_GHOST_VALUE ) , nodeAttribute ( el , TAG_URL_ATTR_LOCAL , Url . DEFAULT_LOCAL ) , nodeAttribute ( el , TAG_URL_ATTR_SCHEMALESS , Url . DEFAULT_SCHEMALESS ) ) ;
public class HttpSessionContextImpl { /** * unlock session for serialized session access feature * overrides empty method in SessionContext . java */ public void unlockSession ( HttpSession sess ) { } }
if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && LoggingUtil . SESSION_LOGGER_CORE . isLoggable ( Level . FINE ) ) { LoggingUtil . SESSION_LOGGER_CORE . entering ( methodClassName , methodNames [ UNLOCK_SESSION ] ) ; } SessionData session = ( SessionData ) sess ; Object obj = session . getSessio...
public class DialogPreference { /** * Requests the soft input method to be shown . */ private void requestInputMode ( ) { } }
if ( needInputMethod ( ) ) { Window window = dialog . getWindow ( ) ; if ( window != null ) { window . setSoftInputMode ( WindowManager . LayoutParams . SOFT_INPUT_STATE_ALWAYS_VISIBLE ) ; } }
public class PropertyTypeRegistry { /** * Registers a property type . * @ param typeName The name of the property type as used in the plug - in declaration . * @ param editorClass The property editor class to use to edit this property ' s value . */ public static void register ( String typeName , Class < ? extends ...
register ( typeName , null , editorClass ) ;
public class MpxjBatchConvert { /** * Main method . * @ param args array of command line arguments */ public static void main ( String [ ] args ) { } }
try { if ( args . length != 4 ) { System . out . println ( "Usage: MpxjBatchConvert <source directory> <source suffix> <target directory> <target suffix>" ) ; } else { File sourceDirectory = new File ( args [ 0 ] ) ; final String sourceSuffix = args [ 1 ] ; String targetDirectory = args [ 2 ] ; String targetSuffix = ar...
public class AbstractColorPickerPreference { /** * Sets the shape of the preview of the preference ' s color . * @ param previewShape * The shape , which should be set , as a value of the enum { @ link PreviewShape } . The * shape may not be null */ public final void setPreviewShape ( @ NonNull final PreviewShape...
Condition . INSTANCE . ensureNotNull ( previewShape , "The preview shape may not be null" ) ; this . previewShape = previewShape ; if ( previewLoader != null ) { previewLoader . setShape ( previewShape ) ; } adaptPreviewView ( ) ;
public class WHERE { /** * < div color = ' red ' style = " font - size : 24px ; color : red " > < b > < i > < u > JCYPHER < / u > < / i > < / b > < / div > * < div color = ' red ' style = " font - size : 18px ; color : red " > < i > takes an expression like ' < b > n . property ( " age " ) < / b > ' , yielding a prop...
BooleanOperation ret = P . valueOf ( val ) ; ASTNode an = APIObjectAccess . getAstNode ( ret ) ; an . setClauseType ( ClauseType . WHERE ) ; return ret ;
public class BeginSegmentCommandImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public void setFLAG2 ( Integer newFLAG2 ) { } }
Integer oldFLAG2 = flag2 ; flag2 = newFLAG2 ; if ( eNotificationRequired ( ) ) eNotify ( new ENotificationImpl ( this , Notification . SET , AfplibPackage . BEGIN_SEGMENT_COMMAND__FLAG2 , oldFLAG2 , flag2 ) ) ;
public class FeatureRepository { /** * This is called at the beginning of a provisioning operation . It re - initializes * or refreshes the cache against what is known in the filesystem . * Note that for update operations ( rather than initial provisioning ) , cachedFeatures will * be pre - populated . . */ publi...
isDirty = false ; // If we haven ' t looked at anything from the cache or the filesystem , this is bootstrap time boolean firstInit = cachedFeatures . isEmpty ( ) ; autoFeatures = new ArrayList < SubsystemFeatureDefinitionImpl > ( ) ; knownFeatures = new HashMap < File , SubsystemFeatureDefinitionImpl > ( ) ; knownBadF...
public class Row { /** * Gets a < CODE > Cell < / CODE > or < CODE > Table < / CODE > from a certain column . * @ param column the column the < CODE > Cell / Table < / CODE > is in . * @ return the < CODE > Cell < / CODE > , < CODE > Table < / CODE > or < VAR > Object < / VAR > if the column was * reserved or nul...
if ( ( column < 0 ) || ( column > columns ) ) { throw new IndexOutOfBoundsException ( "getCell at illegal index :" + column + " max is " + columns ) ; } return cells [ column ] ;
public class PatriciaTrieFormatter { /** * Format trie * @ param trie trie to format * @ param formatBitString true if the bits for this key should be included in the node * @ return formatted trie , not null */ public String format ( PatriciaTrie < V > trie , boolean formatBitString ) { } }
StringBuilder builder = new StringBuilder ( ) ; builder . append ( formatHeader ( ) ) ; builder . append ( formatNode ( trie . getRoot ( ) . getLeft ( ) , - 1 , trie . getKeyMapper ( ) , formatBitString ) ) ; builder . append ( formatTrailer ( ) ) ; return builder . toString ( ) ;
public class RelevantCycles { /** * Given a list of cycles return those which are independent ( & oplus ; - sum ) * from the current basis . * @ param cycles cycles of a given length * @ return cycles which were independent */ private List < Cycle > independent ( final Collection < Cycle > cycles ) { } }
final List < Cycle > independent = new ArrayList < Cycle > ( cycles . size ( ) ) ; for ( final Cycle cycle : cycles ) { if ( basis . isIndependent ( cycle ) ) independent . add ( cycle ) ; } return independent ;
public class ComboBoxArrowButtonPainter { /** * DOCUMENT ME ! * @ param s DOCUMENT ME ! * @ param type DOCUMENT ME ! * @ return DOCUMENT ME ! */ public Paint getComboBoxButtonBorderPaint ( Shape s , CommonControlState type ) { } }
TwoColors colors = getCommonBorderColors ( type ) ; return createVerticalGradient ( s , colors ) ;
public class XMLErrorResponseWriter { /** * Write an error for a given exception . * < b > Note : < / b > Make sure { @ link XMLErrorResponseWriter # startDocument ( ) } * has been previously invoked to start the XML * stream document , and { @ link XMLErrorResponseWriter # endDocument ( ) } is invoked after to e...
checkNotNull ( exception ) ; try { xmlWriter . writeStartElement ( ODATA_METADATA_NS , ERROR ) ; xmlWriter . writeNamespace ( METADATA , ODATA_METADATA_NS ) ; xmlWriter . writeStartElement ( METADATA , ErrorRendererConstants . CODE , ODATA_METADATA_NS ) ; xmlWriter . writeCharacters ( String . valueOf ( exception . get...