signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class Types { /** * Return the least upper bound of list of types . if the lub does * not exist return null . */ public Type lub ( List < Type > ts ) { } }
return lub ( ts . toArray ( new Type [ ts . length ( ) ] ) ) ;
public class CPOptionUtil { /** * Returns a range of all the cp options where groupId = & # 63 ; . * Useful when paginating results . Returns a maximum of < code > end - start < / code > instances . < code > start < / code > and < code > end < / code > are not primary keys , they are indexes in the result set . Thus ...
return getPersistence ( ) . findByGroupId ( groupId , start , end ) ;
public class GroupByBuilder { /** * Get the results as a map * @ param expression projection * @ return new result transformer */ public < V > ResultTransformer < Map < K , V > > as ( FactoryExpression < V > expression ) { } }
final FactoryExpression < ? > transformation = FactoryExpressionUtils . wrap ( expression ) ; List < Expression < ? > > args = transformation . getArgs ( ) ; return new GroupByMap < K , V > ( key , args . toArray ( new Expression < ? > [ args . size ( ) ] ) ) { @ Override protected Map < K , V > transform ( Map < K , G...
public class PGpath { /** * This returns the path in the syntax expected by org . postgresql . */ public String getValue ( ) { } }
StringBuilder b = new StringBuilder ( open ? "[" : "(" ) ; for ( int p = 0 ; p < points . length ; p ++ ) { if ( p > 0 ) { b . append ( "," ) ; } b . append ( points [ p ] . toString ( ) ) ; } b . append ( open ? "]" : ")" ) ; return b . toString ( ) ;
public class WorkflowRunsInner { /** * Gets a workflow run . * @ param resourceGroupName The resource group name . * @ param workflowName The workflow name . * @ param runName The workflow run name . * @ param serviceCallback the async ServiceCallback to handle successful and failed responses . * @ throws Ill...
return ServiceFuture . fromResponse ( getWithServiceResponseAsync ( resourceGroupName , workflowName , runName ) , serviceCallback ) ;
public class MicroWriter { /** * Write a Micro Node to a file using the default settings . * @ param aNode * The node to be serialized . May be any kind of node ( incl . * documents ) . May not be < code > null < / code > . * @ param aPath * The file to write to . May not be < code > null < / code > . * @ r...
return writeToFile ( aNode , aPath , XMLWriterSettings . DEFAULT_XML_SETTINGS ) ;
public class RMQSink { /** * Sets up the queue . The default implementation just declares the queue . The user may override * this method to have a custom setup for the queue ( i . e . binding the queue to an exchange or * defining custom queue parameters ) */ protected void setupQueue ( ) throws IOException { } }
if ( queueName != null ) { channel . queueDeclare ( queueName , false , false , false , null ) ; }
public class VoiceApi { /** * Create a conference in a single step * Perform a single - step conference to the specified destination . This adds the destination to the existing call , creating a conference if necessary . * @ param id The connection ID of the call to conference . ( required ) * @ param singleStepC...
com . squareup . okhttp . Call call = singleStepConferenceValidateBeforeCall ( id , singleStepConferenceData , null , null ) ; Type localVarReturnType = new TypeToken < ApiSuccessResponse > ( ) { } . getType ( ) ; return apiClient . execute ( call , localVarReturnType ) ;
public class AWSCognitoIdentityProviderClient { /** * Disables the specified user as an administrator . Works on any user . * Requires developer credentials . * @ param adminDisableUserRequest * Represents the request to disable any user as an administrator . * @ return Result of the AdminDisableUser operation ...
request = beforeClientExecution ( request ) ; return executeAdminDisableUser ( request ) ;
public class CassandraStateFactory { /** * / * ( non - Javadoc ) * @ see storm . trident . state . StateFactory # makeState ( java . util . Map , backtype . storm . task . IMetricsContext , int , int ) */ @ SuppressWarnings ( { } }
"unchecked" , "rawtypes" } ) @ Override public State makeState ( Map conf , IMetricsContext metrics , int partitionIndex , int numPartitions ) { LOG . info ( "Making new CassandraState object for cluster " + cassandraClusterId + ": partition [" + partitionIndex + "] of [" + numPartitions + "]" ) ; AstyanaxClient client...
public class XCalElement { /** * Adds a child element . * @ param name the name of the child element * @ param value the value of the child element . * @ return the created element */ public Element append ( String name , String value ) { } }
Element child = document . createElementNS ( XCAL_NS , name ) ; child . setTextContent ( value ) ; element . appendChild ( child ) ; return child ;
public class ContentValues { /** * Gets a value and converts it to a Short . * @ param key the value to get * @ return the Short value , or null if the value is missing or cannot be converted */ public Short getAsShort ( String key ) { } }
Object value = mValues . get ( key ) ; try { return value != null ? ( ( Number ) value ) . shortValue ( ) : null ; } catch ( ClassCastException e ) { if ( value instanceof CharSequence ) { try { return Short . valueOf ( value . toString ( ) ) ; } catch ( NumberFormatException e2 ) { logger . severe ( "Cannot parse Shor...
public class TmdbDiscover { /** * Discover movies by different types of data like average rating , number of votes , genres and certifications . * @ param discover A discover object containing the search criteria required * @ return * @ throws MovieDbException */ public ResultList < MovieBasic > getDiscoverMovies...
URL url = new ApiUrl ( apiKey , MethodBase . DISCOVER ) . subMethod ( MethodSub . MOVIE ) . buildUrl ( discover . getParams ( ) ) ; String webpage = httpTools . getRequest ( url ) ; WrapperGenericList < MovieBasic > wrapper = processWrapper ( getTypeReference ( MovieBasic . class ) , url , webpage ) ; return wrapper . ...
public class CheckpointStatsTracker { /** * Creates a new pending checkpoint tracker . * @ param checkpointId ID of the checkpoint . * @ param triggerTimestamp Trigger timestamp of the checkpoint . * @ param props The checkpoint properties . * @ return Tracker for statistics gathering . */ PendingCheckpointStat...
ConcurrentHashMap < JobVertexID , TaskStateStats > taskStateStats = createEmptyTaskStateStatsMap ( ) ; PendingCheckpointStats pending = new PendingCheckpointStats ( checkpointId , triggerTimestamp , props , totalSubtaskCount , taskStateStats , new PendingCheckpointStatsCallback ( ) ) ; statsReadWriteLock . lock ( ) ; t...
public class ModuleWebhooks { /** * Create a new webhook . * This will create a new ID and return the newly created webhook as a return value . * This method will override the configuration specified through * { @ link CMAClient . Builder # setSpaceId ( String ) } and will ignore * { @ link CMAClient . Builder ...
assertNotNull ( spaceId , "spaceId" ) ; assertNotNull ( webhook , "webhook" ) ; final String webhookId = webhook . getId ( ) ; final CMASystem system = webhook . getSystem ( ) ; webhook . setSystem ( null ) ; try { if ( webhookId == null ) { return service . create ( spaceId , webhook ) . blockingFirst ( ) ; } else { r...
public class ImmutableValueMap { /** * Returns an immutable map containing a single entry . This map behaves and * performs comparably to { @ link Collections # singletonMap } but will not accept * a null key or value . It is preferable mainly for consistency and * maintainability of your code . * @ param k1 Ke...
return new ImmutableValueMap ( ImmutableMap . < String , Object > of ( k1 , v1 ) ) ;
public class CompositeEntityMapper { /** * Return the column name byte buffer for this entity * @ param obj * @ return */ private ByteBuffer toColumnName ( Object obj ) { } }
SimpleCompositeBuilder composite = new SimpleCompositeBuilder ( bufferSize , Equality . EQUAL ) ; // Iterate through each component and add to a CompositeType structure for ( FieldMapper < ? > mapper : components ) { try { composite . addWithoutControl ( mapper . toByteBuffer ( obj ) ) ; } catch ( Exception e ) { throw...
public class JsonRequestHandler { /** * Check whether the HTTP method with which the request was sent is allowed according to the policy * installed * @ param pRequest request to check */ private void checkHttpMethod ( R pRequest ) { } }
if ( ! restrictor . isHttpMethodAllowed ( pRequest . getHttpMethod ( ) ) ) { throw new SecurityException ( "HTTP method " + pRequest . getHttpMethod ( ) . getMethod ( ) + " is not allowed according to the installed security policy" ) ; }
public class CookieHelper { /** * Invalidate ( clear ) the cookie in the HttpServletResponse . * Setting age to 0 to invalidate it . * @ param res */ @ Sensitive public static void clearCookie ( HttpServletRequest req , HttpServletResponse res , String cookieName , Cookie [ ] cookies ) { } }
Cookie existing = getCookie ( cookies , cookieName ) ; if ( existing != null ) { Cookie c = new Cookie ( cookieName , "" ) ; String path = existing . getPath ( ) ; if ( path == null ) path = "/" ; c . setPath ( path ) ; c . setMaxAge ( 0 ) ; // c . setHttpOnly ( existing . isHttpOnly ( ) ) ; c . setSecure ( existing . ...
public class JournalWriter { /** * Subclasses should call this method to initialize a new Journal file , if * they already know the repository hash and the current date . */ protected void writeDocumentHeader ( XMLEventWriter writer , String repositoryHash , Date currentDate ) throws JournalException { } }
try { putStartDocument ( writer ) ; putStartTag ( writer , QNAME_TAG_JOURNAL ) ; putAttribute ( writer , QNAME_ATTR_REPOSITORY_HASH , repositoryHash ) ; putAttribute ( writer , QNAME_ATTR_TIMESTAMP , JournalHelper . formatDate ( currentDate ) ) ; } catch ( XMLStreamException e ) { throw new JournalException ( e ) ; }
public class JSONGetter { /** * 从JSON中直接获取Bean对象 < br > * 先获取JSONObject对象 , 然后转为Bean对象 * @ param < T > Bean类型 * @ param key KEY * @ param beanType Bean类型 * @ return Bean对象 , 如果值为null或者非JSONObject类型 , 返回null * @ since 3.1.1 */ public < T > T getBean ( K key , Class < T > beanType ) { } }
final JSONObject obj = getJSONObject ( key ) ; return ( null == obj ) ? null : obj . toBean ( beanType ) ;
public class UCharacterName { /** * Adds all algorithmic names into the name set . * Equivalent to part of calcAlgNameSetsLengths . * @ param maxlength length to compare to * @ return the maximum length of any possible algorithmic name if it is > * maxlength , otherwise maxlength is returned . */ private int ad...
int result = 0 ; for ( int i = m_algorithm_ . length - 1 ; i >= 0 ; i -- ) { result = m_algorithm_ [ i ] . add ( m_nameSet_ , maxlength ) ; if ( result > maxlength ) { maxlength = result ; } } return maxlength ;
public class ORecordSerializerStringAbstract { /** * Parses a string returning the value with the closer type . Numbers by default are INTEGER if haven ' t decimal separator , * otherwise FLOAT . To treat all the number types numbers are postponed with a character that tells the type : b = byte , s = short , * l = ...
if ( iValue == null ) return null ; if ( iValue . length ( ) == 0 ) return "" ; if ( iValue . length ( ) > 1 ) if ( iValue . charAt ( 0 ) == '"' && iValue . charAt ( iValue . length ( ) - 1 ) == '"' ) // STRING return OStringSerializerHelper . decode ( iValue . substring ( 1 , iValue . length ( ) - 1 ) ) ; else if ( iV...
public class GlobusPathMatchingResourcePatternResolver { /** * Converts an Ant - style pattern to a regex pattern by replacing ( . with \ \ . ) , ( ? with . ) , * ( * * with . * ) , and ( * with [ ^ / ] * ) . * @ param antStyleLocationPattern An Ant - Stlye location pattern . * @ return A regex style location pat...
String regexStyleLocationPattern = antStyleLocationPattern . replace ( "\\" , "/" ) ; regexStyleLocationPattern = regexStyleLocationPattern . replaceAll ( "\\." , "\\\\." ) ; // replace . with \ \ . regexStyleLocationPattern = regexStyleLocationPattern . replaceAll ( "//" , "/" ) ; // Solution for known test cases with...
public class CleverTapAPI { /** * Event */ private void queueEvent ( final Context context , final JSONObject event , final int eventType ) { } }
postAsyncSafely ( "queueEvent" , new Runnable ( ) { @ Override public void run ( ) { if ( isCurrentUserOptedOut ( ) ) { String eventString = event == null ? "null" : event . toString ( ) ; getConfigLogger ( ) . debug ( getAccountId ( ) , "Current user is opted out dropping event: " + eventString ) ; return ; } if ( sho...
public class GwtWorkarounds { /** * Views a { @ code ByteOutput } as an { @ code OutputStream } . */ @ GwtIncompatible ( "OutputStream" ) static OutputStream asOutputStream ( final ByteOutput output ) { } }
checkNotNull ( output ) ; return new OutputStream ( ) { @ Override public void write ( int b ) throws IOException { output . write ( ( byte ) b ) ; } @ Override public void flush ( ) throws IOException { output . flush ( ) ; } @ Override public void close ( ) throws IOException { output . close ( ) ; } } ;
public class SafeTraceLevelIndexFactory { /** * Add the filters and values to the index . * The values are inserted as Integers for easy comparison in TraceComponent * and to avoid having to recompute each time the spec is checked . */ private static void addFiltersAndValuesToIndex ( BufferedReader br , PackageInde...
String line ; while ( ( line = br . readLine ( ) ) != null ) { if ( line . isEmpty ( ) || line . startsWith ( "#" ) ) { continue ; } int pos = line . indexOf ( '=' ) ; if ( pos > 0 ) { String filter = line . substring ( 0 , pos ) . trim ( ) ; String value = line . substring ( pos + 1 ) . trim ( ) ; packageIndex . add (...
public class FileUtil { /** * Copies the fromFile to the toFile location . If toFile is a directory , a * new file is created in that directory , with the name of the fromFile . * If the toFile exists , the file will not be copied , unless owerWrite is * true . * @ param pFromFile The file to copy from * @ pa...
// Copy all directory structure if ( pFromFile . isDirectory ( ) ) { return copyDir ( pFromFile , pToFile , pOverWrite ) ; } // Check if destination is a directory if ( pToFile . isDirectory ( ) ) { // Create a new file with same name as from pToFile = new File ( pToFile , pFromFile . getName ( ) ) ; } // Check if file...
public class CommerceAddressPersistenceImpl { /** * Returns an ordered range of all the commerce addresses where groupId = & # 63 ; and classNameId = & # 63 ; and classPK = & # 63 ; and defaultBilling = & # 63 ; . * Useful when paginating results . Returns a maximum of < code > end - start < / code > instances . < co...
return findByG_C_C_DB ( groupId , classNameId , classPK , defaultBilling , start , end , orderByComparator , true ) ;
public class SmallSortedMap { /** * Creates a new instance for mapping FieldDescriptors to their values . * The { @ link # makeImmutable ( ) } implementation will convert the List values * of any repeated fields to unmodifiable lists . * @ param arraySize The size of the entry array containing the * lexicograph...
return new SmallSortedMap < FieldDescriptorType , Object > ( arraySize ) { @ Override @ SuppressWarnings ( "unchecked" ) public void makeImmutable ( ) { if ( ! isImmutable ( ) ) { for ( int i = 0 ; i < getNumArrayEntries ( ) ; i ++ ) { final Map . Entry < FieldDescriptorType , Object > entry = getArrayEntryAt ( i ) ; i...
public class ConfigEvaluator { /** * Find the " super " PID from the < code > ibm : extends < / code > attribute of the OCD for < code > pid < / code > . * @ param pid must never be null * @ return the super PID or < code > null < / code > if no < code > ibm : extends < / code > attribute could be found */ private ...
RegistryEntry re = getRegistryEntry ( pid ) ; return re == null ? null : re . getExtends ( ) ;
public class StringContext { /** * Tests if the given string ends with the given suffix . * Returns true if the given string ends with the given suffix . * @ param str the source string * @ param suffix the suffix to test for * @ return true if the given string ends with the given suffix */ public boolean endsW...
return ( str == null || suffix == null ) ? ( str == suffix ) : str . endsWith ( suffix ) ;
public class JobHistoryFileParserHadoop2 { /** * understand the schema so that we can parse the rest of the file * @ throws JSONException */ private void understandSchema ( String schema ) throws JSONException { } }
JSONObject j1 = new JSONObject ( schema ) ; JSONArray fields = j1 . getJSONArray ( FIELDS ) ; String fieldName ; String fieldTypeValue ; Object recName ; for ( int k = 0 ; k < fields . length ( ) ; k ++ ) { if ( fields . get ( k ) == null ) { continue ; } JSONObject allEvents = new JSONObject ( fields . get ( k ) . toS...
public class SignatureDef { /** * Use { @ link # getInputsMap ( ) } instead . */ @ java . lang . Deprecated public java . util . Map < java . lang . String , org . tensorflow . framework . TensorInfo > getInputs ( ) { } }
return getInputsMap ( ) ;
public class CmsUserIconHelper { /** * Sets the user image for the given user . < p > * @ param cms the cms context * @ param user the user * @ param rootPath the image root path * @ throws CmsException in case anything goes wrong */ public void setUserImage ( CmsObject cms , CmsUser user , String rootPath ) th...
CmsFile tempFile = cms . readFile ( cms . getRequestContext ( ) . removeSiteRoot ( rootPath ) ) ; CmsImageScaler scaler = new CmsImageScaler ( tempFile . getContents ( ) , tempFile . getRootPath ( ) ) ; if ( scaler . isValid ( ) ) { scaler . setType ( 2 ) ; scaler . setHeight ( 192 ) ; scaler . setWidth ( 192 ) ; byte ...
public class Cookie { /** * Need to call this by reflection for backwards compatibility with Servlet 2.5 */ private static void setHttpOnlyReflect ( org . javalite . activeweb . Cookie awCookie , javax . servlet . http . Cookie servletCookie ) { } }
try { servletCookie . getClass ( ) . getMethod ( "setHttpOnly" , boolean . class ) . invoke ( servletCookie , awCookie . isHttpOnly ( ) ) ; } catch ( Exception e ) { LOGGER . warn ( "You are trying to set HttpOnly on a cookie, but it appears you are running on Servlet version before 3.0." ) ; }
public class OBOOntology { /** * Add a single OntologyTerm to the ontology . * @ param term * The OntologyTerm . */ public void addTerm ( OntologyTerm term ) { } }
terms . put ( term . getId ( ) , term ) ; indexTerm ( term ) ; isTypeOfIsBuilt = false ;
public class CreateConnectorDefinitionVersionRequest { /** * A list of references to connectors in this version , with their corresponding configuration settings . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setConnectors ( java . util . Collection ) } or...
if ( this . connectors == null ) { setConnectors ( new java . util . ArrayList < Connector > ( connectors . length ) ) ; } for ( Connector ele : connectors ) { this . connectors . add ( ele ) ; } return this ;
public class SubscriptionAdminClient { /** * Creates a subscription to a given topic . See the & lt ; a * href = " https : / / cloud . google . com / pubsub / docs / admin # resource _ names " & gt ; resource name * rules & lt ; / a & gt ; . If the subscription already exists , returns ` ALREADY _ EXISTS ` . If the...
Subscription request = Subscription . newBuilder ( ) . setName ( name == null ? null : name . toString ( ) ) . setTopic ( topic == null ? null : topic . toString ( ) ) . setPushConfig ( pushConfig ) . setAckDeadlineSeconds ( ackDeadlineSeconds ) . build ( ) ; return createSubscription ( request ) ;
public class ByteUtil { /** * Converts string hex representation to data bytes * @ param data * String like ' 0xa5e . . ' or just ' a5e . . ' * @ return decoded bytes array */ public static byte [ ] hexStringToBytes ( String data ) { } }
if ( data == null ) return EMPTY_BYTE_ARRAY ; if ( data . startsWith ( "0x" ) ) data = data . substring ( 2 ) ; return Hex . decode ( data ) ;
public class CacheMapUtil { /** * retrieval all the values in the cache map * @ param key the key of the cached map * @ param vClazz the value ' s class * @ param < T > the value ' s generic type * @ return the whole list if exists or null if the key does not exist . return */ public static < T > Maybe < List <...
return values ( CacheService . CACHE_CONFIG_BEAN , key , vClazz ) ;
public class AbstractSpecExecutor { /** * The definition of attributes are the technology that a { @ link SpecExecutor } is using and * the physical location that it runs on . * These attributes are supposed to be static and read - only . */ @ Override public Config getAttrs ( ) { } }
Preconditions . checkArgument ( this . config . hasPath ( ServiceConfigKeys . ATTRS_PATH_IN_CONFIG ) , "Input configuration doesn't contains SpecExecutor Attributes path." ) ; return this . config . getConfig ( ServiceConfigKeys . ATTRS_PATH_IN_CONFIG ) ;
public class VerticalBarChart { /** * This is the main entry point after the graph has been inflated . Used to initialize the graph * and its corresponding members . */ @ Override protected void initializeGraph ( ) { } }
super . initializeGraph ( ) ; mData = new ArrayList < > ( ) ; mValuePaint = new Paint ( mLegendPaint ) ; if ( this . isInEditMode ( ) ) { addBar ( new BarModel ( 2.3f ) ) ; addBar ( new BarModel ( 2.f ) ) ; addBar ( new BarModel ( 3.3f ) ) ; addBar ( new BarModel ( 1.1f ) ) ; addBar ( new BarModel ( 2.7f ) ) ; addBar (...
public class ScriptPluginProviderLoader { /** * Get the ScriptPluginProvider definition from the file for the given provider def and ident */ private ScriptPluginProvider getPlugin ( final PluginMeta pluginMeta , final File file , final ProviderDef pluginDef , final ProviderIdent ident ) throws ProviderLoaderException ...
if ( null == fileExpandedDir ) { final File dir ; try { dir = expandScriptPlugin ( file ) ; } catch ( IOException e ) { throw new ProviderLoaderException ( e , ident . getService ( ) , ident . getProviderName ( ) ) ; } fileExpandedDir = dir ; if ( pluginDef . getPluginType ( ) . equals ( "script" ) ) { final File scrip...
public class NumberConverter { /** * Converts the string to a number , using the given format for parsing . * @ param pString the string to convert . * @ param pType the type to convert to . PropertyConverter * implementations may choose to ignore this parameter . * @ param pFormat the format used for parsing ....
if ( StringUtil . isEmpty ( pString ) ) { return null ; } try { if ( pType . equals ( BigInteger . class ) ) { return new BigInteger ( pString ) ; // No format ? } if ( pType . equals ( BigDecimal . class ) ) { return new BigDecimal ( pString ) ; // No format ? } NumberFormat format ; if ( pFormat == null ) { // Use sy...
public class DatabaseConnection { /** * Initializes a syntax rule for a given database connection . * < p > The rule is good for different highlighter and completer instances , * but not necessarily for other database connections ( because it * depends on the set of keywords and identifier quote string ) . */ pri...
// Deduce the string used to quote identifiers . For example , Oracle // uses double - quotes : // SELECT * FROM " My Schema " . " My Table " String identifierQuoteString = meta . getIdentifierQuoteString ( ) ; if ( identifierQuoteString . length ( ) > 1 ) { sqlLine . error ( "Identifier quote string is '" + identifier...
public class HttpServletResourceAdaptor { /** * ( non - Javadoc ) * @ see javax . slee . resource . ResourceAdaptor # raVerifyConfiguration ( javax . slee . resource . ConfigProperties ) */ public void raVerifyConfiguration ( ConfigProperties configProperties ) throws InvalidConfigurationException { } }
ConfigProperties . Property property = configProperties . getProperty ( NAME_CONFIG_PROPERTY ) ; if ( property == null ) { throw new InvalidConfigurationException ( "name property not found" ) ; } if ( ! property . getType ( ) . equals ( String . class . getName ( ) ) ) { throw new InvalidConfigurationException ( "name...
public class DBFWriter { /** * Sets fields definition * @ param fields fields definition */ public void setFields ( DBFField [ ] fields ) { } }
if ( this . closed ) { throw new IllegalStateException ( "You can not set fields to a closed DBFWriter" ) ; } if ( this . header . fieldArray != null ) { throw new DBFException ( "Fields has already been set" ) ; } if ( fields == null || fields . length == 0 ) { throw new DBFException ( "Should have at least one field"...
public class MethodCompiler { /** * Labels a current position * @ param name * @ throws IOException */ @ Override public void fixAddress ( String name ) throws IOException { } }
super . fixAddress ( name ) ; if ( debugMethod != null ) { int position = position ( ) ; tload ( "this" ) ; ldc ( position ) ; ldc ( name ) ; invokevirtual ( debugMethod ) ; }
public class Context { /** * Computes the context after an attribute delimiter is seen . * @ param elType The type of element whose tag the attribute appears in . * @ param attrType The type of attribute whose value the delimiter starts . * @ param delim The type of delimiter that will mark the end of the attribu...
HtmlContext state ; JsFollowingSlash slash = JsFollowingSlash . NONE ; UriPart uriPart = UriPart . NONE ; switch ( attrType ) { case PLAIN_TEXT : state = HtmlContext . HTML_NORMAL_ATTR_VALUE ; break ; case SCRIPT : state = HtmlContext . JS ; // Start a JS block in a regex state since // / foo / . test ( str ) & & doSid...
public class AbstractMapper { /** * By default , if only a single { @ link Binder } is present , returns { @ link Binder # hasStableIds ( ) } , otherwise returns * { @ code false } */ @ Override public boolean hasStableIds ( ) { } }
Collection < ? extends Binder < ? , ? > > allBinders = getAllBinders ( ) ; if ( allBinders . size ( ) == 1 ) { // Save an allocation by checking for List first . if ( allBinders instanceof List ) { // noinspection unchecked return ( ( List < Binder < ? , ? > > ) allBinders ) . get ( 0 ) . hasStableIds ( ) ; } return al...
public class Snapshot { /** * A list of the AWS customer accounts authorized to restore the snapshot . Returns < code > null < / code > if no accounts * are authorized . Visible only to the snapshot owner . * @ param accountsWithRestoreAccess * A list of the AWS customer accounts authorized to restore the snapsho...
if ( accountsWithRestoreAccess == null ) { this . accountsWithRestoreAccess = null ; return ; } this . accountsWithRestoreAccess = new com . amazonaws . internal . SdkInternalList < AccountWithRestoreAccess > ( accountsWithRestoreAccess ) ;
public class ImageMiscOps { /** * Copies a rectangular region from one image into another . < br > * output [ dstX : ( dstX + width ) , dstY : ( dstY + height - 1 ) ] = input [ srcX : ( srcX + width ) , srcY : ( srcY + height - 1 ) ] * @ param srcX x - coordinate of corner in input image * @ param srcY y - coordi...
if ( input . width < srcX + width || input . height < srcY + height ) throw new IllegalArgumentException ( "Copy region must be contained input image" ) ; if ( output . width < dstX + width || output . height < dstY + height ) throw new IllegalArgumentException ( "Copy region must be contained output image" ) ; for ( i...
public class CacheSweeper { /** * / * ( non - Javadoc ) * @ see java . lang . Thread # run ( ) */ @ Override public void run ( ) { } }
try { while ( true ) { final long start = System . currentTimeMillis ( ) ; synchronized ( lock ) { long remaining = sweepInterval * 1000L ; while ( remaining > 0 ) { lock . wait ( remaining ) ; remaining = start + sweepInterval * 1000 - System . currentTimeMillis ( ) ; } } cache . removeExpired ( ) ; } } catch ( final ...
public class ImportTraverser { /** * Add a sub - traversal for a neighboring node . */ private void addSubtraversal ( T node , LinkedList < T > imports , Set < T > alreadyIncludedImports , NodePath < T > nodePath ) throws ExecutionException { } }
if ( addNodeIfNotAlreadyIncluded ( node , imports , alreadyIncludedImports ) ) { for ( T inheritedFromParent : doTraverseGraphRecursively ( node , nodePath ) ) { addNodeIfNotAlreadyIncluded ( inheritedFromParent , imports , alreadyIncludedImports ) ; } }
public class Calc { /** * Returns the unit vector of vector a . * @ param a * an Atom object * @ return an Atom object */ public static final Atom unitVector ( Atom a ) { } }
double amount = amount ( a ) ; double [ ] coords = new double [ 3 ] ; coords [ 0 ] = a . getX ( ) / amount ; coords [ 1 ] = a . getY ( ) / amount ; coords [ 2 ] = a . getZ ( ) / amount ; a . setCoords ( coords ) ; return a ;
public class ServerSICoreConnectionListener { /** * This private method will actually send the notification to the client * using the specified event Id . * @ param eventId The event ID * @ param conn The core connection that is dieing * @ param sess The Consumer Session that generated the exception * @ param...
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "sendMeNotificationEvent" , new Object [ ] { "" + eventId , conn , sess , t } ) ; Conversation conversation = null ; int consumerId = - 1 ; // Get the conversation . If we have an SICoreConnection handed to us , we can dive ...
public class InstanceValidator { /** * public API */ private void checkCoding ( List < ValidationMessage > errors , String path , WrapperElement focus , Coding fixed ) { } }
checkFixedValue ( errors , path + ".system" , focus . getNamedChild ( "system" ) , fixed . getSystemElement ( ) , "system" ) ; checkFixedValue ( errors , path + ".code" , focus . getNamedChild ( "code" ) , fixed . getCodeElement ( ) , "code" ) ; checkFixedValue ( errors , path + ".display" , focus . getNamedChild ( "di...
public class CodecInfo { /** * Gets the codec info from terms . * @ param t * the t * @ return the codec info from terms * @ throws IOException * Signals that an I / O exception has occurred . */ @ SuppressWarnings ( "unchecked" ) public static CodecInfo getCodecInfoFromTerms ( Terms t ) throws IOException { ...
try { HashMap < String , IndexInput > indexInputList = null ; HashMap < String , Long > indexInputOffsetList = null ; Object version = null ; Method [ ] methods = t . getClass ( ) . getMethods ( ) ; Object [ ] emptyArgs = null ; for ( Method m : methods ) { if ( m . getName ( ) . equals ( "getIndexInputList" ) ) { inde...
public class CCTotalizer { /** * Builds an at - least - k constraint . * @ param result the result * @ param vars the variables * @ param rhs the right - hand side * @ throws IllegalArgumentException if the right hand side of the constraint was negative */ void buildALK ( final EncodingResult result , final Var...
final LNGVector < Variable > cardinalityOutvars = this . initializeConstraint ( result , vars ) ; this . incData = new CCIncrementalData ( result , CCConfig . ALK_ENCODER . TOTALIZER , rhs , vars . length , cardinalityOutvars ) ; this . toCNF ( cardinalityOutvars , rhs , Bound . LOWER ) ; assert this . cardinalityInvar...
public class DefaultExpander { /** * Expand constructions like rules and queries * @ param drl * @ return */ private StringBuffer expandConstructions ( final String drl ) { } }
// display keys if requested if ( showKeyword ) { for ( DSLMappingEntry entry : this . keywords ) { logger . info ( "keyword: " + entry . getMappingKey ( ) ) ; logger . info ( " " + entry . getKeyPattern ( ) ) ; } } if ( showWhen ) { for ( DSLMappingEntry entry : this . condition ) { logger . info ( "when: " + ...
public class GrailsLocaleUtils { /** * Add the locale suffix if the message resource bundle file exists . * @ param messageBundlePath * the message resource bundle path * @ param availableLocaleSuffixes * the list of available locale suffix to update * @ param locale * the locale to check . * @ param file...
String localMsgResourcePath = toBundleName ( messageBundlePath , locale ) + fileSuffix ; boolean isFileSystemResourcePath = rsReader . isFileSystemPath ( localMsgResourcePath ) ; boolean resourceFound = false ; String path = localMsgResourcePath ; if ( ! isFileSystemResourcePath ) { // Try to retrieve the resource from...
public class ScriptResourceUtil { /** * Execute a process directly with some arguments * @ param logger logger * @ param workingdir working dir * @ param scriptfile file * @ param scriptargs arguments to the shell * @ param scriptargsarr * @ param envContext Environment variable context * @ param newDataC...
ExecParams execArgs = buildExecParams ( scriptfile , scriptargs , scriptargsarr , envContext , newDataContext ) ; String [ ] args = execArgs . getArgs ( ) ; String [ ] envarr = execArgs . getEnvarr ( ) ; final Runtime runtime = Runtime . getRuntime ( ) ; logger . info ( "[" + logName + "] executing: " + StringArrayUtil...
public class IdleConnectionPool { /** * Attempts to remove a connection from the pool . If a connection is available * for the specified endpoint descriptor , it is removed from the pool and returned . * If no suitable connection is present , a value of null is returened . * @ param descriptor An endpoint descrip...
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "remove" , descriptor ) ; final LinkedList connectionList = descriptorToConnectionListMap . get ( descriptor ) ; OutboundConnection connection = null ; if ( ( connectionList != null ) && ( connectionList . size ( ) > ...
public class SerializedCheckpointData { /** * De - serializes an array of SerializedCheckpointData back into an ArrayDeque of element checkpoints . * @ param data The data to be deserialized . * @ param serializer The serializer used to deserialize the data . * @ param < T > The type of the elements . * @ retur...
ArrayDeque < Tuple2 < Long , Set < T > > > deque = new ArrayDeque < > ( data . length ) ; DataInputDeserializer deser = null ; for ( SerializedCheckpointData checkpoint : data ) { byte [ ] serializedData = checkpoint . getSerializedData ( ) ; if ( deser == null ) { deser = new DataInputDeserializer ( serializedData , 0...
public class XMLEncoder { /** * Writes the specified character . If the character is non - printable in * this encoding , then it will be escaped . * It is safe for this method to assume that the specified character does not need to be escaped * unless the encoding does not support the character . * @ param out...
if ( c >= 63 && c <= 127 || c >= 39 && c <= 59 || c >= 32 && c <= 37 || c == 38 || c > 127 && ! _sevenBitEncoding || c == 10 || c == 13 || c == 61 || c == 9 ) { out . write ( c ) ; } else { if ( c == 60 ) { out . write ( ESC_LESS_THAN , 0 , 4 ) ; } else if ( c == 62 ) { out . write ( ESC_GREATER_THAN , 0 , 4 ) ; } else...
public class CUGSubscriptionImpl { /** * ( non - Javadoc ) * @ see org . restcomm . protocols . ss7 . map . primitives . MAPAsnPrimitive # encodeData ( org . mobicents . protocols . asn . AsnOutputStream ) */ public void encodeData ( AsnOutputStream asnOs ) throws MAPException { } }
if ( this . cugInterlock == null ) throw new MAPException ( "Error while encoding " + _PrimitiveName + ": cugInterlock required." ) ; if ( this . intraCugOptions == null ) throw new MAPException ( "Error while encoding " + _PrimitiveName + ": intraCugOptions required." ) ; try { asnOs . writeInteger ( this . cugIndex )...
public class Timex3 { /** * getter for timexMod - gets * @ generated * @ return value of the feature */ public String getTimexMod ( ) { } }
if ( Timex3_Type . featOkTst && ( ( Timex3_Type ) jcasType ) . casFeat_timexMod == null ) jcasType . jcas . throwFeatMissing ( "timexMod" , "de.unihd.dbs.uima.types.heideltime.Timex3" ) ; return jcasType . ll_cas . ll_getStringValue ( addr , ( ( Timex3_Type ) jcasType ) . casFeatCode_timexMod ) ;
public class BlogConnectionFactory { /** * Create a connection to a blog server . * @ param type Connection type , must be " atom " or " metaweblog " * @ param url End - point URL to connect to * @ param username Username for login to blog server * @ param password Password for login to blog server */ public st...
BlogConnection blogConnection = null ; if ( type == null || type . equals ( "metaweblog" ) ) { blogConnection = createBlogConnection ( METAWEBLOG_IMPL_CLASS , url , username , password ) ; } else if ( type . equals ( "atom" ) ) { blogConnection = createBlogConnection ( ATOMPROTOCOL_IMPL_CLASS , url , username , passwor...
public class OAuthProviderProcessingFilter { /** * The allowed set of HTTP methods . * @ param allowedMethods The allowed set of methods . */ public void setAllowedMethods ( List < String > allowedMethods ) { } }
this . allowedMethods . clear ( ) ; if ( allowedMethods != null ) { for ( String allowedMethod : allowedMethods ) { this . allowedMethods . add ( allowedMethod . toUpperCase ( ) ) ; } }
public class Las { /** * Checks of nativ libs are available . * @ return < code > true < / code > , if native liblas connection is available . */ public static boolean supportsNative ( ) { } }
if ( ! testedLibLoading ) { LiblasJNALibrary wrapper = LiblasWrapper . getWrapper ( ) ; if ( wrapper != null ) { isNativeLibAvailable = true ; } testedLibLoading = true ; } return isNativeLibAvailable ;
public class GetExecutionHistoryRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( GetExecutionHistoryRequest getExecutionHistoryRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( getExecutionHistoryRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( getExecutionHistoryRequest . getExecutionArn ( ) , EXECUTIONARN_BINDING ) ; protocolMarshaller . marshall ( getExecutionHistoryRequest . getMaxResults ( ) , M...
public class MonteCarloIntegrator { /** * / * ( non - Javadoc ) * @ see net . finmath . integration . AbstractRealIntegral # integrate ( java . util . function . DoubleUnaryOperator ) */ @ Override public double integrate ( DoubleUnaryOperator integrand ) { } }
double lowerBound = getLowerBound ( ) ; double upperBound = getUpperBound ( ) ; double range = upperBound - lowerBound ; // Create random number sequence generator ( we use MersenneTwister ) MersenneTwister mersenneTwister = new MersenneTwister ( seed ) ; double integral = 0.0 ; for ( int i = 0 ; i < numberOfEvaluation...
public class OrientResourceAuthorizationStrategy { /** * Check that current user has access to all mentioned resources * @ param resources { @ link RequiredOrientResource } s to check * @ param action { @ link Action } to check for * @ return true if access is allowed */ public boolean checkResources ( RequiredOr...
for ( int i = 0 ; i < resources . length ; i ++ ) { RequiredOrientResource requiredOrientResource = resources [ i ] ; if ( ! checkResource ( requiredOrientResource , action ) ) return false ; } return true ;
public class NetUtil { /** * 创建 { @ link InetSocketAddress } * @ param host 域名或IP地址 , 空表示任意地址 * @ param port 端口 , 0表示系统分配临时端口 * @ return { @ link InetSocketAddress } * @ since 3.3.0 */ public static InetSocketAddress createAddress ( String host , int port ) { } }
if ( StrUtil . isBlank ( host ) ) { return new InetSocketAddress ( port ) ; } return new InetSocketAddress ( host , port ) ;
public class URIUtils { /** * Encode a URI path . * @ param path The path the encode * @ param buf StringBuilder to encode path into ( or null ) * @ return The StringBuilder or null if no substitutions required . */ private static StringBuilder encodePath ( StringBuilder buf , String path , int offset ) { } }
byte [ ] bytes = null ; if ( buf == null ) { loop : for ( int i = offset ; i < path . length ( ) ; i ++ ) { char c = path . charAt ( i ) ; switch ( c ) { case '%' : case '?' : case ';' : case '#' : case '"' : case '\'' : case '<' : case '>' : case ' ' : case '[' : case '\\' : case ']' : case '^' : case '`' : case '{' :...
public class AbstractSamlObjectBuilder { /** * New attribute value . * @ param value the value * @ param valueType the value type * @ param elementName the element name * @ return the xS string */ protected XMLObject newAttributeValue ( final Object value , final String valueType , final QName elementName ) { }...
if ( XSString . class . getSimpleName ( ) . equalsIgnoreCase ( valueType ) ) { val builder = new XSStringBuilder ( ) ; val attrValueObj = builder . buildObject ( elementName , XSString . TYPE_NAME ) ; attrValueObj . setValue ( value . toString ( ) ) ; return attrValueObj ; } if ( XSURI . class . getSimpleName ( ) . equ...
public class ServerImpl { /** * Remove transport service from accounting collection and notify of complete shutdown if * necessary . * @ param transport service to remove */ private void transportClosed ( ServerTransport transport ) { } }
synchronized ( lock ) { if ( ! transports . remove ( transport ) ) { throw new AssertionError ( "Transport already removed" ) ; } channelz . removeServerSocket ( ServerImpl . this , transport ) ; checkForTermination ( ) ; }
public class ObjIterator { /** * Returns an infinite { @ code ObjIterator } . * @ param supplier * @ return */ public static < T > ObjIterator < T > generate ( final Supplier < T > supplier ) { } }
N . checkArgNotNull ( supplier ) ; return new ObjIterator < T > ( ) { @ Override public boolean hasNext ( ) { return true ; } @ Override public T next ( ) { return supplier . get ( ) ; } } ;
public class StreamUtils { /** * Check if the content of a ByteBuffer is binary * @ param head ByteBuffer to check * @ return true if the content is binary ( Non - white Control Characters ) */ public static boolean isNonWhitespaceControlCharacter ( @ NonNull ByteBuffer head ) { } }
boolean hasControlCharacter = false ; while ( head . hasRemaining ( ) ) { hasControlCharacter |= isNonWhitespaceControlCharacter ( head . get ( ) ) ; } return hasControlCharacter ;
public class ClassUseWriter { /** * Generate the class use list . */ protected void generateClassUseFile ( ) throws IOException { } }
HtmlTree body = getClassUseHeader ( ) ; HtmlTree div = new HtmlTree ( HtmlTag . DIV ) ; div . addStyle ( HtmlStyle . classUseContainer ) ; if ( pkgSet . size ( ) > 0 ) { addClassUse ( div ) ; } else { div . addContent ( getResource ( "doclet.ClassUse_No.usage.of.0" , classdoc . qualifiedName ( ) ) ) ; } if ( configurat...
public class SqlSessionTxAdvice { /** * Flushes batch statements and commits database connection . * @ param force forces connection commit */ public void commit ( boolean force ) { } }
if ( checkSession ( ) ) { return ; } if ( log . isDebugEnabled ( ) ) { ToStringBuilder tsb = new ToStringBuilder ( String . format ( "Committing transactional %s@%x" , sqlSession . getClass ( ) . getSimpleName ( ) , sqlSession . hashCode ( ) ) ) ; tsb . append ( "force" , force ) ; log . debug ( tsb . toString ( ) ) ; ...
public class CharsetDetector { /** * Get the names of all charsets supported by < code > CharsetDetector < / code > class . * < b > Note : < / b > Multiple different charset encodings in a same family may use * a single shared name in this implementation . For example , this method returns * an array including " ...
String [ ] allCharsetNames = new String [ ALL_CS_RECOGNIZERS . size ( ) ] ; for ( int i = 0 ; i < allCharsetNames . length ; i ++ ) { allCharsetNames [ i ] = ALL_CS_RECOGNIZERS . get ( i ) . recognizer . getName ( ) ; } return allCharsetNames ;
public class CredentialStoreEntryUrl { /** * Get Resource Url for StoreCredentials * @ return String Resource Url */ public static MozuUrl storeCredentialsUrl ( ) { } }
UrlFormatter formatter = new UrlFormatter ( "/api/platform/extensions/credentialStore/" ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ;
public class ChainedProperty { /** * Appends the chained property formatted as " name . subname . subsubname " . * This format is parseable only if the chain is composed of valid * many - to - one joins . */ public void appendTo ( Appendable app ) throws IOException { } }
appendPropTo ( app , mPrime . getName ( ) , isOuterJoin ( 0 ) ) ; StorableProperty < ? > [ ] chain = mChain ; if ( chain != null ) { for ( int i = 0 ; i < chain . length ; i ++ ) { app . append ( '.' ) ; appendPropTo ( app , chain [ i ] . getName ( ) , isOuterJoin ( i + 1 ) ) ; } }
public class FilterJoinVisitor { /** * Checks for an action failure */ private void checkForFailure ( FilterJoinNode node ) { } }
if ( node . hasFailure ( ) ) { logger . error ( "Node processing failed: {}" , node . getFailure ( ) ) ; throw new ElasticsearchException ( "Unexpected failure while processing a node" , node . getFailure ( ) ) ; }
public class TcpConnector { /** * Opens a connection to the end point specified in the event . * @ param event the event */ @ Handler public void onOpenConnection ( OpenTcpConnection event ) { } }
try { SocketChannel socketChannel = SocketChannel . open ( event . address ( ) ) ; channels . add ( new TcpChannelImpl ( socketChannel ) ) ; } catch ( ConnectException e ) { fire ( new ConnectError ( event , "Connection refused." , e ) ) ; } catch ( IOException e ) { fire ( new ConnectError ( event , "Failed to open TC...
public class UnboundTypeReference { /** * Returns true if the existing hints would allow to resolve to the given reference . */ public boolean canResolveTo ( LightweightTypeReference reference ) { } }
if ( internalIsResolved ( ) ) return reference . isAssignableFrom ( resolvedTo , new TypeConformanceComputationArgument ( false , true , true , true , false , false /* TODO do we need to support synonmys here ? */ ) ) ; List < LightweightBoundTypeArgument > hints = getAllHints ( ) ; if ( ! hints . isEmpty ( ) && hasSig...
public class UpdateEndpointGroupRequest { /** * The list of endpoint objects . * @ param endpointConfigurations * The list of endpoint objects . */ public void setEndpointConfigurations ( java . util . Collection < EndpointConfiguration > endpointConfigurations ) { } }
if ( endpointConfigurations == null ) { this . endpointConfigurations = null ; return ; } this . endpointConfigurations = new java . util . ArrayList < EndpointConfiguration > ( endpointConfigurations ) ;
public class BitmapUtil { /** * Clips the long edge of a bitmap , if its width and height are not equal , in order to transform * it into a square . Additionally , the bitmap is resized to a specific size and a border will be * added . * @ param bitmap * The bitmap , which should be clipped , as an instance of ...
Condition . INSTANCE . ensureAtLeast ( borderWidth , 0 , "The border width must be at least 0" ) ; Bitmap clippedBitmap = clipSquare ( bitmap , size ) ; Bitmap result = Bitmap . createBitmap ( clippedBitmap . getWidth ( ) , clippedBitmap . getHeight ( ) , Bitmap . Config . ARGB_8888 ) ; Canvas canvas = new Canvas ( res...
public class Actor { /** * Ask TaskActor for result * @ param ref ActorRef of task * @ param callback callback for ask * @ return Future */ public AskFuture ask ( ActorRef ref , AskCallback callback ) { } }
return askPattern . ask ( ref , 0 , callback ) ;
public class SystemProperties { /** * Gets the system property indicated by the specified key . * This behaves just like { @ link System # getProperty ( java . lang . String ) } , except that it * also consults the { @ link ServletContext } ' s " init " parameters . * @ param key the name of the system property ....
String value = System . getProperty ( key ) ; // keep passing on any exceptions if ( value != null ) { if ( LOGGER . isLoggable ( Level . CONFIG ) ) { LOGGER . log ( Level . CONFIG , "Property (system): {0} => {1}" , new Object [ ] { key , value } ) ; } return value ; } value = handler . getString ( key ) ; if ( value ...
public class BandedAffineAligner { /** * Classical Banded Alignment with affine gap scoring . * Both sequences must be highly similar . * Align 2 sequence completely ( i . e . while first sequence will be aligned against whole second sequence ) . * @ param scoring scoring system * @ param seq1 first sequence ...
if ( length1 == 0 && length2 == 0 ) return 0 ; int size1 = length1 + 1 , size2 = length2 + 1 ; cache . prepareMatrices ( size1 , size2 , width , scoring ) ; BandedMatrix main = cache . main ; BandedMatrix gapIn1 = cache . gapIn1 ; BandedMatrix gapIn2 = cache . gapIn2 ; int i , j ; int match , gap1 , gap2 , to ; final i...
public class PTXImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public EList < Triplet > getCS ( ) { } }
if ( cs == null ) { cs = new EObjectContainmentEList . Resolving < Triplet > ( Triplet . class , this , AfplibPackage . PTX__CS ) ; } return cs ;
public class Kernel { /** * Spawn an agent of the given type , and pass the parameters to its initialization function . * @ param agentID the identifier of the agent to spawn . If < code > null < / code > the identifier is randomly selected . * @ param agent the type of the agent to spawn . * @ param params the l...
final List < UUID > ids = this . spawnService . spawn ( 1 , null , this . janusContext , agentID , agent , params ) ; if ( ids . isEmpty ( ) ) { return null ; } return ids . get ( 0 ) ;
public class XMLOutputter { /** * Writes end tags for elements on the stack until ( and including ) an * element that matches the specified name . * @ param type the type of the tag to end , not < code > null < / code > . * @ throws IllegalStateException if < code > getState ( ) ! = { @ link # START _ TAG _ OPEN ...
// Check state if ( _state != XMLEventListenerStates . WITHIN_ELEMENT && _state != XMLEventListenerStates . START_TAG_OPEN ) { throw new IllegalStateException ( "getState() == " + _state ) ; } // Temporarily set the state to ERROR _ STATE . Unless an exception is // thrown in the write methods , it will be reset to a v...
public class Codecs { /** * Create a codec , which creates a a mapping from the elements given in the * { @ code source } sequence to the elements given in the { @ code target } * sequence . The returned mapping can be seen as a function which maps every * element of the { @ code target } set to an element of the...
requireNonNull ( mapSupplier ) ; return ofPermutation ( target . size ( ) ) . map ( perm -> toMapping ( perm , source , target , mapSupplier ) ) ;
public class Converter { /** * Get the first converter for this field ( must be linked to at least one ScreenComponent for this to work ) . * @ return The converter object ( or this if there is none ) . */ public Converter getFieldConverter ( ) { } }
for ( int i = 0 ; ; i ++ ) { Object ojbComponent = this . getField ( ) . getComponent ( i ) ; if ( ojbComponent == null ) break ; if ( ojbComponent instanceof ScreenComponent ) { Converter conv = ( Converter ) ( ( ScreenComponent ) ojbComponent ) . getConverter ( ) ; if ( ( conv != null ) && ( conv . getField ( ) == th...
public class MapBasedXPathFunctionResolver { /** * Add all functions from the other function resolver into this resolver . * @ param aOther * The function resolver to import the functions from . May not be * < code > null < / code > . * @ param bOverwrite * if < code > true < / code > existing functions will ...
ValueEnforcer . notNull ( aOther , "Other" ) ; EChange eChange = EChange . UNCHANGED ; for ( final Map . Entry < XPathFunctionKey , XPathFunction > aEntry : aOther . m_aMap . entrySet ( ) ) if ( bOverwrite || ! m_aMap . containsKey ( aEntry . getKey ( ) ) ) { m_aMap . put ( aEntry . getKey ( ) , aEntry . getValue ( ) )...
public class CmsMultiCheckBox { /** * Initializes the widget given a map of select options . < p > * The keys of the map are the values of the select options , while the values of the map * are the labels which should be used for the checkboxes . * @ param items the map of select options */ protected void init ( ...
initWidget ( m_panel ) ; m_items = new LinkedHashMap < String , String > ( items ) ; m_panel . setStyleName ( I_CmsInputLayoutBundle . INSTANCE . inputCss ( ) . multiCheckBox ( ) ) ; m_panel . addStyleName ( I_CmsLayoutBundle . INSTANCE . generalCss ( ) . textMedium ( ) ) ; FocusHandler focusHandler = new FocusHandler ...