signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class MBeanExporter { /** * Unexports all MBeans that have been exported through this MBeanExporter . * @ return a map of object names that could not be exported and the corresponding exception . */ public Map < String , Exception > unexportAllAndReportMissing ( ) { } }
Map < String , Exception > errors = new HashMap < > ( ) ; synchronized ( exportedObjects ) { List < ObjectName > toRemove = new ArrayList < > ( exportedObjects . size ( ) ) ; for ( ObjectName objectName : exportedObjects . keySet ( ) ) { try { server . unregisterMBean ( objectName ) ; toRemove . add ( objectName ) ; } ...
public class Integrator { /** * Read plug - in feature . * @ param featureName plug - in feature name * @ return combined list of values */ private String readExtensions ( final String featureName ) { } }
final Set < String > exts = new HashSet < > ( ) ; if ( featureTable . containsKey ( featureName ) ) { for ( final Value ext : featureTable . get ( featureName ) ) { final String e = ext . value . trim ( ) ; if ( e . length ( ) != 0 ) { exts . add ( e ) ; } } } return StringUtils . join ( exts , CONF_LIST_SEPARATOR ) ;
public class BucketSplitter { /** * Determines the number of elements when the partitions must have equal sizes * @ param numberOfPartitions * @ return int */ protected int determineElementsPerPart ( int numberOfPartitions ) { } }
double numberOfElementsWithinFile = sourceFile . getFilledUpFromContentStart ( ) / sourceFile . getElementSize ( ) ; double elementsPerPart = numberOfElementsWithinFile / numberOfPartitions ; int roundNumber = ( int ) Math . ceil ( elementsPerPart ) ; return roundNumber ;
public class OptionValueImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public void setValue ( String newValue ) { } }
String oldValue = value ; value = newValue ; if ( eNotificationRequired ( ) ) eNotify ( new ENotificationImpl ( this , Notification . SET , SimpleAntlrPackage . OPTION_VALUE__VALUE , oldValue , value ) ) ;
public class AbstractFileInfo { /** * Try to locate a file in the file system . * @ param directory a directory to locate the file in * @ param fileName a file name with optional path information * @ return true if the file was found , false otherwise */ protected final boolean tryFS ( String directory , String f...
String path = directory + "/" + fileName ; if ( directory == null ) { path = fileName ; } File file = new File ( path ) ; if ( this . testFile ( file ) == true ) { // found in file system try { this . url = file . toURI ( ) . toURL ( ) ; this . file = file ; this . fullFileName = FilenameUtils . getName ( file . getAbs...
public class PaxWicketBundleListener { /** * { @ inheritDoc } */ @ Override public void removedBundle ( Bundle bundle , BundleEvent event , ExtendedBundle object ) { } }
removeRelevantBundle ( object ) ; LOGGER . debug ( "{} is removed as a relevant bundle for pax wicket" , bundle . getSymbolicName ( ) ) ;
public class TorqueModelDef { /** * Adds a table to this model . * @ param table The table */ private void addTable ( TableDef table ) { } }
table . setOwner ( this ) ; _tableDefs . put ( table . getName ( ) , table ) ;
public class CommentImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public void eUnset ( int featureID ) { } }
switch ( featureID ) { case AfplibPackage . COMMENT__COMMENT : setComment ( COMMENT_EDEFAULT ) ; return ; } super . eUnset ( featureID ) ;
public class Parser { /** * { @ code a . otherwise ( fallback ) } runs { @ code fallback } when { @ code a } matches zero input . This is different * from { @ code a . or ( alternative ) } where { @ code alternative } is run whenever { @ code a } fails to match . * < p > One should usually use { @ link # or } . *...
return new Parser < T > ( ) { @ Override boolean apply ( ParseContext ctxt ) { final Object result = ctxt . result ; final int at = ctxt . at ; final int step = ctxt . step ; final int errorIndex = ctxt . errorIndex ( ) ; if ( Parser . this . apply ( ctxt ) ) return true ; if ( ctxt . errorIndex ( ) != errorIndex ) ret...
public class CmsDecoratorConfiguration { /** * Adds decorations defined in a < code > { @ link CmsDecorationDefintion } < / code > object to the map of all decorations . < p > * @ param decorationDefinition the < code > { @ link CmsDecorationDefintion } < / code > the decorations to be added * @ throws CmsException...
m_decorations . putAll ( decorationDefinition . createDecorationBundle ( m_cms , m_configurationLocale ) . getAll ( ) ) ;
public class AmpSkin { /** * * * * * * Initialization * * * * * */ private void initGraphics ( ) { } }
// Set initial size if ( Double . compare ( gauge . getPrefWidth ( ) , 0.0 ) <= 0 || Double . compare ( gauge . getPrefHeight ( ) , 0.0 ) <= 0 || Double . compare ( gauge . getWidth ( ) , 0.0 ) <= 0 || Double . compare ( gauge . getHeight ( ) , 0.0 ) <= 0 ) { if ( gauge . getPrefWidth ( ) > 0 && gauge . getPrefHeight (...
public class FctBnAccEntitiesProcessors { /** * < p > Get PrcPrepaymentToGfr ( create and put into map ) . < / p > * @ param pAddParam additional param * @ return requested PrcPrepaymentToGfr * @ throws Exception - an exception */ protected final PrcPrepaymentToGfr < RS > createPutPrcPrepaymentToGfr ( final Map <...
PrcPrepaymentToGfr < RS > proc = new PrcPrepaymentToGfr < RS > ( ) ; @ SuppressWarnings ( "unchecked" ) IEntityProcessor < PrepaymentTo , Long > procDlg = ( IEntityProcessor < PrepaymentTo , Long > ) lazyGetPrcAccDocGetForReverse ( pAddParam ) ; proc . setPrcAccDocGetForReverse ( procDlg ) ; proc . setSrvTypeCode ( get...
public class StringEditor { /** * Finds the next appearance of the String . * @ param str */ @ Override public synchronized void findNext ( String str ) { } }
boolean found = false ; int startLine = line ; int startColumn = column + 1 ; // We always start one char after the cursor position . while ( ! found && startLine <= lines . size ( ) ) { String currentLine = getContent ( startLine ) ; String linePart = currentLine . length ( ) > startColumn ? currentLine . substring ( ...
public class Profiler { /** * This method is used in tests . */ void sanityCheck ( ) throws IllegalStateException { } }
if ( getStatus ( ) != TimeInstrumentStatus . STOPPED ) { throw new IllegalStateException ( "time instrument [" + getName ( ) + " is not stopped" ) ; } long totalElapsed = globalStopWatch . elapsedTime ( ) ; long childTotal = 0 ; for ( TimeInstrument ti : childTimeInstrumentList ) { childTotal += ti . elapsedTime ( ) ; ...
public class ResourceManager { /** * Fetches and decodes the specified resource into a { @ link BufferedImage } . * @ exception FileNotFoundException thrown if the resource could not be located in any of the * bundles in the specified set , or if the specified set does not exist . * @ exception IOException thrown...
// grab the resource bundles in the specified resource set ResourceBundle [ ] bundles = getResourceSet ( rset ) ; if ( bundles == null ) { throw new FileNotFoundException ( "Unable to locate image resource [set=" + rset + ", path=" + path + "]" ) ; } String localePath = getLocalePath ( path ) ; // look for the resource...
public class Fallback { /** * Configures the { @ code fallback } to be executed asynchronously if execution fails . The { @ code fallback } applies an * { @ link ExecutionAttemptedEvent } . * @ throws NullPointerException if { @ code fallback } is null */ @ SuppressWarnings ( "unchecked" ) public static < R > Fallb...
return new Fallback < > ( Assert . notNull ( ( CheckedFunction ) fallback , "fallback" ) , true ) ;
public class KeyboardManager { /** * documentation inherited from interface AncestorListener */ public void ancestorAdded ( AncestorEvent e ) { } }
gainedFocus ( ) ; if ( _window == null ) { _window = SwingUtilities . getWindowAncestor ( _target ) ; _window . addWindowFocusListener ( this ) ; }
public class Mp2SettingsMarshaller { /** * Marshall the given parameter object . */ public void marshall ( Mp2Settings mp2Settings , ProtocolMarshaller protocolMarshaller ) { } }
if ( mp2Settings == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( mp2Settings . getBitrate ( ) , BITRATE_BINDING ) ; protocolMarshaller . marshall ( mp2Settings . getChannels ( ) , CHANNELS_BINDING ) ; protocolMarshaller . marshall ( mp2Se...
public class CxxIssuesReportSensor { /** * Saves a code violation which is detected in the given file / line and has given ruleId and message . Saves it to the * given project and context . Project or file - level violations can be saved by passing null for the according * parameters ( ' file ' = null for project l...
NewIssue newIssue = sensorContext . newIssue ( ) . forRule ( RuleKey . of ( getRuleRepositoryKey ( ) , issue . getRuleId ( ) ) ) ; Set < InputFile > affectedFiles = new HashSet < > ( ) ; List < NewIssueLocation > newIssueLocations = new ArrayList < > ( ) ; List < NewIssueLocation > newIssueFlow = new ArrayList < > ( ) ...
public class PolylineEncoding { /** * Decodes an encoded path string into a sequence of LatLngs . */ public static List < LatLng > decode ( final String encodedPath ) { } }
int len = encodedPath . length ( ) ; final List < LatLng > path = new ArrayList < > ( len / 2 ) ; int index = 0 ; int lat = 0 ; int lng = 0 ; while ( index < len ) { int result = 1 ; int shift = 0 ; int b ; do { b = encodedPath . charAt ( index ++ ) - 63 - 1 ; result += b << shift ; shift += 5 ; } while ( b >= 0x1f ) ;...
public class FileMgr { /** * Returns the file channel for the specified filename . The file channel is * stored in a map keyed on the filename . If the file is not open , then it * is opened and the file channel is added to the map . * @ param fileName * the specified filename * @ return the file channel asso...
synchronized ( prepareAnchor ( fileName ) ) { IoChannel fileChannel = openFiles . get ( fileName ) ; if ( fileChannel == null ) { File dbFile = fileName . equals ( DEFAULT_LOG_FILE ) ? new File ( logDirectory , fileName ) : new File ( dbDirectory , fileName ) ; fileChannel = IoAllocator . newIoChannel ( dbFile ) ; open...
public class TriplestoreResource { /** * Fetch data for this resource . * < p > This is equivalent to the following SPARQL query : * < pre > < code > * SELECT ? predicate ? object ? binarySubject ? binaryPredicate ? binaryObject * WHERE { * GRAPH trellis : PreferServerManaged { * IDENTIFIER ? predicate ? ob...
LOGGER . debug ( "Fetching data from RDF datastore for: {}" , identifier ) ; final Var binarySubject = Var . alloc ( "binarySubject" ) ; final Var binaryPredicate = Var . alloc ( "binaryPredicate" ) ; final Var binaryObject = Var . alloc ( "binaryObject" ) ; final Query q = new Query ( ) ; q . setQuerySelectType ( ) ; ...
public class PtrCLog { /** * Send a VERBOSE log message . * @ param tag * @ param msg */ public static void v ( String tag , String msg ) { } }
if ( sLevel > LEVEL_VERBOSE ) { return ; } Log . v ( tag , msg ) ;
public class GetSecurityConfigurationRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( GetSecurityConfigurationRequest getSecurityConfigurationRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( getSecurityConfigurationRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( getSecurityConfigurationRequest . getName ( ) , NAME_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to ...
public class PolicyAssignmentsInner { /** * Creates a policy assignment . * Policy assignments are inherited by child resources . For example , when you apply a policy to a resource group that policy is assigned to all resources in the group . * @ param scope The scope of the policy assignment . * @ param policyA...
return createWithServiceResponseAsync ( scope , policyAssignmentName , parameters ) . toBlocking ( ) . single ( ) . body ( ) ;
public class AkkaRpcServiceUtils { /** * Utility method to create RPC service from configuration and hostname , port . * @ param hostname The hostname / address that describes the TaskManager ' s data location . * @ param portRangeDefinition The port range to start TaskManager on . * @ param configuration The con...
final ActorSystem actorSystem = BootstrapTools . startActorSystem ( configuration , hostname , portRangeDefinition , LOG ) ; return instantiateAkkaRpcService ( configuration , actorSystem ) ;
public class Jenkins { /** * Gets the item by its path name from the given context * < h2 > Path Names < / h2 > * If the name starts from ' / ' , like " / foo / bar / zot " , then it ' s interpreted as absolute . * Otherwise , the name should be something like " foo / bar " and it ' s interpreted like * relativ...
if ( context == null ) context = this ; if ( pathName == null ) return null ; if ( pathName . startsWith ( "/" ) ) // absolute return getItemByFullName ( pathName ) ; Object /* Item | ItemGroup */ ctx = context ; StringTokenizer tokens = new StringTokenizer ( pathName , "/" ) ; while ( tokens . hasMoreTokens ( ) ) { St...
public class ScalingQueue { /** * Inserts the specified element at the tail of this queue if there is at least one available thread to run the * current task . If all pool threads are actively busy , it rejects the offer . * @ param runnable the element to add . * @ return true if it was possible to add the eleme...
int allWorkingThreads = this . executor . getActiveCount ( ) + super . size ( ) ; return allWorkingThreads < this . executor . getPoolSize ( ) && super . offer ( runnable ) ;
public class ViewServer { /** * Invoke this method to register a new view hierarchy . * @ param view A view that belongs to the view hierarchy / window to register * @ name name The name of the view hierarchy / window to register * @ see # removeWindow ( View ) */ public void addWindow ( View view , String name )...
mWindowsLock . writeLock ( ) . lock ( ) ; try { mWindows . put ( view . getRootView ( ) , name ) ; } finally { mWindowsLock . writeLock ( ) . unlock ( ) ; } fireWindowsChangedEvent ( ) ;
public class H2O { /** * Return an error message with an accompanying list of URLs to help the user get more detailed information . * @ param numbers H2O tech note numbers . * @ param message Message to present to the user . * @ return A longer message including a list of URLs . */ public static String technote (...
StringBuilder sb = new StringBuilder ( ) . append ( message ) . append ( "\n" ) . append ( "\n" ) . append ( "For more information visit:\n" ) ; for ( int number : numbers ) { sb . append ( " http://jira.h2o.ai/browse/TN-" ) . append ( Integer . toString ( number ) ) . append ( "\n" ) ; } return sb . toString ( ) ;
public class ProxyThread { /** * Tells whether or not the given { @ code header } has a request to the ( parent ) proxy itself . * The request is to the proxy itself if the following conditions are met : * < ol > * < li > The requested port is the one that the proxy is bound to ; < / li > * < li > The requested...
try { if ( header . getHostPort ( ) == inSocket . getLocalPort ( ) ) { String targetDomain = header . getHostName ( ) ; if ( API . API_DOMAIN . equals ( targetDomain ) ) { return true ; } if ( isProxyAddress ( InetAddress . getByName ( targetDomain ) ) ) { return true ; } } } catch ( Exception e ) { // ZAP : Log except...
public class AWSServiceCatalogClient { /** * Disassociates the specified product from the specified portfolio . * @ param disassociateProductFromPortfolioRequest * @ return Result of the DisassociateProductFromPortfolio operation returned by the service . * @ throws ResourceNotFoundException * The specified res...
request = beforeClientExecution ( request ) ; return executeDisassociateProductFromPortfolio ( request ) ;
public class LittleEndianRandomAccessFile { /** * Writes an eight - byte { @ code long } to the underlying output stream * in little endian order , low byte first , high byte last * @ param pLong the { @ code long } to be written . * @ throws IOException if the underlying stream throws an IOException . */ public ...
file . write ( ( int ) pLong & 0xFF ) ; file . write ( ( int ) ( pLong >>> 8 ) & 0xFF ) ; file . write ( ( int ) ( pLong >>> 16 ) & 0xFF ) ; file . write ( ( int ) ( pLong >>> 24 ) & 0xFF ) ; file . write ( ( int ) ( pLong >>> 32 ) & 0xFF ) ; file . write ( ( int ) ( pLong >>> 40 ) & 0xFF ) ; file . write ( ( int ) ( p...
public class AbstractMojo { /** * Add rules from the given directory to the list of sources . * @ param sources The sources . * @ param directory The directory . * @ throws MojoExecutionException On error . */ private void addRuleFiles ( List < RuleSource > sources , File directory ) throws MojoExecutionException...
List < RuleSource > ruleSources = readRulesDirectory ( directory ) ; for ( RuleSource ruleSource : ruleSources ) { getLog ( ) . debug ( "Adding rules from file " + ruleSource ) ; sources . add ( ruleSource ) ; }
public class CommerceShippingFixedOptionPersistenceImpl { /** * Removes all the commerce shipping fixed options where commerceShippingMethodId = & # 63 ; from the database . * @ param commerceShippingMethodId the commerce shipping method ID */ @ Override public void removeByCommerceShippingMethodId ( long commerceShi...
for ( CommerceShippingFixedOption commerceShippingFixedOption : findByCommerceShippingMethodId ( commerceShippingMethodId , QueryUtil . ALL_POS , QueryUtil . ALL_POS , null ) ) { remove ( commerceShippingFixedOption ) ; }
public class AopFactory { /** * 获取父类到子类的映射值 , 或者接口到实现类的映射值 * @ param from 父类或者接口 * @ return 如果映射存在则返回映射值 , 否则返回参数 from 的值 */ public Class < ? > getMappingClass ( Class < ? > from ) { } }
if ( mapping != null ) { Class < ? > ret = mapping . get ( from ) ; return ret != null ? ret : from ; } else { return from ; }
public class DaoTemplate { /** * 更新 * @ param entity 实体对象 , 必须包含主键 * @ return 更新行数 * @ throws SQLException SQL执行异常 */ public int update ( Entity entity ) throws SQLException { } }
if ( CollectionUtil . isEmpty ( entity ) ) { return 0 ; } entity = fixEntity ( entity ) ; Object pk = entity . get ( primaryKeyField ) ; if ( null == pk ) { throw new SQLException ( StrUtil . format ( "Please determine `{}` for update" , primaryKeyField ) ) ; } final Entity where = Entity . create ( tableName ) . set (...
public class Criteria { /** * Parse the provided criteria * Deprecated use { @ link Filter # parse ( String ) } * @ param criteria * @ return a criteria */ @ Deprecated public static Criteria parse ( String criteria ) { } }
if ( criteria == null ) { throw new InvalidPathException ( "Criteria can not be null" ) ; } String [ ] split = criteria . trim ( ) . split ( " " ) ; if ( split . length == 3 ) { return create ( split [ 0 ] , split [ 1 ] , split [ 2 ] ) ; } else if ( split . length == 1 ) { return create ( split [ 0 ] , "EXISTS" , "true...
public class BermudanSwaption { /** * This method returns the value random variable of the product within the specified model , evaluated at a given evalutationTime . * Note : For a lattice this is often the value conditional to evalutationTime , for a Monte - Carlo simulation this is the ( sum of ) value discounted ...
return ( RandomVariableInterface ) getValues ( evaluationTime , model ) . get ( "value" ) ;
public class StringUtils { /** * e . g . str1 = " aaaa / " , str2 = " / bbb " , separator = " / " will return " aaaa / bbb " * @ param str1 * @ param str2 * @ param separator * @ return */ public static String combine ( String str1 , String str2 , String separator ) { } }
if ( separator == null || separator . isEmpty ( ) ) { return str1 == null ? str2 : str1 . concat ( str2 ) ; } if ( str1 == null ) str1 = "" ; if ( str2 == null ) str2 = "" ; StringBuilder builder = new StringBuilder ( ) ; if ( str1 . endsWith ( separator ) ) { builder . append ( str1 . substring ( 0 , str1 . length ( )...
public class BZip2CompressorInputStream { /** * { @ inheritDoc } */ @ Override public int read ( ) throws IOException { } }
if ( this . in != null ) { int r = read0 ( ) ; count ( r < 0 ? - 1 : 1 ) ; return r ; } else { throw new IOException ( "stream closed" ) ; }
public class GISTreeSetUtil { /** * Normalize the given rectangle < var > n < / var > to be sure that * it has the same coordinates as < var > b < / var > when they are closed . * This function permits to obtain a bounding rectangle which may * be properly used for classification against the given bounds . * @ ...
double x1 = rect . getMinX ( ) ; if ( reference . getMinX ( ) < x1 && MathUtil . isEpsilonEqual ( reference . getMinX ( ) , x1 , MapElementConstants . POINT_FUSION_DISTANCE ) ) { x1 = reference . getMinX ( ) ; } double y1 = rect . getMinY ( ) ; if ( reference . getMinY ( ) < y1 && MathUtil . isEpsilonEqual ( reference ...
public class ServerConfigurationChecker { /** * Fills the configuration map . * @ param targetMap the map to fill * @ param recordMap the map to get data from */ private void fillConfMap ( Map < PropertyKey , Map < Optional < String > , List < String > > > targetMap , Map < Address , List < ConfigRecord > > recordM...
for ( Map . Entry < Address , List < ConfigRecord > > record : recordMap . entrySet ( ) ) { Address address = record . getKey ( ) ; String addressStr = String . format ( "%s:%s" , address . getHost ( ) , address . getRpcPort ( ) ) ; for ( ConfigRecord conf : record . getValue ( ) ) { PropertyKey key = conf . getKey ( )...
public class JsonWriter { /** * remap field name in custom classes * @ param fromJava * field name in java * @ param toJson * field name in json * @ since 2.1.1 */ @ SuppressWarnings ( { } }
"rawtypes" , "unchecked" } ) public < T > void remapField ( Class < T > type , String fromJava , String toJson ) { JsonWriterI map = this . getWrite ( type ) ; if ( ! ( map instanceof BeansWriterASMRemap ) ) { map = new BeansWriterASMRemap ( ) ; registerWriter ( map , type ) ; } ( ( BeansWriterASMRemap ) map ) . rename...
public class DeploymentDeserializer { /** * Gson invokes this call - back method during deserialization when it encounters a field of the specified type . * @ param element The Json data being deserialized * @ param type The type of the Object to deserialize to * @ param context The JSON deserialization context ...
JsonObject obj = element . getAsJsonObject ( ) ; JsonElement deployment = obj . get ( "deployment" ) ; if ( deployment != null && deployment . isJsonObject ( ) ) return gson . fromJson ( deployment , Deployment . class ) ; return gson . fromJson ( element , Deployment . class ) ;
public class LongStream { /** * Takes elements while the predicate returns { @ code false } . * Once predicate condition is satisfied by an element , the stream * finishes with this element . * < p > This is an intermediate operation . * < p > Example : * < pre > * stopPredicate : ( a ) - & gt ; a & gt ; 2 ...
return new LongStream ( params , new LongTakeUntil ( iterator , stopPredicate ) ) ;
public class PlainChangesLogImpl { /** * Collect last in ChangesLog order item child changes . * @ param rootData * - a item root of the changes scan * @ param forNodes * retrieves nodes ' ItemStates is true , or properties ' otherwise * @ return child items states */ public Collection < ItemState > getLastCh...
Map < String , ItemState > children = forNodes ? lastChildNodeStates . get ( rootData . getIdentifier ( ) ) : lastChildPropertyStates . get ( rootData . getIdentifier ( ) ) ; return children == null ? new ArrayList < ItemState > ( ) : children . values ( ) ;
public class PrcPurchaseInvoiceSave { /** * < p > Make other entries include reversing if it ' s need when save . < / p > * @ param pReqVars additional param * @ param pEntity entity * @ param pRequestData Request Data * @ param pIsNew if entity was new * @ throws Exception - an exception */ @ Override public...
String actionAdd = pRequestData . getParameter ( "actionAdd" ) ; if ( "makeAccEntries" . equals ( actionAdd ) ) { if ( pEntity . getReversedId ( ) != null ) { // reverse none - reversed lines : PurchaseInvoiceLine pil = new PurchaseInvoiceLine ( ) ; PurchaseInvoice reversed = new PurchaseInvoice ( ) ; reversed . setIts...
public class AbstractDockerMojo { /** * Resolve and customize image configuration */ private String initImageConfiguration ( Date buildTimeStamp ) { } }
// Resolve images resolvedImages = ConfigHelper . resolveImages ( log , images , // Unresolved images new ConfigHelper . Resolver ( ) { @ Override public List < ImageConfiguration > resolve ( ImageConfiguration image ) { return imageConfigResolver . resolve ( image , project , session ) ; } } , filter , // A filter whi...
public class StartAndStopSQL { /** * / * ( non - Javadoc ) * @ see org . springframework . context . Lifecycle # stop ( ) */ public void stop ( ) { } }
if ( state . compareAndSet ( RUNNING , STOPPING ) ) { log . debug ( "Stopping..." ) ; if ( ( StringUtils . isBlank ( stopSqlCondition ) || isInCondition ( stopSqlCondition ) ) && ( StringUtils . isBlank ( stopSqlConditionResource ) || isInConditionResource ( stopSqlConditionResource ) ) ) { if ( StringUtils . isNotBlan...
public class Configurations { /** * Get the property object as float , or return defaultVal if property is not defined . * @ param name * property name . * @ param defaultVal * default property value . * @ return * property value as float , return defaultVal if property is undefined . */ public static float...
if ( getConfiguration ( ) . containsKey ( name ) ) { return getConfiguration ( ) . getFloat ( name ) ; } else { return defaultVal ; }
public class Base64 { /** * syck _ base64dec */ public static byte [ ] dec ( Pointer _s , final int _len ) { } }
int len = _len ; byte [ ] sb = _s . buffer ; int s = _s . start ; int a = - 1 , b = - 1 , c = 0 , d ; byte [ ] ptrb = new byte [ len ] ; System . arraycopy ( sb , s , ptrb , 0 , len ) ; int ptr = 0 ; int end = 0 ; int send = s + len ; while ( s < send ) { while ( sb [ s ] == '\r' || sb [ s ] == '\n' ) { s ++ ; } if ( (...
public class FairScheduler { /** * Obtain the how many more slots can be scheduled on this tasktracker * @ param tts The status of the tasktracker * @ param type The type of the task to be scheduled * @ return the number of tasks can be scheduled */ private int getAvailableSlots ( TaskTrackerStatus tts , TaskType...
return getMaxSlots ( tts , type ) - occupiedSlotsAfterHeartbeat ( tts , type ) ;
public class ChunkCollision { /** * Checks whether the block can be placed at the position . < br > * Called via ASM from { @ link ItemBlock # onItemUse ( EntityPlayer , World , BlockPos , EnumHand , EnumFacing , float , float , float ) } at the * beginning . < br > * Tests the block bounding box ( boxes if { @ l...
ItemStack itemStack = player . getHeldItem ( hand ) ; Block block = world . getBlockState ( pos ) . getBlock ( ) ; AxisAlignedBB [ ] aabbs ; if ( block instanceof IChunkCollidable ) { IBlockState state = DirectionalComponent . getPlacedState ( ItemUtils . getStateFromItemStack ( itemStack ) , side , player ) ; aabbs = ...
public class DescribeVpnGatewaysResult { /** * Information about one or more virtual private gateways . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setVpnGateways ( java . util . Collection ) } or { @ link # withVpnGateways ( java . util . Collection ) } ...
if ( this . vpnGateways == null ) { setVpnGateways ( new com . amazonaws . internal . SdkInternalList < VpnGateway > ( vpnGateways . length ) ) ; } for ( VpnGateway ele : vpnGateways ) { this . vpnGateways . add ( ele ) ; } return this ;
public class CmsDefaultAppButtonProvider { /** * Creates a properly styled button for the given app . < p > * @ param cms the cms context * @ param appConfig the app configuration * @ param locale the locale * @ return the button component */ public static Component createAppButton ( CmsObject cms , final I_Cms...
Button button = createAppIconButton ( appConfig , locale ) ; button . addClickListener ( new ClickListener ( ) { private static final long serialVersionUID = 1L ; public void buttonClick ( ClickEvent event ) { if ( ( appConfig instanceof I_CmsHasAppLaunchCommand ) && ( ( ( I_CmsHasAppLaunchCommand ) appConfig ) . getAp...
public class MicroServiceTemplateSupport { /** * � � � ģ � ͅ � � ύ � � � � update - set � ַ � * @ param dbColMap � ύ � � � � * @ param modelEntryMap � � � ģ � � * @ param placeList ռλ � � � 滻ֵ * @ return * @ throws Exception */ public String createUpdateInStr ( Map dbColMap0 , Map modelEntryMap ) { } }
if ( dbColMap0 == null ) { return null ; } // add 201902 ning Map dbColMap = new CaseInsensitiveKeyMap ( ) ; if ( dbColMap0 != null ) { dbColMap . putAll ( dbColMap0 ) ; } List realValueList = new ArrayList ( ) ; List extValueList = new ArrayList ( ) ; Boolean metaFlag = false ; Map < String , Cobj > metaFlagMap = new ...
public class CopyProductRequest { /** * The copy options . If the value is < code > CopyTags < / code > , the tags from the source product are copied to the * target product . * @ param copyOptions * The copy options . If the value is < code > CopyTags < / code > , the tags from the source product are copied to ...
java . util . ArrayList < String > copyOptionsCopy = new java . util . ArrayList < String > ( copyOptions . length ) ; for ( CopyOption value : copyOptions ) { copyOptionsCopy . add ( value . toString ( ) ) ; } if ( getCopyOptions ( ) == null ) { setCopyOptions ( copyOptionsCopy ) ; } else { getCopyOptions ( ) . addAll...
public class MsgpackIOUtil { /** * Merges the { @ code message } with the byte array using the given { @ code schema } . */ public static < T > void mergeFrom ( byte [ ] data , int offset , int length , T message , Schema < T > schema , boolean numeric ) throws IOException { } }
ArrayBufferInput bios = new ArrayBufferInput ( data , offset , length ) ; MessageUnpacker unpacker = MessagePack . newDefaultUnpacker ( bios ) ; try { mergeFrom ( unpacker , message , schema , numeric ) ; } finally { unpacker . close ( ) ; }
public class Gather { /** * Like { @ link # take ( int ) } but returns { @ link Gather } that provides elements as long * as a predicate returns true . */ public Gather < T > takeWhile ( final Predicate < T > predicate ) { } }
final Iterator < T > it = each ( ) . iterator ( ) ; return from ( new AbstractIterator < T > ( ) { protected T computeNext ( ) { if ( ! it . hasNext ( ) ) { return endOfData ( ) ; } T t = it . next ( ) ; return predicate . apply ( t ) ? t : endOfData ( ) ; } } ) ;
public class CmsCategoriesTab { /** * Adds children item to the category tree and select the categories . < p > * @ param parent the parent item * @ param children the list of children * @ param selectedCategories the list of categories to select */ private void addChildren ( CmsTreeItem parent , List < CmsCatego...
if ( children != null ) { for ( CmsCategoryTreeEntry child : children ) { // set the category tree item and add to parent tree item CmsTreeItem treeItem = buildTreeItem ( child , selectedCategories ) ; if ( ( selectedCategories != null ) && selectedCategories . contains ( child . getPath ( ) ) ) { parent . setOpen ( tr...
public class gslbldnsentry { /** * Use this API to delete gslbldnsentry . */ public static base_response delete ( nitro_service client , gslbldnsentry resource ) throws Exception { } }
gslbldnsentry deleteresource = new gslbldnsentry ( ) ; deleteresource . ipaddress = resource . ipaddress ; return deleteresource . delete_resource ( client ) ;
public class PDPageContentStreamExt { /** * Set the non - stroking color in the DeviceCMYK color space . Range is 0 . . 255. * @ param c * The cyan value . * @ param m * The magenta value . * @ param y * The yellow value . * @ param k * The black value . * @ throws IOException * If an IO error occur...
if ( _isOutside255Interval ( c ) || _isOutside255Interval ( m ) || _isOutside255Interval ( y ) || _isOutside255Interval ( k ) ) { throw new IllegalArgumentException ( "Parameters must be within 0..255, but are (" + c + "," + m + "," + y + "," + k + ")" ) ; } setNonStrokingColor ( c / 255f , m / 255f , y / 255f , k / 25...
public class XEventConverter { /** * ( non - Javadoc ) * @ see * com . thoughtworks . xstream . converters . Converter # marshal ( java . lang . Object , * com . thoughtworks . xstream . io . HierarchicalStreamWriter , * com . thoughtworks . xstream . converters . MarshallingContext ) */ public void marshal ( O...
XEvent event = ( XEvent ) obj ; writer . addAttribute ( "xid" , event . getID ( ) . toString ( ) ) ; if ( event . getAttributes ( ) . size ( ) > 0 ) { writer . startNode ( "XAttributeMap" ) ; context . convertAnother ( event . getAttributes ( ) , XesXStreamPersistency . attributeMapConverter ) ; writer . endNode ( ) ; ...
public class ApiGeneratorUtils { /** * Return all of the available ApiImplementors . * If you implement a new ApiImplementor then you must add it to this class . * @ return all of the available ApiImplementors . */ public static List < ApiImplementor > getAllImplementors ( ) { } }
List < ApiImplementor > imps = new ArrayList < > ( ) ; ApiImplementor api ; imps . add ( new AlertAPI ( null ) ) ; api = new AntiCsrfAPI ( null ) ; api . addApiOptions ( new AntiCsrfParam ( ) ) ; imps . add ( api ) ; imps . add ( new PassiveScanAPI ( null ) ) ; imps . add ( new SearchAPI ( null ) ) ; api = new AutoUpda...
public class ModelConstraints { /** * Tests whether the two field descriptors are equal , i . e . have same name , same column * and same jdbc - type . * @ param first The first field * @ param second The second field * @ return < code > true < / code > if they are equal */ private boolean isEqual ( FieldDescri...
return first . getName ( ) . equals ( second . getName ( ) ) && first . getProperty ( PropertyHelper . OJB_PROPERTY_COLUMN ) . equals ( second . getProperty ( PropertyHelper . OJB_PROPERTY_COLUMN ) ) && first . getProperty ( PropertyHelper . OJB_PROPERTY_JDBC_TYPE ) . equals ( second . getProperty ( PropertyHelper . OJ...
public class SamlProfileSamlNameIdBuilder { /** * Gets supported name id formats . * @ param service the service * @ param adaptor the adaptor * @ return the supported name id formats */ protected static List < String > getSupportedNameIdFormats ( final SamlRegisteredService service , final SamlRegisteredServiceS...
val supportedNameFormats = adaptor . getSupportedNameIdFormats ( ) ; LOGGER . debug ( "Metadata for [{}] declares the following NameIDs [{}]" , adaptor . getEntityId ( ) , supportedNameFormats ) ; if ( supportedNameFormats . isEmpty ( ) ) { supportedNameFormats . add ( NameIDType . TRANSIENT ) ; LOGGER . debug ( "No su...
public class RestRepository { /** * Returns a pageable ( scan based ) result to the given query . * @ param query scan query * @ param reader scroll reader * @ return a scroll query */ ScrollQuery scanLimit ( String query , BytesArray body , long limit , ScrollReader reader ) { } }
return new ScrollQuery ( this , query , body , limit , reader ) ;
public class OkapiUI { /** * GEN - LAST : event _ aztecUserSizeActionPerformed */ private void aztecAutoSizeActionPerformed ( java . awt . event . ActionEvent evt ) { } }
// GEN - FIRST : event _ aztecAutoSizeActionPerformed // TODO add your handling code here : aztecUserSizeCombo . setEnabled ( false ) ; aztecUserEccCombo . setEnabled ( false ) ; encodeData ( ) ;
public class Servlet { /** * Processes all application requests , delegating them to their corresponding page , binary and JSON controllers . */ @ Override protected void service ( HttpServletRequest request , HttpServletResponse response ) throws ServletException , java . io . IOException { } }
if ( sessionSynchronization ) { String syncKey = getSyncKey ( request ) ; synchronized ( getSyncObject ( syncKey ) ) { try { doService ( request , response ) ; } finally { removeSyncObject ( syncKey ) ; } } } else { doService ( request , response ) ; }
public class AbcGrammar { /** * field - meter : : = % x4D . 3A * WSP time - signature header - eol < p > * < tt > M : < / tt > */ Rule FieldMeter ( ) { } }
return Sequence ( String ( "M:" ) , ZeroOrMore ( WSP ( ) ) . suppressNode ( ) , OptionalS ( TimeSignature ( ) ) , HeaderEol ( ) ) . label ( FieldMeter ) ;
public class AzureClient { /** * Given a polling state representing state of an LRO operation , this method returns { @ link Observable } object , * when subscribed to it , a series of polling will be performed and emits each polling state to downstream . * Polling will completes when the operation finish with succ...
if ( pollingState . initialHttpMethod ( ) . equalsIgnoreCase ( "PUT" ) || pollingState . initialHttpMethod ( ) . equalsIgnoreCase ( "PATCH" ) ) { return this . pollPutOrPatchAsync ( pollingState , resourceType ) ; } if ( pollingState . initialHttpMethod ( ) . equalsIgnoreCase ( "POST" ) || pollingState . initialHttpMet...
public class SingletonContext { /** * Get singleton context * The singleton context will use system properties for configuration as well as values specified in a file * specified through this < tt > jcifs . properties < / tt > system property . * @ return a global context , initialized on first call */ public sta...
if ( INSTANCE == null ) { try { log . debug ( "Initializing singleton context" ) ; init ( null ) ; } catch ( CIFSException e ) { log . error ( "Failed to create singleton JCIFS context" , e ) ; } } return INSTANCE ;
public class StringBindings { /** * Creates a string binding that contains the value of the given observable string converted to uppercase with the * given locale . See { @ link String # toUpperCase ( Locale ) } . * If the given observable string has a value of ` null ` the created binding will contain an empty str...
return Bindings . createStringBinding ( ( ) -> { final Locale localeValue = locale . getValue ( ) == null ? Locale . getDefault ( ) : locale . getValue ( ) ; return text . getValue ( ) == null ? "" : text . getValue ( ) . toUpperCase ( localeValue ) ; } , text , locale ) ;
public class CassandraSpanStore { /** * This makes it possible to safely drop the annotations _ query SASI . * < p > If dropped , trying to search by annotation in the UI will throw an IllegalStateException . */ static SelectTraceIdsFromSpan . Factory initialiseSelectTraceIdsFromSpan ( Session session ) { } }
try { return new SelectTraceIdsFromSpan . Factory ( session ) ; } catch ( DriverException ex ) { LOG . warn ( "failed to prepare annotation_query index statements: " + ex . getMessage ( ) ) ; return null ; }
public class RunUtil { /** * Creates a new run with the specified text and inherits the style of the parent paragraph . * @ param text the initial text of the run . * @ param parentParagraph the parent paragraph whose style to inherit . * @ return the newly created run . */ public static R create ( String text , ...
R run = create ( text ) ; applyParagraphStyle ( parentParagraph , run ) ; return run ;
public class IsEmptyBuilder { /** * リフレクションを使用しフィールドの値を取得し判定する 。 * < p > static修飾子を付与しているフィールドは 、 除外されます 。 * < p > transient修飾子を付与しているフィールドは 、 除外されます 。 * @ param obj 判定対象のオブジェクト 。 * @ param excludedFields 除外対処のフィールド名 。 * @ return 引数で指定したobjがnullの場合 、 trueを返す 。 */ public static boolean reflectionIsEmpt...
return reflectionIsEmpty ( obj , IsEmptyConfig . create ( ) , Arrays . asList ( excludedFields ) ) ;
public class SourceFinder { /** * Open a source file in given package . * @ param packageName * the name of the package containing the class whose source file * is given * @ param fileName * the unqualified name of the source file * @ return the source file * @ throws IOException * if a matching source ...
// On windows the fileName specification is different between a file in // a directory tree , and a // file in a zip file . In a directory tree the separator used is ' \ ' , // while in a zip it ' s ' / ' // Therefore for each repository figure out what kind it is and use the // appropriate separator . // In all practi...
public class AbstractGroupsPayload { /** * Used because ObjectMapper does not always read in doubles as doubles * When it is a Map < String , Object > */ private Double [ ] convertObjectArrToDoubleArr ( final Object [ ] list ) { } }
final Double [ ] toReturn = new Double [ list . length ] ; for ( int i = 0 ; i < list . length ; i ++ ) { toReturn [ i ] = ( ( Number ) list [ i ] ) . doubleValue ( ) ; } return toReturn ;
public class SupportedLCSCapabilitySetsImpl { /** * ( non - Javadoc ) * @ see * org . restcomm . protocols . ss7 . map . api . primitives . MAPAsnPrimitive # encodeAll ( org . mobicents . protocols . asn . AsnOutputStream ) */ public void encodeAll ( AsnOutputStream asnOs ) throws MAPException { } }
this . encodeAll ( asnOs , Tag . CLASS_UNIVERSAL , Tag . STRING_BIT ) ;
public class DocumentFactory { /** * Creates a document from the given tokens . The language parameter controls how the content of the documents is * created . If the language has whitespace tokens are joined with a single space between them , otherwise no space is * inserted between tokens . * @ param tokens the...
return fromTokens ( Arrays . asList ( tokens ) , language ) ;
public class OWLDataFactoryImpl { /** * SWRL */ @ Nonnull @ Override public SWRLRule getSWRLRule ( @ Nonnull Set < ? extends SWRLAtom > body , @ Nonnull Set < ? extends SWRLAtom > head , @ Nonnull Set < OWLAnnotation > annotations ) { } }
checkNull ( body , "body" , true ) ; checkNull ( head , "head" , true ) ; checkAnnotations ( annotations ) ; return new SWRLRuleImpl ( body , head , annotations ) ;
public class DBTablePropertySheet { /** * GEN - LAST : event _ tfPackageNameActionPerformed */ private void tfClassNameKeyTyped ( java . awt . event . KeyEvent evt ) // GEN - FIRST : event _ tfClassNameKeyTyped { } }
// GEN - HEADEREND : event _ tfClassNameKeyTyped // Revert on ESC if ( evt . getKeyChar ( ) == KeyEvent . VK_ESCAPE ) { this . tfClassName . setText ( aTable . getClassName ( ) ) ; }
public class Process { /** * checks if the passed in workId is * Activity * @ return boolean status */ public boolean isWorkActivity ( Long pWorkId ) { } }
if ( this . activities == null ) { return false ; } for ( int i = 0 ; i < activities . size ( ) ; i ++ ) { if ( pWorkId . longValue ( ) == activities . get ( i ) . getId ( ) . longValue ( ) ) { return true ; } } return false ;
public class JQMListItem { /** * Set the count bubble value . If null this will throw a runtime * exception . To remove a count bubble call removeCount ( ) */ public void setCount ( Integer count ) { } }
if ( count == null ) throw new RuntimeException ( "Cannot set count to null. Call removeCount() if you wanted to remove the bubble" ) ; if ( countElem == null ) createAndAttachCountElement ( ) ; countElem . setInnerText ( count . toString ( ) ) ;
public class Resource { /** * This method allows a pre - existing resource calendar to be attached to a * resource . * @ param calendar resource calendar */ public void setResourceCalendar ( ProjectCalendar calendar ) { } }
set ( ResourceField . CALENDAR , calendar ) ; if ( calendar == null ) { setResourceCalendarUniqueID ( null ) ; } else { calendar . setResource ( this ) ; setResourceCalendarUniqueID ( calendar . getUniqueID ( ) ) ; }
public class CheckBoxPainter { /** * Create the check mark shape . * @ param x the x coordinate of the upper - left corner of the check mark . * @ param y the y coordinate of the upper - left corner of the check mark . * @ param size the check mark size in pixels . * @ return the check mark shape . */ private S...
int markSize = ( int ) ( size * SIZE_MULTIPLIER + 0.5 ) ; int markX = x + ( int ) ( size * X_MULTIPLIER + 0.5 ) ; int markY = y + ( int ) ( size * Y_MULTIPLIER + 0.5 ) ; return shapeGenerator . createCheckMark ( markX , markY , markSize , markSize ) ;
public class Allele { /** * A method to simulate merging of two alleles strictly , meaning the sequence in the overlapping regions must be equal . * @ param right allele * @ param minimumOverlap for the merge to occur * @ return new merged allele . * @ throws IllegalSymbolException * @ throws IndexOutOfBounds...
Allele . Builder builder = Allele . builder ( ) ; Locus overlap = intersection ( right ) ; // System . out . println ( " overlap = " + overlap ) ; // System . out . println ( " overlap . length ( ) " + overlap . length ( ) + " < " + startimumOverlap + " ? ? " ) ; if ( overlap . length ( ) < minimumOverlap ) { return bu...
public class TaskQueue { /** * Wait that every pending task are processed . * This method will return once it has no pending task or once it has been closed */ public void waitAllTasks ( ) { } }
synchronized ( this . tasks ) { while ( this . hasTaskPending ( ) ) { try { this . tasks . wait ( ) ; } catch ( InterruptedException e ) { e . printStackTrace ( ) ; } } synchronized ( this . tasksReachesZero ) { if ( this . runningTasks > 0 ) { try { this . tasksReachesZero . wait ( ) ; } catch ( InterruptedException e...
public class VdmDebugModelPresentation { /** * ( non - Javadoc ) * @ see org . eclipse . debug . ui . IDebugModelPresentation # computeDetail ( org . eclipse . debug . core . model . IValue , * org . eclipse . debug . ui . IValueDetailListener ) */ public void computeDetail ( IValue value , IValueDetailListener lis...
String detail = "" ; try { if ( value instanceof VdmValue ) { VdmValue vdmValue = ( VdmValue ) value ; vdmValue . getVariables ( ) ; detail = vdmValue . getRawValue ( ) ; } else { detail = value . getValueString ( ) ; } } catch ( DebugException e ) { } listener . detailComputed ( value , detail ) ;
public class BundleDelegatingComponentInstanciationListener { /** * { @ inheritDoc } */ public void addBundle ( ExtendedBundle bundle ) { } }
if ( serviceRegistration == null ) { throw new IllegalStateException ( "Cannot add any bundle to listener while not started." ) ; } synchronized ( listeners ) { listeners . put ( bundle . getBundle ( ) . getSymbolicName ( ) , new BundleAnalysingComponentInstantiationListener ( bundle . getBundle ( ) . getBundleContext ...
public class TrainingsImpl { /** * Get untagged images for a given project iteration . * This API supports batching and range selection . By default it will only return first 50 images matching images . * Use the { take } and { skip } parameters to control how many images to return in a given batch . * @ param pr...
return getUntaggedImagesWithServiceResponseAsync ( projectId , getUntaggedImagesOptionalParameter ) . toBlocking ( ) . single ( ) . body ( ) ;
public class StringUtils { /** * Reads the contents of a file using the supplied { @ link Charset } ; the default system charset may vary across * systems so can ' t be trusted . * @ param aFile The file from which to read * @ param aCharset The character set of the file to be read * @ return The information re...
String string = new String ( readBytes ( aFile ) , aCharset ) ; if ( string . endsWith ( EOL ) ) { string = string . substring ( 0 , string . length ( ) - 1 ) ; } return string ;
public class AppServiceEnvironmentsInner { /** * Create or update a worker pool . * Create or update a worker pool . * @ param resourceGroupName Name of the resource group to which the resource belongs . * @ param name Name of the App Service Environment . * @ param workerPoolName Name of the worker pool . * ...
if ( resourceGroupName == null ) { throw new IllegalArgumentException ( "Parameter resourceGroupName is required and cannot be null." ) ; } if ( name == null ) { throw new IllegalArgumentException ( "Parameter name is required and cannot be null." ) ; } if ( workerPoolName == null ) { throw new IllegalArgumentException...
public class SimpleExpression { /** * Create a case expression builder * @ param other * @ return case expression builder */ public CaseForEqBuilder < T > when ( T other ) { } }
return new CaseForEqBuilder < T > ( mixin , ConstantImpl . create ( other ) ) ;
public class LogicSchemas { /** * Initialize proxy context . * @ param localSchemaNames local schema names * @ param schemaDataSources data source map * @ param schemaRules schema rule map * @ param isUsingRegistry is using registry or not */ public void init ( final Collection < String > localSchemaNames , fin...
databaseType = JDBCDriverURLRecognizerEngine . getDatabaseType ( schemaDataSources . values ( ) . iterator ( ) . next ( ) . values ( ) . iterator ( ) . next ( ) . getUrl ( ) ) ; initSchemas ( localSchemaNames , schemaDataSources , schemaRules , isUsingRegistry ) ;
public class HistoricExternalTaskLogManager { /** * delete / / / / / */ public void deleteHistoricExternalTaskLogsByProcessInstanceIds ( List < String > processInstanceIds ) { } }
deleteExceptionByteArrayByParameterMap ( "processInstanceIdIn" , processInstanceIds . toArray ( ) ) ; getDbEntityManager ( ) . deletePreserveOrder ( HistoricExternalTaskLogEntity . class , "deleteHistoricExternalTaskLogByProcessInstanceIds" , processInstanceIds ) ;
public class FontSpec { /** * Return a clone of this object but with a different font . * @ param aNewFont * The new font to use . Must not be < code > null < / code > . * @ return this if the fonts are equal - a new object otherwise . */ @ Nonnull public FontSpec getCloneWithDifferentFont ( @ Nonnull final Prelo...
ValueEnforcer . notNull ( aNewFont , "NewFont" ) ; if ( aNewFont . equals ( m_aPreloadFont ) ) return this ; // Don ' t copy loaded font ! return new FontSpec ( aNewFont , m_fFontSize , m_aColor ) ;
public class DataSet { /** * Add a row to the data set . * @ param columnValues Column values forming a row . * @ return The data set instance ( for chained calls ) . * @ throws InvalidOperationException if this data set is read - only . * @ see # rows ( Object [ ] [ ] ) * @ see # add ( DataSet ) * @ see # ...
checkIfNotReadOnly ( ) ; if ( columnValues . length != source . getColumnCount ( ) ) { throw new InvalidOperationException ( source . getColumnCount ( ) + " columns expected, not " + columnValues . length + "." ) ; } addRow ( new Row ( columnValues ) ) ; return this ;
public class Version { /** * Returns true if iphone / ipad and version is 3.2 + */ public static final boolean iOs3_2Plus ( ) { } }
if ( cachediOs3_2Plus == null ) { cachediOs3_2Plus = false ; if ( Platform . getName ( ) . equals ( PLATFORM_IPHONE_OS ) ) { String [ ] version = Javascript . stringSplit ( Platform . getVersion ( ) , "." ) ; int major = Integer . parseInt ( version [ 0 ] ) ; int minor = Integer . parseInt ( version [ 1 ] ) ; if ( ( ma...