signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class AppLoginModule { /** * Logs out the user * The implementation removes the User associated with the Subject . * @ return true in all cases * @ throws LoginException if logout fails */ @ Override public boolean logout ( ) throws LoginException { } }
if ( mSubject . isReadOnly ( ) ) { throw new LoginException ( "logout Failed: Subject is Readonly." ) ; } if ( mUser != null ) { mSubject . getPrincipals ( ) . remove ( mUser ) ; } return true ;
public class HibernateProjectDao { /** * { @ inheritDoc } */ public Project getByName ( String name ) { } }
final Criteria crit = sessionService . getSession ( ) . createCriteria ( Project . class ) ; crit . add ( Property . forName ( "name" ) . eq ( name ) ) ; Project project = ( Project ) crit . uniqueResult ( ) ; HibernateLazyInitializer . init ( project ) ; return project ;
public class ConnectorServlet { /** * create a connector controller * @ param config * @ return */ protected ConnectorController createConnectorController ( ServletConfig config ) { } }
ConnectorController connectorController = new ConnectorController ( ) ; connectorController . setCommandExecutorFactory ( createCommandExecutorFactory ( config ) ) ; connectorController . setFsServiceFactory ( createServiceFactory ( config ) ) ; return connectorController ;
public class TrivialNoOutlier { /** * Run the actual algorithm . * @ param relation Relation * @ return Result */ public OutlierResult run ( Relation < ? > relation ) { } }
WritableDoubleDataStore scores = DataStoreUtil . makeDoubleStorage ( relation . getDBIDs ( ) , DataStoreFactory . HINT_HOT ) ; for ( DBIDIter iditer = relation . iterDBIDs ( ) ; iditer . valid ( ) ; iditer . advance ( ) ) { scores . putDouble ( iditer , 0.0 ) ; } DoubleRelation scoreres = new MaterializedDoubleRelation...
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link TimeActivity } { @ code > } } */ @ XmlElementDecl ( namespace = "http://schema.intuit.com/finance/v3" , name = "TimeActivity" , substitutionHeadNamespace = "http://schema.intuit.com/finance/v3" , substitutionHeadName =...
return new JAXBElement < TimeActivity > ( _TimeActivity_QNAME , TimeActivity . class , null , value ) ;
public class PVolumeBDGenerator { /** * @ param < S > A phantom type parameter indicating the coordinate space of the * volume * @ return A generator initialized with useful defaults */ public static < S > PVolumeBDGenerator < S > create ( ) { } }
return new PVolumeBDGenerator < > ( new Generator < BigDecimal > ( ) { private final Random random = new Random ( ) ; @ Override public BigDecimal next ( ) { return BigDecimal . valueOf ( Math . abs ( this . random . nextLong ( ) ) ) ; } } ) ;
public class CmsExportpointsEdit { /** * Initializes the module to work with depending on the dialog state and request parameters . < p > */ protected void initModule ( ) { } }
Object o ; CmsModule module ; if ( CmsStringUtil . isEmpty ( getParamAction ( ) ) || CmsDialog . DIALOG_INITIAL . equals ( getParamAction ( ) ) ) { // this is the initial dialog call if ( CmsStringUtil . isNotEmpty ( m_paramModule ) ) { // edit an existing module , get it from manager o = OpenCms . getModuleManager ( )...
public class Crc32Caucho { /** * Calculates CRC from a char buffer */ public static int generate ( int crc , char [ ] buffer , int offset , int len ) { } }
for ( int i = 0 ; i < len ; i ++ ) { char ch = buffer [ offset + i ] ; if ( ch > 0xff ) { crc = next ( crc , ( ch >> 8 ) ) ; } crc = next ( crc , ch ) ; } return crc ;
public class DatabaseImpl { /** * Read attachment stream to a temporary location and calculate sha1, * prior to being added to the DocumentStore . * Used by replicator when receiving new / updated attachments * @ param att Attachment to be prepared , providing data either from a file or a stream * @ param lengt...
PreparedAttachment pa = AttachmentManager . prepareAttachment ( attachmentsDir , attachmentStreamFactory , att , length , encodedLength ) ; return pa ;
public class SslContextFactory { /** * Check KeyStore Configuration . Ensures that if keystore has been * configured but there ' s no truststore , that keystore is * used as truststore . * @ throws IllegalStateException if SslContextFactory configuration can ' t be used . */ public void checkKeyStore ( ) { } }
if ( sslContext != null ) return ; // nothing to check if using preconfigured context if ( keyStoreInputStream == null && sslConfig . getKeyStorePath ( ) == null ) { throw new IllegalStateException ( "SSL doesn't have a valid keystore" ) ; } // if the keystore has been configured but there is no // truststore configure...
public class CanonicalIterator { /** * Get the next canonically equivalent string . * < br > < b > Warning : The strings are not guaranteed to be in any particular order . < / b > * @ return the next string that is canonically equivalent . The value null is returned when * the iteration is done . */ public String...
if ( done ) return null ; // construct return value buffer . setLength ( 0 ) ; // delete old contents for ( int i = 0 ; i < pieces . length ; ++ i ) { buffer . append ( pieces [ i ] [ current [ i ] ] ) ; } String result = buffer . toString ( ) ; // find next value for next time for ( int i = current . length - 1 ; ; --...
public class AuditLog { /** * < pre > * The operation response . This may not include all response elements , * such as those that are too large , privacy - sensitive , or duplicated * elsewhere in the log record . * It should never include user - generated data , such as file contents . * When the JSON objec...
return response_ == null ? com . google . protobuf . Struct . getDefaultInstance ( ) : response_ ;
public class AuditServiceImpl { /** * ( non - Javadoc ) * @ see com . ibm . wsspi . security . audit . AuditService # registerEvents ( ) */ @ Override public void registerEvents ( String handlerName , List < Map < String , Object > > configuredEvents ) throws InvalidConfigurationException { } }
if ( tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "size of configuredEvents: " + configuredEvents . size ( ) ) ; } if ( validateEventsAndOutcomes ( handlerName , configuredEvents ) ) { if ( ! handlerEventsMap . containsKey ( handlerName ) ) { handlerEventsMap . put ( handlerName , configuredEvents ) ; } if ( tc . isDe...
public class PasswordPolicyService { /** * Verifies that the given user can change their password without violating * password aging policy . If changing the user ' s password would violate the * aging policy , a GuacamoleException will be thrown . * @ param user * The user whose password is changing . * @ th...
// Retrieve password policy from environment PasswordPolicy policy = environment . getPasswordPolicy ( ) ; long minimumAge = policy . getMinimumAge ( ) ; long passwordAge = getPasswordAge ( user ) ; // Require that sufficient time has elapsed before allowing the password // to be changed if ( passwordAge < minimumAge )...
public class CPFriendlyURLEntryLocalServiceUtil { /** * Returns all the cp friendly url entries matching the UUID and company . * @ param uuid the UUID of the cp friendly url entries * @ param companyId the primary key of the company * @ return the matching cp friendly url entries , or an empty list if no matches...
return getService ( ) . getCPFriendlyURLEntriesByUuidAndCompanyId ( uuid , companyId ) ;
public class FiducialDetection { /** * Displays a continuous stream of images */ private void processStream ( CameraPinholeBrown intrinsic , SimpleImageSequence < GrayU8 > sequence , ImagePanel gui , long pauseMilli ) { } }
Font font = new Font ( "Serif" , Font . BOLD , 24 ) ; Se3_F64 fiducialToCamera = new Se3_F64 ( ) ; int frameNumber = 0 ; while ( sequence . hasNext ( ) ) { long before = System . currentTimeMillis ( ) ; GrayU8 input = sequence . next ( ) ; BufferedImage buffered = sequence . getGuiImage ( ) ; try { detector . detect ( ...
public class ObjectContainerPresentationSpaceSizeImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public boolean eIsSet ( int featureID ) { } }
switch ( featureID ) { case AfplibPackage . OBJECT_CONTAINER_PRESENTATION_SPACE_SIZE__PDF_SIZE : return PDF_SIZE_EDEFAULT == null ? pdfSize != null : ! PDF_SIZE_EDEFAULT . equals ( pdfSize ) ; } return super . eIsSet ( featureID ) ;
public class Ifc4PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public EClass getIfcEventType ( ) { } }
if ( ifcEventTypeEClass == null ) { ifcEventTypeEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc4Package . eNS_URI ) . getEClassifiers ( ) . get ( 241 ) ; } return ifcEventTypeEClass ;
public class MeterActiveTime { /** * Return the probe ' s next average . */ public final void sample ( ) { } }
synchronized ( _lock ) { long count = _totalCount . get ( ) ; long lastCount = _lastAvgTotalCount ; _lastAvgTotalCount = count ; long sum = _sum . get ( ) ; double lastSum = _lastAvgSum ; _lastAvgSum = sum ; if ( count == lastCount ) { _avg = 0 ; } else { _avg = _scale * ( sum - lastSum ) / ( double ) ( count - lastCou...
public class AWSGlueClient { /** * Retrieves the definition of a specified database . * @ param getDatabaseRequest * @ return Result of the GetDatabase operation returned by the service . * @ throws InvalidInputException * The input provided was not valid . * @ throws EntityNotFoundException * A specified e...
request = beforeClientExecution ( request ) ; return executeGetDatabase ( request ) ;
public class LineWrapper { /** * Emit { @ code s } . This may be buffered to permit line wraps to be inserted . */ void append ( String s ) throws IOException { } }
if ( closed ) throw new IllegalStateException ( "closed" ) ; if ( nextFlush != null ) { int nextNewline = s . indexOf ( '\n' ) ; // If s doesn ' t cause the current line to cross the limit , buffer it and return . We ' ll decide // whether or not we have to wrap it later . if ( nextNewline == - 1 && column + s . length...
public class CalendarDateCalculator { public CalendarDateCalculator moveByDays ( final int days ) { } }
setCurrentIncrement ( days ) ; getCurrentBusinessDate ( ) . add ( Calendar . DAY_OF_MONTH , days ) ; if ( getHolidayHandler ( ) != null ) { setCurrentBusinessDate ( getHolidayHandler ( ) . moveCurrentDate ( this ) ) ; } return this ;
public class Messenger { /** * Toggle video of call * @ param callId Call Id */ @ ObjectiveCName ( "toggleVideoEnabledWithCallId:" ) public void toggleVideoEnabled ( long callId ) { } }
if ( modules . getCallsModule ( ) . getCall ( callId ) . getIsVideoEnabled ( ) . get ( ) ) { modules . getCallsModule ( ) . disableVideo ( callId ) ; } else { modules . getCallsModule ( ) . enableVideo ( callId ) ; }
public class ReportDaoImpl { /** * Generic method to add a element for a parent element given . */ private Element addElement ( Document document , Element parent , Map < ReportKey , Object > reportsData , ReportKey key , String value ) { } }
if ( reportsData . containsKey ( key ) ) { Element child = document . createElement ( key . name ( ) . toLowerCase ( ) ) ; child . appendChild ( document . createTextNode ( value ) ) ; parent . appendChild ( child ) ; return child ; } return null ;
public class DateTimeExtensions { /** * Converts the Calendar to a corresponding { @ link java . time . MonthDay } . If the Calendar has a different * time zone than the system default , the MonthDay will be adjusted into the default time zone . * @ param self a Calendar * @ return a MonthDay * @ since 2.5.0 */...
return MonthDay . of ( toMonth ( self ) , self . get ( Calendar . DAY_OF_MONTH ) ) ;
public class GetRelationalDatabaseSnapshotsResult { /** * An object describing the result of your get relational database snapshots request . * @ param relationalDatabaseSnapshots * An object describing the result of your get relational database snapshots request . */ public void setRelationalDatabaseSnapshots ( ja...
if ( relationalDatabaseSnapshots == null ) { this . relationalDatabaseSnapshots = null ; return ; } this . relationalDatabaseSnapshots = new java . util . ArrayList < RelationalDatabaseSnapshot > ( relationalDatabaseSnapshots ) ;
public class RemotingDispatcher { /** * 1 . 将 channel 纳入管理中 ( 不存在就加入 ) * 2 . 更新 TaskTracker 节点信息 ( 可用线程数 ) */ private void offerHandler ( Channel channel , RemotingCommand request ) { } }
AbstractRemotingCommandBody commandBody = request . getBody ( ) ; String nodeGroup = commandBody . getNodeGroup ( ) ; String identity = commandBody . getIdentity ( ) ; NodeType nodeType = NodeType . valueOf ( commandBody . getNodeType ( ) ) ; // 1 . 将 channel 纳入管理中 ( 不存在就加入 ) appContext . getChannelManager ( ) . offerC...
public class ComponentDao { /** * Return list of components that will will mix main and branch components . * Please note that a project can only appear once in the list , it ' s not possible to ask for many branches on same project with this method . */ public List < ComponentDto > selectByKeysAndBranches ( DbSessio...
Set < String > dbKeys = branchesByKey . entrySet ( ) . stream ( ) . map ( entry -> generateBranchKey ( entry . getKey ( ) , entry . getValue ( ) ) ) . collect ( toSet ( ) ) ; return selectByDbKeys ( session , dbKeys ) ;
public class KeyUsageExtension { /** * Encode this extension value */ private void encodeThis ( ) throws IOException { } }
DerOutputStream os = new DerOutputStream ( ) ; os . putTruncatedUnalignedBitString ( new BitArray ( this . bitString ) ) ; this . extensionValue = os . toByteArray ( ) ;
public class AmazonEKSClient { /** * Returns descriptive information about an Amazon EKS cluster . * The API server endpoint and certificate authority data returned by this operation are required for * < code > kubelet < / code > and < code > kubectl < / code > to communicate with your Kubernetes API server . For m...
request = beforeClientExecution ( request ) ; return executeDescribeCluster ( request ) ;
public class MicroServiceTemplateSupport { /** * 20180605 ning */ public Map getMapByIdService4text ( String id , String tableName , String colName ) { } }
Map data = getInfoByIdService ( id , tableName ) ; if ( data == null ) { return null ; } String dataStr = ( String ) data . get ( colName ) ; if ( dataStr == null || "" . equals ( dataStr ) ) { dataStr = "{}" ; } Gson gson = new Gson ( ) ; Map dataMap = gson . fromJson ( dataStr , Map . class ) ; return dataMap ;
public class MapLayer { /** * Replies if this layer accepts the user clicks . * @ return < code > true < / code > if this layer allows mouse click events , otherwise < code > false < / code > */ @ Pure public boolean isClickable ( ) { } }
final AttributeValue val = getAttributeProvider ( ) . getAttribute ( ATTR_CLICKABLE ) ; if ( val != null ) { try { return val . getBoolean ( ) ; } catch ( AttributeException e ) { } } return true ;
public class Utils { /** * Formats the given long value into a human readable notation using the Kilo , Mega , Giga , etc . abbreviations . * @ param value the value to format * @ return the string representation */ public static String humanize ( long value ) { } }
if ( value < 0 ) { return '-' + humanize ( - value ) ; } else if ( value > 1000000000000000000L ) { return Double . toString ( ( value + 500000000000000L ) / 1000000000000000L * 1000000000000000L / 1000000000000000000.0 ) + 'E' ; } else if ( value > 100000000000000000L ) { return Double . toString ( ( value + 500000000...
public class RepresentationModelProcessorInvoker { /** * Invokes all registered { @ link RepresentationModelProcessor } s registered for the given { @ link ResolvableType } . * @ param value the object to process * @ param type * @ return */ private Object invokeProcessorsFor ( Object value , ResolvableType type ...
Object currentValue = value ; // Process actual value for ( RepresentationModelProcessorInvoker . ProcessorWrapper wrapper : this . processors ) { if ( wrapper . supports ( type , currentValue ) ) { currentValue = wrapper . invokeProcessor ( currentValue ) ; } } return currentValue ;
public class ModelUtils { /** * Gets and splits exported variables separated by a comma . * Variable names are not prefixed by the type ' s name . < br / > * Variable values may also be surrounded by quotes . * @ param exportedVariablesDecl the declaration to parse * @ param sourceFile the source file * @ par...
Map < String , ExportedVariable > result = new HashMap < > ( ) ; Pattern pattern = Pattern . compile ( ParsingConstants . PROPERTY_GRAPH_RANDOM_PATTERN , Pattern . CASE_INSENSITIVE ) ; ExportedVariablesParser exportsParser = new ExportedVariablesParser ( ) ; exportsParser . parse ( exportedVariablesDecl , sourceFile , ...
public class MapViewProjection { /** * Computes horizontal extend of the map view . * @ return the longitude span of the map in degrees */ public double getLongitudeSpan ( ) { } }
if ( this . mapView . getWidth ( ) > 0 && this . mapView . getHeight ( ) > 0 ) { LatLong left = fromPixels ( 0 , 0 ) ; LatLong right = fromPixels ( this . mapView . getWidth ( ) , 0 ) ; return Math . abs ( left . longitude - right . longitude ) ; } throw new IllegalStateException ( INVALID_MAP_VIEW_DIMENSIONS ) ;
public class FastTrackData { /** * Read data for a single column . * @ param startIndex block start * @ param length block length */ private void readColumn ( int startIndex , int length ) throws Exception { } }
if ( m_currentTable != null ) { int value = FastTrackUtility . getByte ( m_buffer , startIndex ) ; Class < ? > klass = COLUMN_MAP [ value ] ; if ( klass == null ) { klass = UnknownColumn . class ; } FastTrackColumn column = ( FastTrackColumn ) klass . newInstance ( ) ; m_currentColumn = column ; logColumnData ( startIn...
public class FilteredSparseInstanceData { /** * Value of the attribute in the indexAttribute position . * If this value is absent , a NaN value ( marker of missing value ) * is returned , otherwise this method returns the actual value . * @ param indexAttribute the index attribute * @ return the double */ @ Ove...
int location = locateIndex ( indexAttribute ) ; if ( ( location >= 0 ) && ( indexValues [ location ] == indexAttribute ) ) { return attributeValues [ location ] ; } else { // returns a NaN value which represents missing values instead of a 0 ( zero ) return Double . NaN ; }
public class UtilDenoiseWavelet { /** * Computes the universal threshold defined in [ 1 ] , which is the threshold used by * VisuShrink . The same threshold is used by other algorithms . * threshold = & sigma ; sqrt ( 2 * log ( max ( w , h ) ) < br > * where ( w , h ) is the image ' s width and height . * [ 1 ]...
int w = image . width ; int h = image . height ; return noiseSigma * Math . sqrt ( 2 * Math . log ( Math . max ( w , h ) ) ) ;
public class MethodUtil { /** * Determines the mutator method name based on a field name . * @ param fieldName * a field name * @ return the resulting method name */ public static String determineMutatorName ( @ Nonnull final String fieldName ) { } }
Check . notEmpty ( fieldName , "fieldName" ) ; final Matcher m = PATTERN . matcher ( fieldName ) ; Check . stateIsTrue ( m . find ( ) , "passed field name '%s' is not applicable" , fieldName ) ; final String name = m . group ( ) ; return METHOD_SET_PREFIX + name . substring ( 0 , 1 ) . toUpperCase ( ) + name . substrin...
public class ColtUtils { /** * Matrix - vector multiplication with diagonal matrix . * @ param diagonalM diagonal matrix M , in the form of a vector of its diagonal elements * @ param vector * @ return M . x */ public static final DoubleMatrix1D diagonalMatrixMult ( DoubleMatrix1D diagonalM , DoubleMatrix1D vecto...
int n = diagonalM . size ( ) ; DoubleMatrix1D ret = DoubleFactory1D . dense . make ( n ) ; for ( int i = 0 ; i < n ; i ++ ) { ret . setQuick ( i , diagonalM . getQuick ( i ) * vector . getQuick ( i ) ) ; } return ret ;
public class TypesafeConfigUtils { /** * Get a configuration as Boolean . Return { @ code null } if missing or wrong type . * @ param config * @ param path * @ return */ public static Optional < Boolean > getBooleanOptional ( Config config , String path ) { } }
return Optional . ofNullable ( getBoolean ( config , path ) ) ;
public class syslog_sslvpn { /** * < pre > * Report for sslvpn syslog message received by this collector . . * < / pre > */ public static syslog_sslvpn [ ] get ( nitro_service client ) throws Exception { } }
syslog_sslvpn resource = new syslog_sslvpn ( ) ; resource . validate ( "get" ) ; return ( syslog_sslvpn [ ] ) resource . get_resources ( client ) ;
public class APIKeysInner { /** * Gets a list of API keys of an Application Insights component . * @ param resourceGroupName The name of the resource group . * @ param resourceName The name of the Application Insights component resource . * @ throws IllegalArgumentException thrown if parameters fail the validatio...
return listWithServiceResponseAsync ( resourceGroupName , resourceName ) . map ( new Func1 < ServiceResponse < List < ApplicationInsightsComponentAPIKeyInner > > , List < ApplicationInsightsComponentAPIKeyInner > > ( ) { @ Override public List < ApplicationInsightsComponentAPIKeyInner > call ( ServiceResponse < List < ...
public class StartupServletContextListener { /** * Publishes the ManagedBeanDestroyerListener instance in the application map . * This allows the FacesConfigurator to access the instance and to set the * correct ManagedBeanDestroyer instance on it . * @ param facesContext */ private void _publishManagedBeanDestro...
ExternalContext externalContext = facesContext . getExternalContext ( ) ; Map < String , Object > applicationMap = externalContext . getApplicationMap ( ) ; applicationMap . put ( ManagedBeanDestroyerListener . APPLICATION_MAP_KEY , _detroyerListener ) ;
public class AbstractDraweeController { /** * Sets gesture detector . */ protected void setGestureDetector ( @ Nullable GestureDetector gestureDetector ) { } }
mGestureDetector = gestureDetector ; if ( mGestureDetector != null ) { mGestureDetector . setClickListener ( this ) ; }
public class EntityHelper { /** * 获取默认的orderby语句 * @ param entityClass * @ return */ public static String getOrderByClause ( Class < ? > entityClass ) { } }
EntityTable table = getEntityTable ( entityClass ) ; if ( table . getOrderByClause ( ) != null ) { return table . getOrderByClause ( ) ; } List < EntityColumn > orderEntityColumns = new ArrayList < EntityColumn > ( ) ; for ( EntityColumn column : table . getEntityClassColumns ( ) ) { if ( column . getOrderBy ( ) != nul...
public class CaseArgumentAnalyser { /** * Finds for each JoinedArgs set the best fitting name . * First it is tried to find a name from the explicitParameterNames list , by comparing the argument values * with the explicit case argument values . If no matching value can be found , the name of the argument is taken ...
List < String > argumentNames = Lists . newArrayListWithExpectedSize ( joinedArgs . get ( 0 ) . size ( ) ) ; Multiset < String > paramNames = TreeMultiset . create ( ) ; arguments : for ( int iArg = 0 ; iArg < joinedArgs . get ( 0 ) . size ( ) ; iArg ++ ) { parameters : for ( int iParam = 0 ; iParam < explicitParameter...
public class AbstractPoint { /** * Returns a new Point ( p1 . x - p2 . x , p1 . y - p2 . y ) * @ param p1 * @ param p2 * @ return Returns a new Point ( p1 . x - p2 . x , p1 . y - p2 . y ) */ public static final Point subtract ( Point p1 , Point p2 ) { } }
return new AbstractPoint ( p1 . getX ( ) - p2 . getX ( ) , p1 . getY ( ) - p2 . getY ( ) ) ;
public class PutMethodRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( PutMethodRequest putMethodRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( putMethodRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( putMethodRequest . getRestApiId ( ) , RESTAPIID_BINDING ) ; protocolMarshaller . marshall ( putMethodRequest . getResourceId ( ) , RESOURCEID_BINDING ) ; protocolMarsha...
public class ChooseRandom { /** * { @ inheritDoc } */ @ Override public synchronized String execute ( SampleResult previousResult , Sampler currentSampler ) throws InvalidVariableException { } }
JMeterVariables vars = getVariables ( ) ; String varName = ( ( CompoundVariable ) values [ values . length - 1 ] ) . execute ( ) . trim ( ) ; int index = random . nextInt ( values . length - 1 ) ; String choice = ( ( CompoundVariable ) values [ index ] ) . execute ( ) ; if ( vars != null && varName != null && varName ....
public class ScenarioPortrayal { /** * Sets the data for the scatterPlot . * Should be used only the first time . Use * updateDataSerieOnScaterPlot to change the data * @ param scatterID * @ param dataSerie the data . The first dimension MUST BE 2 ( double [ 2 ] [ whatever _ int ] ) */ public void addDataSerieT...
if ( this . scatterPlots . containsKey ( scatterID ) ) { this . scatterPlotsData . put ( scatterID , dataSerie ) ; this . scatterPlots . get ( scatterID ) . addSeries ( ( double [ ] [ ] ) this . scatterPlotsData . get ( scatterID ) , scatterID , null ) ; }
public class CmsJspActionElement { /** * Includes the direct edit scriptlet , same as * using the < code > & lt ; cms : editable provider = " . . . " mode = " . . . " file = " . . . " / & gt ; < / code > tag . < p > * @ param provider the direct edit provider class name * @ param mode the direct edit mode to use ...
CmsJspTagEditable . editableTagAction ( getJspContext ( ) , provider , CmsDirectEditMode . valueOf ( mode ) , filename ) ;
public class Utils { /** * Reads a text file content and returns it as a string . * The file is tried to be read with UTF - 8 encoding . * If it fails , the default system encoding is used . * @ param file the file whose content must be loaded * @ return the file content * @ throws IOException if the file con...
String result = null ; ByteArrayOutputStream os = new ByteArrayOutputStream ( ) ; Utils . copyStream ( file , os ) ; result = os . toString ( "UTF-8" ) ; return result ;
public class AmazonAlexaForBusinessClient { /** * Deletes a contact by the contact ARN . * @ param deleteContactRequest * @ return Result of the DeleteContact operation returned by the service . * @ throws NotFoundException * The resource is not found . * @ throws ConcurrentModificationException * There is ...
request = beforeClientExecution ( request ) ; return executeDeleteContact ( request ) ;
public class CmsResource { /** * Returns true if the resource name certainly denotes a folder , that is ends with a " / " . < p > * @ param resource the resource to check * @ return true if the resource name certainly denotes a folder , that is ends with a " / " */ public static boolean isFolder ( String resource )...
return CmsStringUtil . isNotEmpty ( resource ) && ( resource . charAt ( resource . length ( ) - 1 ) == '/' ) ;
public class CmsImportView { /** * Adds an import result to the displayed list of import results . < p > * @ param result the result to add */ protected void addImportResult ( CmsAliasImportResult result ) { } }
String cssClass ; I_Css css = CmsImportResultList . RESOURCES . css ( ) ; switch ( result . getStatus ( ) ) { case aliasChanged : cssClass = css . aliasImportOverwrite ( ) ; break ; case aliasImportError : case aliasParseError : cssClass = css . aliasImportError ( ) ; break ; case aliasNew : default : cssClass = css . ...
public class RendererBuilder { /** * Add a Renderer instance as prototype . * @ param renderer to use as prototype . * @ return the current RendererBuilder instance . */ public RendererBuilder < T > withPrototype ( Renderer < ? extends T > renderer ) { } }
if ( renderer == null ) { throw new NeedsPrototypesException ( "RendererBuilder can't use a null Renderer<T> instance as prototype" ) ; } this . prototypes . add ( renderer ) ; return this ;
public class AllocatedEvaluatorImpl { /** * Submit Context and Task with configuration strings . * This method should be called from bridge and the configuration strings are * serialized at . Net side . * @ param evaluatorConfiguration * @ param contextConfiguration * @ param taskConfiguration */ public void ...
this . launchWithConfigurationString ( evaluatorConfiguration , contextConfiguration , Optional . < String > empty ( ) , Optional . of ( taskConfiguration ) ) ;
public class GenericUtils { /** * Utility method to get the ISO English string from the given bytes . If * this an unsupported encoding exception is thrown by the conversion , then * an IllegalArgumentException will be thrown . * @ param data * @ return String * @ exception IllegalArgumentException */ static ...
if ( null == data ) { return null ; } char chars [ ] = new char [ data . length ] ; for ( int i = 0 ; i < data . length ; i ++ ) { chars [ i ] = ( char ) ( data [ i ] & 0xff ) ; } return new String ( chars ) ;
public class AIStream { /** * Returns the AnycastInputHandler associated with this AIStream * @ return */ public AnycastInputHandler getAnycastInputHandler ( ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "getAnycastInputHandler" ) ; SibTr . exit ( tc , "getAnycastInputHandler" , _parent ) ; } return _parent ;
public class Val { /** * As object . * @ param clazz the clazz * @ return the object */ public Object asObject ( @ NonNull Class < ? > clazz ) { } }
if ( Map . class . isAssignableFrom ( clazz ) ) { return asMap ( clazz , String . class , String . class ) ; } else if ( Collection . class . isAssignableFrom ( clazz ) ) { return asCollection ( clazz , String . class ) ; } return Object . class . cast ( as ( clazz ) ) ;
public class SSOClient { /** * 验证访问令牌并返回认证信息 * 在Servlet容器中可以通过调用 { @ link SSOUtils # extractAccessToken ( HttpServletRequest ) } 获取到访问令牌 。 * @ throws InvalidTokenException 如果accessToken是无效的 * @ throws TokenExpiredException 如果accessToken已经过期 */ public Authentication verifyAccessToken ( String accessToken ) throws ...
CacheProvider cp = cp ( ) ; Authentication authc = cp . get ( accessToken ) ; if ( null != authc ) { if ( ! authc . isExpired ( ) ) { return authc ; } else { cp . remove ( accessToken ) ; } } boolean jwt = checkJwtToken ( accessToken ) ; if ( jwt ) { authc = tp ( ) . verifyJwtAccessToken ( accessToken ) ; } else { auth...
public class MediaApi { /** * Get the UCS content of the interaction * Get the UCS content of the interaction * @ param mediatype media - type of interaction ( required ) * @ param id id of the interaction ( required ) * @ param getContentData ( optional ) * @ return ApiSuccessResponse * @ throws ApiExcepti...
ApiResponse < ApiSuccessResponse > resp = getContentMediaWithHttpInfo ( mediatype , id , getContentData ) ; return resp . getData ( ) ;
public class CmsObject { /** * Changes the resource flags of a resource . < p > * The resource flags are used to indicate various " special " conditions * for a resource . Most notably , the " internal only " setting which signals * that a resource can not be directly requested with it ' s URL . < p > * @ param...
CmsResource resource = readResource ( resourcename , CmsResourceFilter . IGNORE_EXPIRATION ) ; getResourceType ( resource ) . chflags ( this , m_securityManager , resource , flags ) ;
public class InsuranceApi { /** * List insurance levels ( asynchronously ) Return available insurance levels * for all ship types - - - This route is cached for up to 3600 seconds * @ param acceptLanguage * Language to use in the response ( optional , default to en - us ) * @ param datasource * The server nam...
com . squareup . okhttp . Call call = getInsurancePricesValidateBeforeCall ( acceptLanguage , datasource , ifNoneMatch , language , callback ) ; Type localVarReturnType = new TypeToken < List < InsurancePricesResponse > > ( ) { } . getType ( ) ; apiClient . executeAsync ( call , localVarReturnType , callback ) ; return...
public class AbstractDataStore { /** * Runtime check that the passed instance of { @ link Data } is not empty ( respectively { @ link Data # EMPTY } ) . * @ param data * instance of { @ code Data } * @ throws IllegalStateException * if the passed instance is empty */ private static Data checkData ( final Data d...
if ( Data . EMPTY . equals ( data ) ) { throw new IllegalStateException ( "Argument 'data' must not be empty." ) ; } return data ;
public class GitDirLocator { /** * Search up all the maven parent project hierarchy until a . git directory is found . * @ return File which represents the location of the . git directory or NULL if none found . */ @ Nullable private File findProjectGitDirectory ( ) { } }
if ( this . mavenProject == null ) { return null ; } File basedir = mavenProject . getBasedir ( ) ; while ( basedir != null ) { File gitdir = new File ( basedir , Constants . DOT_GIT ) ; if ( gitdir . exists ( ) ) { if ( gitdir . isDirectory ( ) ) { return gitdir ; } else if ( gitdir . isFile ( ) ) { return processGitD...
public class IterableSubject { /** * Checks that the subject does not contain duplicate elements . */ public final void containsNoDuplicates ( ) { } }
List < Entry < ? > > duplicates = newArrayList ( ) ; for ( Multiset . Entry < ? > entry : LinkedHashMultiset . create ( actual ( ) ) . entrySet ( ) ) { if ( entry . getCount ( ) > 1 ) { duplicates . add ( entry ) ; } } if ( ! duplicates . isEmpty ( ) ) { failWithoutActual ( simpleFact ( "expected not to contain duplica...
public class DeploymentResourceSupport { /** * Checks to see if a subsystem resource has already been registered for the deployment . * @ param subsystemName the name of the subsystem * @ return { @ code true } if the subsystem exists on the deployment otherwise { @ code false } */ public boolean hasDeploymentSubsy...
final Resource root = deploymentUnit . getAttachment ( DEPLOYMENT_RESOURCE ) ; final PathElement subsystem = PathElement . pathElement ( SUBSYSTEM , subsystemName ) ; return root . hasChild ( subsystem ) ;
public class LocalisationManager { /** * Method addNewRemotePtoPLocalisation * < p > Suppports the addition of a new remote PtoP Localisation of a * destination . * @ param transaction * @ param messagingEngineUuid * @ param destinationLocalizationDefinition * @ param queuePoint * @ return * @ throws SI...
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "addNewRemotePtoPLocalization" , new Object [ ] { transaction , messagingEngineUuid , destinationLocalizationDefinition , Boolean . valueOf ( queuePoint ) , remoteSupport } ) ; PtoPMessageItemStream newMsgItemStream = null ;...
public class PortalApplicationContextLocator { /** * Inits and / or returns already initialized logger . < br > * You have to use this method in order to use the logger , < br > * you should not call the private variable directly . < br > * This was done because Tomcat may instantiate all listeners before calling...
Log l = logger ; if ( l == null ) { l = LogFactory . getLog ( LOGGER_NAME ) ; logger = l ; } return l ;
public class SetConverter { /** * { @ inheritDoc } */ @ Override public Set < String > convert ( String value ) { } }
// shouldn ' t ever get called but if it does , the best we can do is return a String set List < String > list = Arrays . asList ( ConversionManager . split ( value ) ) ; Set < String > set = new HashSet < > ( list ) ; return set ;
public class ClassPropertyUsageAnalyzer { /** * Prints the data for a single class to the given stream . This will be a * single line in CSV . * @ param out * the output to write to * @ param classRecord * the class record to write * @ param entityIdValue * the item id that this class record belongs to */...
printTerms ( out , classRecord . itemDocument , entityIdValue , "\"" + getClassLabel ( entityIdValue ) + "\"" ) ; printImage ( out , classRecord . itemDocument ) ; out . print ( "," + classRecord . itemCount + "," + classRecord . subclassCount ) ; printClassList ( out , classRecord . superClasses ) ; HashSet < EntityId...
public class MessageDrivenBeanO { /** * getEJBHome - It is illegal to call this method * message - driven bean methods because there is no EJBHome object * for message - driven beans . */ @ Override public EJBHome getEJBHome ( ) // d116376 { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "getEJBHome" ) ; Tr . error ( tc , "METHOD_NOT_ALLOWED_CNTR0047E" , "MessageDrivenBeanO.getEJBHome()" ) ; throw new IllegalStateException ( "Method Not Allowed Exception: See Message-drive Bean Component Contract section of the...
public class ConcurrentLinkedHashMap { /** * Runs the pending page replacement policy operations . * @ param tasks the ordered array of the pending operations * @ param maxTaskIndex the maximum index of the array */ @ GuardedBy ( "evictionLock" ) void runTasks ( Task [ ] tasks , int maxTaskIndex ) { } }
for ( int i = 0 ; i <= maxTaskIndex ; i ++ ) { runTasksInChain ( tasks [ i ] ) ; }
public class ClassFieldAccessorFactory { /** * Creates the set method for the given field definition */ protected static void buildSetMethod ( final Class < ? > originalClass , final String className , final Class < ? > superClass , final Method setterMethod , final Class < ? > fieldType , final ClassWriter cw ) { } }
MethodVisitor mv ; // set method { Method overridingMethod ; try { overridingMethod = superClass . getMethod ( getOverridingSetMethodName ( fieldType ) , Object . class , fieldType . isPrimitive ( ) ? fieldType : Object . class ) ; } catch ( final Exception e ) { throw new RuntimeException ( "This is a bug. Please repo...
public class IntTupleDistanceFunctions { /** * Computes the squared Euclidean distance between the given tuples * when they are interpreted as points of a sphere with the specified * size ( that is , circumference ) . * @ param t0 The first array * @ param t1 The second array * @ param size The size of the sp...
Utils . checkForEqualSize ( t0 , t1 ) ; Utils . checkForEqualSize ( t0 , size ) ; long sum = 0 ; for ( int i = 0 ; i < t0 . getSize ( ) ; i ++ ) { int d = MathUtils . wrappedDistance ( t0 . get ( i ) , t1 . get ( i ) , size . get ( i ) ) ; sum += d * d ; } return sum ;
public class Pattern { /** * Compares the keys and values of two group - info maps * @ param a the first map to compare * @ param b the other map to compare * @ return { @ code true } if the first map contains all of the other map ' s keys and values ; { @ code false } otherwise */ private boolean groupInfoMatche...
if ( a == null && b == null ) { return true ; } boolean isMatch = false ; if ( a != null && b != null ) { if ( a . isEmpty ( ) && b . isEmpty ( ) ) { isMatch = true ; } else if ( a . size ( ) == b . size ( ) ) { for ( Entry < String , List < GroupInfo > > entry : a . entrySet ( ) ) { List < GroupInfo > otherList = b . ...
public class ShapeProcessor { /** * Method resize the given { @ code Shape } with respect of its original aspect ratio but independent of its original size . * Note : Out of performance reasons the given object will directly be manipulated . * @ param shape the shape to scale . * @ param width the width of the ne...
// compute original size final double originalWidth = shape . prefWidth ( - 1 ) ; final double originalHeight = shape . prefHeight ( - 1 ) ; final double scalingFactor = Math . min ( width / originalWidth , height / originalHeight ) ; // rescale shape . setScaleX ( scalingFactor ) ; shape . setScaleY ( scalingFactor ) ...
public class OnDiskSnapshotsStore { /** * { @ inheritDoc } * @ throws IllegalStateException if this method is called before { @ link OnDiskSnapshotsStore # initialize ( ) } */ @ SuppressWarnings ( "ConstantConditions" ) @ Override public void storeSnapshot ( ExtendedSnapshotWriter snapshotWriter ) throws StorageExcep...
checkInitialized ( ) ; checkArgument ( snapshotWriter instanceof SnapshotFileWriter , "unknown snapshot request type:%s" , snapshotWriter . getClass ( ) . getSimpleName ( ) ) ; final SnapshotFileWriter snapshotFileWriter = ( SnapshotFileWriter ) snapshotWriter ; checkArgument ( snapshotFileWriter . snapshotStarted ( ) ...
public class PoiUtil { /** * 查找单元格 。 * @ param sheet 表单 * @ param rowIndex 行索引 * @ param searchKey 单元格中包含的关键字 * @ return 单元格 , 没有找到时返回null */ public static Cell searchRowCell ( Sheet sheet , int rowIndex , String searchKey ) { } }
if ( StringUtils . isEmpty ( searchKey ) ) return null ; return searchRow ( sheet . getRow ( rowIndex ) , searchKey ) ;
public class ProjectStats { /** * Transform summary information to HTML . * @ param htmlWriter * the Writer to write the HTML output to */ public void transformSummaryToHTML ( Writer htmlWriter ) throws IOException , TransformerException { } }
ByteArrayOutputStream summaryOut = new ByteArrayOutputStream ( 8096 ) ; reportSummary ( summaryOut ) ; StreamSource in = new StreamSource ( new ByteArrayInputStream ( summaryOut . toByteArray ( ) ) ) ; StreamResult out = new StreamResult ( htmlWriter ) ; InputStream xslInputStream = this . getClass ( ) . getClassLoader...
public class OfferService { /** * Adds blocks of incremental block report back to the * receivedAndDeletedBlockList , when handling an exception * @ param failed - list of blocks * @ param failedPendingRequests - how many of the blocks are received acks . */ private void processFailedBlocks ( Block [ ] failed , i...
synchronized ( receivedAndDeletedBlockList ) { // We are adding to the front of a linked list and hence to preserve // order we should add the blocks in the reverse order . for ( int i = failed . length - 1 ; i >= 0 ; i -- ) { receivedAndDeletedBlockList . add ( 0 , failed [ i ] ) ; } pendingReceivedRequests += failedP...
public class DJGroupRegistrationManager { /** * When a group expression gets its value from a CustomExpression , a variable must be used otherwise it will fail * to work as expected . < br > < br > * Instead of using : GROUP - > CUSTOM _ EXPRESSION < br > * < br > * we use : GROUP - > VARIABLE - > CUSTOM _ EXPR...
// 1 ) Register CustomExpression object as a parameter String expToGroupByName = group . getName ( ) + "_custom_expression" ; registerCustomExpressionParameter ( expToGroupByName , customExpression ) ; // 2 ) Create a variable which is calculated through the custom expression JRDesignVariable gvar = new JRDesignVariabl...
public class AbstractTimecode { /** * Calculates duration between given inPoint and outPoint . * In case outPoint does not have the same Timecode base and / or dropFrame flag * it will convert it to the same Timecode base and dropFrame flag of the inPoint * @ param inPoint * @ param outPoint * @ return durati...
if ( ! inPoint . isCompatible ( outPoint ) ) { MutableTimecode mutableTimecode = new MutableTimecode ( outPoint ) ; mutableTimecode . setTimecodeBase ( inPoint . getTimecodeBase ( ) ) ; mutableTimecode . setDropFrame ( inPoint . isDropFrame ( ) ) ; outPoint = new Timecode ( mutableTimecode ) ; } long frameNumber = outP...
public class SarlAgentBuilderImpl { /** * Change the super type . * @ param superType the qualified name of the super type , * or < code > null < / code > if the default type . */ public void setExtends ( String superType ) { } }
if ( ! Strings . isEmpty ( superType ) && ! Agent . class . getName ( ) . equals ( superType ) ) { JvmParameterizedTypeReference superTypeRef = newTypeRef ( this . sarlAgent , superType ) ; JvmTypeReference baseTypeRef = findType ( this . sarlAgent , Agent . class . getCanonicalName ( ) ) ; if ( isSubTypeOf ( this . sa...
public class CachedXPathAPI { /** * Evaluate XPath string to an XObject . * XPath namespace prefixes are resolved from the namespaceNode . * The implementation of this is a little slow , since it creates * a number of objects each time it is called . This could be optimized * to keep the same objects around , b...
// Since we don ' t have a XML Parser involved here , install some default support // for things like namespaces , etc . // ( Changed from : XPathContext xpathSupport = new XPathContext ( ) ; // because XPathContext is weak in a number of areas . . . perhaps // XPathContext should be done away with . ) // Create an obj...
public class CProductUtil { /** * Removes the c product where uuid = & # 63 ; and groupId = & # 63 ; from the database . * @ param uuid the uuid * @ param groupId the group ID * @ return the c product that was removed */ public static CProduct removeByUUID_G ( String uuid , long groupId ) throws com . liferay . c...
return getPersistence ( ) . removeByUUID_G ( uuid , groupId ) ;
public class SequenceManagerHighLowImpl { /** * Put new sequence object for given sequence name . * @ param sequenceName Name of the sequence . * @ param seq The sequence object to add . */ private void addSequence ( String sequenceName , HighLowSequence seq ) { } }
// lookup the sequence map for calling DB String jcdAlias = getBrokerForClass ( ) . serviceConnectionManager ( ) . getConnectionDescriptor ( ) . getJcdAlias ( ) ; Map mapForDB = ( Map ) sequencesDBMap . get ( jcdAlias ) ; if ( mapForDB == null ) { mapForDB = new HashMap ( ) ; } mapForDB . put ( sequenceName , seq ) ; s...
public class ControlRequestFlushImpl { /** * Get summary trace line for this message * Javadoc description supplied by ControlMessage interface . */ public void getTraceSummaryLine ( StringBuilder buff ) { } }
// Get the common fields for control messages super . getTraceSummaryLine ( buff ) ; buff . append ( "requestID=" ) ; buff . append ( getRequestID ( ) ) ; buff . append ( "indoubtDiscard=" ) ; buff . append ( getIndoubtDiscard ( ) ) ;
public class RelationalOperations { /** * Returns true if multipoint _ a intersects multipoint _ b . */ private static boolean multiPointIntersectsMultiPoint_ ( MultiPoint _multipointA , MultiPoint _multipointB , double tolerance , ProgressTracker progress_tracker ) { } }
MultiPoint multipoint_a ; MultiPoint multipoint_b ; if ( _multipointA . getPointCount ( ) > _multipointB . getPointCount ( ) ) { multipoint_a = _multipointB ; multipoint_b = _multipointA ; } else { multipoint_a = _multipointA ; multipoint_b = _multipointB ; } Envelope2D env_a = new Envelope2D ( ) ; Envelope2D env_b = n...
public class CmsVfsResourceBundle { /** * Gets the ( possibly already cached ) message data . < p > * @ return the message data */ private Map < Locale , Map < String , String > > getData ( ) { } }
@ SuppressWarnings ( "unchecked" ) Map < Locale , Map < String , String > > result = ( Map < Locale , Map < String , String > > ) m_cache . getCachedObject ( m_cms , getFilePath ( ) ) ; if ( result == null ) { try { result = m_loader . loadData ( m_cms , m_parameters ) ; m_cache . putCachedObject ( m_cms , getFilePath ...
public class AbstractUDPClient { /** * { @ inheritDoc } * Runs the thread . * This will send commands to the server , and receive messages from it . */ @ Override public void run ( ) { } }
try { log . info ( "UDP - client started: " + this . hostname + ":" + this . port ) ; isRunning = true ; buf = new ByteBuffer ( 5000 ) ; buf . setString ( getInitMessage ( ) ) ; // A buffer size of 5000 to handle the server _ param message . socket = new DatagramSocket ( ) ; // Timeout of 3mins to ensure that the coach...
public class SubString { /** * < div color = ' red ' style = " font - size : 24px ; color : red " > < b > < i > < u > JCYPHER < / u > < / i > < / b > < / div > * < div color = ' red ' style = " font - size : 18px ; color : red " > < i > specify the length of a substring to be extracted < / i > < / div > * < br / > ...
JcNumber sub = new JcNumber ( len , this . getPredecessor ( ) , OPERATOR . Common . COMMA_SEPARATOR ) ; JcString ret = new JcString ( null , sub , new FunctionInstance ( FUNCTION . String . SUBSTRING , 3 ) ) ; QueryRecorder . recordInvocationConditional ( this , "subLength" , ret , QueryRecorder . literal ( len ) ) ; r...
public class JsonProcessingExceptionMapper { /** * { @ inheritDoc } */ @ Override public Response toResponse ( JsonProcessingException exception ) { } }
Throwable throwable = exception ; while ( throwable != null ) { if ( throwable instanceof PersistenceException ) { return exceptionMappers . get ( ) . findMapping ( throwable ) . toResponse ( throwable ) ; } throwable = throwable . getCause ( ) ; } logger . debug ( "Json Processing error" , exception ) ; String message...
public class BigDecimal { /** * Converts this { @ code BigDecimal } to a { @ code short } , checking * for lost information . If this { @ code BigDecimal } has a * nonzero fractional part or is out of the possible range for a * { @ code short } result then an { @ code ArithmeticException } is * thrown . * @ r...
long num ; num = this . longValueExact ( ) ; // will check decimal part if ( ( short ) num != num ) throw new java . lang . ArithmeticException ( "Overflow" ) ; return ( short ) num ;
public class LossLayer { /** * Compute score after labels and input have been set . * @ param fullNetRegTerm Regularization score term for the entire network * @ param training whether score should be calculated at train or test time ( this affects things like application of * dropout , etc ) * @ return score (...
if ( input == null || labels == null ) throw new IllegalStateException ( "Cannot calculate score without input and labels " + layerId ( ) ) ; this . fullNetworkRegularizationScore = fullNetRegTerm ; INDArray preOut = input ; ILossFunction lossFunction = layerConf ( ) . getLossFn ( ) ; // double score = lossFunction . c...
public class GenericFudge { /** * Force a non generic map to be one . */ static public < K , V > Map < K , V > map ( Map < ? , ? > map ) { } }
return ( Map < K , V > ) map ;
public class cacheparameter { /** * Use this API to fetch all the cacheparameter resources that are configured on netscaler . */ public static cacheparameter get ( nitro_service service ) throws Exception { } }
cacheparameter obj = new cacheparameter ( ) ; cacheparameter [ ] response = ( cacheparameter [ ] ) obj . get_resources ( service ) ; return response [ 0 ] ;