code
stringlengths
10
174k
nl
stringlengths
3
129k
public int maxCacheEntries(){ return maxCacheEntries; }
Returns the maximum allowed number of cached file entries.
Writer write(Writer writer,int indentFactor,int indent) throws JSONException { try { boolean commanate=false; int length=this.length(); writer.write('['); if (length == 1) { JSONObject.writeValue(writer,this.myArrayList.get(0),indentFactor,indent); } else if (length != 0) { final ...
Write the contents of the JSONArray as JSON text to a writer. For compactness, no whitespace is added. <p> Warning: This method assumes that the data structure is acyclical.
public static int ceilLog256(long n){ if (n == 0) { return 1; } long m; if (n < 0) { m=-n; } else { m=n; } int d=0; while (m > 0) { d++; m>>>=8; } return d; }
Compute <tt>ceil(log_256 n)</tt>, the number of bytes needed to encode the long integer <tt>n</tt>.
public static boolean valueIsLocalSymbolTable(IonValue v){ return (v instanceof IonStruct && v.hasTypeAnnotation(ION_SYMBOL_TABLE)); }
Checks the passed in value and returns whether or not the value could be a local symbol table. It does this by checking the type and annotations.
protected void countPP(){ count++; }
increment the inner counter
MemberState resetFailureCount(){ failures=0; return this; }
Resets the member failure count.
@Override public void remove(Task task) throws TException { try { remove(new TaskPojo(task)); } catch ( ServiceException e) { throw new TException(e); } }
Description: <br>
private void FlagContourPassings(){ iae=0; int ntmp2=jee - 1; for (int j=jss + 1; j <= ntmp2; ++j) { boolean imb=false; int iaend=iae; int ntmp3=iee; for (int i=iss; i <= ntmp3; ++i) { if (funcArray[j - 1][i - 1] <= cont) imb=true; else if (imb == true) { ++iae; ...
Flag points in IA where the the function increases through the contour level, not including the boundaries. This is so we have a list of at least one point on each contour line that doesn't intersect a boundary.
public void printTable(HardcopyWriter w,int colWidth[]){ int[] columnSize=new int[4]; int charPerLine=w.getCharactersPerLine(); int tableLineWidth=0; int totalColWidth=0; for (int j=0; j < 4; j++) { totalColWidth+=colWidth[j]; } float ratio=((float)charPerLine) / ((float)totalColWidth); for (int j=0...
Method to print or print preview the assignment table. Printed in proportionately sized columns across the page with headings and vertical lines between each column. Data is word wrapped within a column. Can only handle 4 columns of data as strings. Adapted from routines in BeanTableDataModel.java by Bob Jacobsen and D...
protected void assertContains(char expected,char[] array){ for (int i=0; i < array.length; ++i) { if (array[i] == expected) { return; } } StringBuilder message=new StringBuilder(); message.append(expected).append(" not in {"); for (int i=0; i < array.length; ++i) { message.append("'").append...
Asserts that the array of characters contains a given char
@Override public Object eGet(int featureID,boolean resolve,boolean coreType){ switch (featureID) { case SGenPackage.INT_LITERAL__VALUE: return getValue(); } return super.eGet(featureID,resolve,coreType); }
<!-- begin-user-doc --> <!-- end-user-doc -->
public void waitMsec(int milliseconds){ long target=System.currentTimeMillis() + milliseconds; while (true) { long stillToGo=target - System.currentTimeMillis(); if (stillToGo <= 0) { break; } try { Thread.sleep(stillToGo); } catch ( InterruptedException e) { Thread.current...
Wait for a specified number of milliseconds, and then return control.
public void addPreprocessorDirective(String directive){ if (mPreprocessorDirectives == null) mPreprocessorDirectives=new ArrayList<String>(); mPreprocessorDirectives.add(directive); }
Add a preprocessor directive like #define, #extension, #version etc.
void processXFAFields(final PdfObject acroObj1,final PdfObjectReader currentPdfFile1,final PdfPageData pageData1){ throw new RuntimeException("This code (processXFAFields) should never be called"); }
empty implementation in non-XFA AcroRenderer
public String fetch(String url) throws IOException { return fetch(url,null,null); }
Allow to perform the HTTP operation using the same internal http client.
public void parseDDLInfo(){ for ( PlogLCRTag tag : rawTags) { switch (tag.id) { case PlogLCRTag.TAG_SQL_TEXT: this.SQLText=tag.valueString(); break; case PlogLCRTag.TAG_CURRENT_SCHEMA: this.currentSchema=tag.valueString(); break; default : } } }
Parse data for a DDL change
public PukKernel(double sigma,double omega){ setSigma(sigma); setOmega(omega); }
Creates a new PUK Kernel
@Override public String toString(){ return getDateStringOrEmptyString(); }
toString, This returns the last valid date in an ISO-8601 formatted string "uuuu-MM-dd". For any CE years that are between 0 and 9999 inclusive, the output will have a fixed length of 10 characters. Years before or after that range will output longer strings. If the last valid date is empty, this will return an empty s...
protected int index(int slice,int row,int column){ return this.offset + sliceOffsets[sliceZero + slice * sliceStride] + rowOffsets[rowZero + row * rowStride]+ columnOffsets[columnZero + column * columnStride]; }
Returns the position of the given coordinate within the (virtual or non-virtual) internal 1-dimensional array.
public static synchronized final boolean isInitialized(){ return Init.alreadyInitialized; }
Method isInitialized
public void initialize() throws IOException { CsvParserSettings parserSettings=new CsvParserSettings(); parserSettings.getFormat().setDelimiter(csvParserVo.getDelimiter().charAt(0)); parserSettings.setLineSeparatorDetectionEnabled(true); parserSettings.setMaxColumns(csvParserVo.getNumberOfColumns() + 10); par...
Below method will be used to initialize the the parser
public void test_ConstructorIF(){ Hashtable h=new java.util.Hashtable(10,0.5f); assertEquals("Created incorrect hashtable",0,h.size()); Hashtable empty=new Hashtable(0,0.75f); assertNull("Empty hashtable access",empty.get("nothing")); empty.put("something","here"); assertTrue("cannot get element",empty.get(...
java.util.Hashtable#Hashtable(int, float)
public void invDctInPlaceNxN(double[][] coeffs){ int u=0; int v=0; double two_over_sqrtncolsnrows=2.0 / Math.sqrt((double)this.N * this.M); for (u=0; u <= this.M - 1; u++) { invFctNoScale(coeffs[u]); } for (v=0; v <= this.N - 1; v++) { for (u=0; u <= this.M - 1; u++) { this.nxnTmp[u]=coeffs[u]...
Perform inverse DCT in place for N x N matrix
public void removePathPrefix(final int length){ final char[] a=new char[path.length - length]; System.arraycopy(path,length,a,0,a.length); path=a; }
Removes a prefix from the path of this node.
@RequestMapping(value="/posts",method=RequestMethod.POST,produces=MediaType.APPLICATION_JSON_VALUE) @Timed public ResponseEntity<PostDTO> createPost(@Valid @RequestBody PostDTO postDTO) throws URISyntaxException, JSONException { log.debug("REST request to save Post : {}",postDTO); if (postDTO.getId() != null) { ...
POST /posts -> Create a new post.
public static Pair<Edge,NaviEdge> convertEdge(final INaviEdge edge,final NaviNode sourceNode,final NaviNode targetNode,final Graph2D graph2D,final boolean adjustColors){ final ZyLabelContent content=ZyEdgeBuilder.buildContent(edge); final ZyEdgeRealizer<NaviEdge> realizer=new ZyEdgeRealizer<NaviEdge>(content,new CE...
Creates a graph node from a raw edge.
protected static final String addEscapes(String str){ StringBuffer retval=new StringBuffer(); char ch; for (int i=0; i < str.length(); i++) { switch (str.charAt(i)) { case 0: continue; case '\b': retval.append("\\b"); continue; case '\t': retval.append("\\t"); continue; case '\n': retval.append("\\n")...
Replaces unprintable characters by their espaced (or unicode escaped) equivalents in the given string
public boolean isCompleteParse(){ return ast.isCompleteParse(); }
Convenient shortcut to the owning EclipseAST object's isCompleteParse method.
@Override public boolean previous() throws SQLException { try { debugCodeCall("previous"); checkClosed(); return relative(-1); } catch ( Exception e) { throw logAndConvert(e); } }
Moves the cursor to the last row, or row before first row if the current position is the first row.
protected void sanityCheck(){ boolean err=false; Iterator it=edges.keySet().iterator(); while (it.hasNext()) { PurityNode src=(PurityNode)it.next(); Iterator itt=edges.get(src).iterator(); while (itt.hasNext()) { PurityEdge e=(PurityEdge)itt.next(); if (!src.equals(e.getSource())) { ...
Sanity check. Used internally for debugging!
public static <T,K,L extends List<T>>Consumer<Partition<T,K,L>> evictOldest(){ return null; }
Returns an evict determiner that evicts the oldest tuple.
TypePath(byte[] b,int offset){ this.b=b; this.offset=offset; }
Creates a new type path.
@Override @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED) public InstanceStatus notifyInstance(String instanceId,ProvisioningSettings settings,Properties properties) throws APPlatformException { LOGGER.info("notifyInstance({})",LogAndExceptionConverter.getLogText(instanceId,settings)); InstanceStatus ...
Does not carry out specific actions in this implementation and always returns <code>null</code>.
public static String generateScaleMarkers(int proteinLength,int maxNumScaleMarkers){ if (maxNumScaleMarkers < 2) { maxNumScaleMarkers=2; } int scale=calcScale(proteinLength,maxNumScaleMarkers); StringBuilder sb=new StringBuilder("0"); int index=0; int numRemaining=proteinLength; while (index <= protei...
Generate a string of comma-separated numbers that will be used to mark the scale of the match diagram.
@SuppressWarnings("unchecked") @Override public void eSet(int featureID,Object newValue){ switch (featureID) { case EipPackage.COMPOSITE_PROCESSOR__NAME: setName((String)newValue); return; case EipPackage.COMPOSITE_PROCESSOR__TO_CHANNELS: getToChannels().clear(); getToChannels().addAll((Collection<? extends Chann...
<!-- begin-user-doc --> <!-- end-user-doc -->
public MessageOnlyLogFilter(LogNode next){ mNext=next; }
Takes the "next" LogNode as a parameter, to simplify chaining.
public static boolean isCombatMove(final GameData data,final boolean doNotThrowErrorIfNotMoveDelegate){ final boolean isCombatMove; data.acquireReadLock(); try { final String prop=data.getSequence().getStep().getProperties().getProperty(GameStep.PROPERTY_combatMove); if (prop != null) { isCombatMove...
For various things related to movement validation.
public Set<E> elements(){ synchronized (this) { return new HashSet<E>(reverseIndex.keySet()); } }
Returns a new set of elements contained in this index.
private void testIncrementalBackupScriptForWindows(BackupInspector inspector) throws Exception { assertEquals(WINDOWS_COPY_FROM_1,inspector.getCopyFromForOplogFile(OPLOG_FILENAME_1)); assertEquals(WINDOWS_COPY_TO_1,inspector.getCopyToForOplogFile(OPLOG_FILENAME_1)); assertEquals(WINDOWS_COPY_FROM_2,inspector.getC...
Tests copy lines for windows.
private boolean isBigCounterpart(HTMLFont font){ if (size <= font.getSize()) { return false; } return (isSameFamily(font) && (style == font.getStyle())); }
Checks if the specified font is a big counterpart of this font.
@Override public <R>S3ManifestComparator<R> withKey(String key){ return new S3ManifestComparator<>(key,reader,writer,deleter,stringWriter); }
Create a new ManifestComparator with the same distributed map connection that targets a different key
public static Bitmap drawableToBitmap(Drawable drawable){ if (drawable instanceof BitmapDrawable) ((BitmapDrawable)drawable).getBitmap(); int width=drawable.getIntrinsicWidth(); int height=drawable.getIntrinsicHeight(); Bitmap bitmap=createBitmapSafely(width,height,Bitmap.Config.ARGB_8888,1); Canvas canvas=...
Drawable to Bitmap
@DSComment("From safe class list") @DSSafe(DSCat.SAFE_LIST) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 13:02:44.376 -0500",hash_original_method="178203A8041021E6C223472E0296E87B",hash_generated_method="4D7543BCA72C4F27D433358AB6CBC87A") static public void assertEquals(Object expec...
Asserts that two objects are equal. If they are not an AssertionFailedError is thrown.
public void visitAttribute(Attribute attr){ if (fv != null) { fv.visitAttribute(attr); } }
Visits a non standard attribute of the field.
public static <K,V>ImmutableListMultimap<K,V> of(K k1,V v1,K k2,V v2){ ImmutableListMultimap.Builder<K,V> builder=ImmutableListMultimap.builder(); builder.put(k1,v1); builder.put(k2,v2); return builder.build(); }
Returns an immutable multimap containing the given entries, in order.
public static Input composite(List<File> files){ if (files.size() == 0) return NullInput.INSTANCE; if (files.size() == 1) return new FileInput(files.get(0)); return new CompositeInput(multiple(files)); }
Creates and returns an input composed from the specified files altogether. The resulting input object returns the lines lines of the first file first, then the lines of the second file etc.
public double evaluate(){ if (!variables.isEmpty()) { throw new RuntimeException("variables " + variables + " are not set"); } Expression exp2=new Expression(exp); return exp2.evaluate(); }
Evaluates the result of the expression
private void updateProgress(int progress){ if (myHost != null && progress != previousProgress) { myHost.updateProgress(progress); } previousProgress=progress; }
Used to communicate a progress update between a plugin tool and the main Whitebox user interface.
@Override public Object eGet(int featureID,boolean resolve,boolean coreType){ switch (featureID) { case SGenPackage.GENERATOR_CONFIGURATION__CONFIGURATIONS: return getConfigurations(); } return super.eGet(featureID,resolve,coreType); }
<!-- begin-user-doc --> <!-- end-user-doc -->
public static byte[] encryptWithSession(Encrypter crypter,byte[] plaintext) throws KeyczarException { SessionCrypter session=new SessionCrypter(crypter); byte[] rawEncrypted=session.encrypt(plaintext); byte[][] input={session.getSessionMaterial(),rawEncrypted}; return org.keyczar.util.Util.lenPrefixPack(input);...
Encrypts plaintext with a new session key, which is encrypted using crypter. The encrypted session key and encrypted message are packed together using lenPrefixPack().
public static void assertFalse(boolean value){ if (verbose) { log("assertFalse(" + value + ")"); } assertBool(!value); }
Asserts that the given expression evaluates to false
private static void convertActivityToTranslucentAfterL(Activity activity){ try { Method getActivityOptions=Activity.class.getDeclaredMethod("getActivityOptions"); getActivityOptions.setAccessible(true); Object options=getActivityOptions.invoke(activity); Class<?>[] classes=Activity.class.getDeclaredCl...
Calling the convertToTranslucent method on platforms after Android 5.0
public static void print(byte x){ out.print(x); out.flush(); }
Prints a byte to standard output and flushes standard output.
protected KMLAbstractLatLonBoxType(String namespaceURI){ super(namespaceURI); }
Construct an instance.
public void componentMoved(ComponentEvent e){ }
This menu item listens to the status of its layer.
private Path toSecondary(Path path){ assert factory != null; assert secondaryUri != null; return convertPath(path,secondaryUri); }
Convert the given path to path acceptable by the secondary file system.
public Individual(double[] weights){ this.weights=weights; }
Creates a new individual by cloning the given values.
public void download2ExecuteLogic(ActionMapping mappings,ActionForm form,HttpServletRequest request,HttpServletResponse response){ DocumentoVitalPO documentoVital=(DocumentoVitalPO)getFromTemporalSession(request,DocumentosVitalesConstants.DOCUMENTO_VITAL_KEY); if (documentoVital != null) { try { download(...
Descarga el documento vital.
@Override public void toBytes(ByteBuf buf){ buf.writeInt(itemStacks.length); for ( ItemStack itemStack : itemStacks) { ByteBufUtils.writeItemStack(buf,itemStack); } }
Deconstruct your message into the supplied byte buffer
public final void update(String rosterGroup,String roadName,String roadNumber,String dccAddress,String mfg,String decoderMfgID,String decoderVersionID,String id){ Object selection=this.getSelectedItem(); if (log.isDebugEnabled()) { log.debug("Old selection: " + selection); log.debug("Old group: " + _group);...
Update the combo box with an arbitrary roster group, using new roster entry attributes.
private void updateProgress(int progress){ if (myHost != null && progress != previousProgress) { myHost.updateProgress(progress); } previousProgress=progress; }
Used to communicate a progress update between a plugin tool and the main Whitebox user interface.
private String convert() throws IOException { int i=r.read(); if (i != '{') { throw new IOException("Invalid RTF file"); } while ((i=r.read()) != -1) { char ch=(char)i; switch (ch) { case '{': if (inControlWord && controlWord.length() == 0) { sb.append('{'); controlWord.setLength(0...
Converts the RTF text read from this converter's <code>Reader</code> into plain text. It is the caller's responsibility to close the reader after this method is called.
public void incCqCount(){ this._stats.incInt(_cqCountId,1); }
Increments the "cqCount" stat.
public void deleteInstanceAt(int rowIndex){ ((DataTableModel)getModel()).deleteInstanceAt(mIndices[rowIndex]); }
deletes the instance at the given index
public final int numClasses(){ if (m_ClassIndex < 0) { throw new UnassignedClassException("Class index is negative (not set)!"); } if (!classAttribute().isNominal()) { return 1; } else { return classAttribute().numValues(); } }
Returns the number of class labels.
public boolean isBackground(){ return false; }
Whether this view is considered to be the background. This can for example return true for the root layout, such that marquee selection, and Select All, will not include it in marquee selection or select all operations.
public void paintSplitPaneDividerBackground(SynthContext context,Graphics g,int x,int y,int w,int h,int orientation){ paintSplitPaneDividerBackground(context,g,x,y,w,h); }
Paints the background of the divider of a split pane. This implementation invokes the method of the same name without the orientation.
private void mergeSOSNode(Node node) throws IIOInvalidTreeException { SOSMarkerSegment firstSOS=(SOSMarkerSegment)findMarkerSegment(SOSMarkerSegment.class,true); SOSMarkerSegment lastSOS=(SOSMarkerSegment)findMarkerSegment(SOSMarkerSegment.class,false); if (firstSOS != null) { if (firstSOS != lastSOS) { ...
Merge the given SOS node into the marker sequence. If there already exists a single SOS marker segment, then the values are updated from the node. If there are more than one existing SOS marker segments, then an IIOInvalidTreeException is thrown, as SOS segments cannot be merged into a set of progressive scans. If ther...
protected static void appendFile(IgfsImpl igfs,IgfsPath file,@Nullable byte[]... chunks) throws Exception { IgfsOutputStream os=null; try { os=igfs.append(file,false); writeFileChunks(os,chunks); } finally { U.closeQuiet(os); awaitFileClose(igfs,file); } }
Append to the file in the given IGFS provided data chunks.
@Override public void mouseEntered(MouseEvent evt){ delegate.mouseMoved(evt); }
Pass MouseEvent straight through to delegate
public Open(String itemType,int itemId){ super(); final ObjectNode item=objectMapper.createObjectNode(); switch (itemType) { case TYPE_PLAYLIST: item.put("playlistid",itemId); break; case TYPE_CHANNEL: item.put("channelid",itemId); break; case TYPE_RECORDING: item.put("recordingid",itemId); break; } addParame...
Starts playing a playlist or channel
public TupleSerializer(final IKeyBuilderFactory keyBuilderFactory){ super(keyBuilderFactory); }
Ctor when creating a new instance.
public void createWeekScenarioParAndUserAssignChange2() throws Exception { BillingIntegrationTestBase.setDateFactoryInstance("2013-02-01 00:00:00"); VOServiceDetails serviceDetails=serviceSetup.createPublishAndActivateMarketableService(basicSetup.getSupplierAdminKey(),"PARCHARGE_PU_WEEK_ASSIGN2",TestService.EXAMPLE...
A customer subscribes to a service and terminates the subscription within a billing period. The value of a parameter is changed several times. In addition the assigned user is deassigned in one time unit and reassigned with a different role in another time unit. Two parameter changes are done while the user is deassign...
public void writeExif(String jpegFileName,String exifOutFileName) throws FileNotFoundException, IOException { if (jpegFileName == null || exifOutFileName == null) { throw new IllegalArgumentException(NULL_ARGUMENT_STRING); } InputStream is=null; try { is=new FileInputStream(jpegFileName); writeExif(...
Writes the tags from this ExifInterface object into a jpeg file, removing prior exif tags.
@Override public T defaultCase(EObject object){ return null; }
Returns the result of interpreting the object as an instance of '<em>EObject</em>'. <!-- begin-user-doc --> This implementation returns null; returning a non-null result will terminate the switch, but this is the last case anyway. <!-- end-user-doc -->
public void closeContacts(EvolutionState state,int result){ if (result == EvolutionState.R_SUCCESS) { try { toServer.writeUTF(FOUND); toServer.flush(); } catch ( IOException e) { } } try { serverSocket.close(); } catch ( IOException e) { } state.output.message("Shutting dow...
Closes contacts with other processes, if that's what you're doing. Called at the end of an evolutionary run. result is either ec.EvolutionState.R_SUCCESS or ec.EvolutionState.R_FAILURE, indicating whether or not an ideal individual was found.
protected NumericLiteral(byte number){ this(number,XMLSchema.BYTE); }
Creates an xsd:byte typed litral with the specified value.
public Quaternionf rotateTo(float fromDirX,float fromDirY,float fromDirZ,float toDirX,float toDirY,float toDirZ){ return rotateTo(fromDirX,fromDirY,fromDirZ,toDirX,toDirY,toDirZ,this); }
Apply a rotation to <code>this</code> that rotates the <tt>fromDir</tt> vector to point along <tt>toDir</tt>. <p> Since there can be multiple possible rotations, this method chooses the one with the shortest arc. <p> If <code>Q</code> is <code>this</code> quaternion and <code>R</code> the quaternion representing the s...
public static void main(String[] args) throws Exception { for (int i=0; i < RETRIES; i++) { X.println(">>>"); X.println(">>> Executing single threaded attempt: " + i); X.println(">>>"); testBlockingQueue("single-threaded-linked-queue",new LinkedBlockingQueue<>()); testBlockingQueue("single-threade...
Main method.
public void extractAndCreateClientNonPerson(Client client,JsonCommand command){ final JsonElement clientNonPersonElement=this.fromApiJsonHelper.parse(command.jsonFragment(ClientApiConstants.clientNonPersonDetailsParamName)); if (clientNonPersonElement != null) { final String incorpNumber=this.fromApiJsonHelper....
This method extracts ClientNonPerson details from Client command and creates a new ClientNonPerson record
public void releaseInputStream() throws IOException { try { if (in != null) { try { in.done(); } catch ( RuntimeException e) { } in.registerRefs(); in.done(conn); } conn.releaseInputStream(); } finally { in=null; } }
Release the input stream, this would allow some transports to release the channel early.
@Override public boolean process(Set<? extends TypeElement> annotations,RoundEnvironment roundEnv){ boolean firstRound=false; for ( Element e : roundEnv.getRootElements()) { if (e.getSimpleName().contentEquals(TestClientCodeWrapper.class.getSimpleName())) firstRound=true; } if (firstRound) { try { ...
Processor used to trigger use of methods not normally used by javac.
public LayerDeclaration using(String layerName){ this.using.add(layerName); return this; }
Declare using layer.
public boolean isCodeAttribute(){ return false; }
Returns <tt>true</tt> if this type of attribute is a code attribute.
static ZoneOffset readOffset(DataInput in) throws IOException { int offsetByte=in.readByte(); return (offsetByte == 127 ? ZoneOffset.ofTotalSeconds(in.readInt()) : ZoneOffset.ofTotalSeconds(offsetByte * 900)); }
Reads the state from the stream.
@Util private static void removeRequestCookie(String name){ request.cookies.remove(name); }
Removes the session cookie from the request by setting the cookie value with "" and path with "/".
public static Location copyPosition(Location source,Location dest){ if (dest == null) { return null; } dest.setX(source.getX()); dest.setY(source.getY()); dest.setZ(source.getZ()); return dest; }
Copy the position contents (x,y,z) of one Location to another.
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:33:00.031 -0500",hash_original_method="93CFAAB8556EE96135ADFFE4D2689C29",hash_generated_method="E6F0C5AC03E54EF67D95CA417E603EAC") public void init(float density){ assert density > 0; mDisplayDensity=density; setDefaultZoomScale(...
Initialize both the default and actual zoom scale to the given density.
public long optLong(String key,long defaultValue){ try { return this.getLong(key); } catch ( Exception e) { return defaultValue; } }
Get an optional long value associated with a key, or the default if there is no such key or if the value is not a number. If the value is a string, an attempt will be made to evaluate it as a number.
public PreviousContext configureLoggingContext(String contextName){ return LoggingContext.forConnector("MySQL",serverName(),contextName); }
Configure the logger's Mapped Diagnostic Context (MDC) properties for the thread making this call.
public static final long classId(byte[] key,GeoTimeSerie gts){ return classId(key,gts.getName()); }
Compute the class Id of a Geo Time Serie instance.
public CipherParameters decrypt(byte[] in,int inOff,int inLen,int keyLen) throws IllegalArgumentException { if (!key.isPrivate()) { throw new IllegalArgumentException("Private key required for decryption"); } BigInteger n=key.getModulus(); BigInteger d=key.getExponent(); byte[] C=new byte[inLen]; System...
Decrypt an encapsulated session key.
public void threadFail(String reason){ threadFailed=true; fail(reason); }
Fail, also setting status to indicate current testcase should fail
public static Entry<? extends Transaction> findByType(final Integer type){ for ( final Entry<?> entry : ENTRIES) { if (entry.type == type) { return entry; } } throw new IllegalArgumentException(String.format("%d type is unknown",type)); }
Finds an entry given a transaction type.
public UnsupportedAudioFileException(String message){ super(message); }
Constructs a <code>UnsupportedAudioFileException</code> that has the specified detail message.
public static String parseFunction(String functionCall) throws FBSQLParseException { functionCall=functionCall.trim(); checkSyntax(functionCall); int parenthesisStart=functionCall.indexOf('('); return parenthesisStart != -1 ? functionCall.substring(0,parenthesisStart) : functionCall; }
Extract function name from the function call.
public void clearNotTaken(){ flags2&=~NOT_TAKEN; }
Clear this from being a guard operand from a not taken branch
public void write(AnnotationsWriter writer) throws IOException { writer.constValueIndex(getValue()); }
Writes the value.
public void addChainDownloadStartedEventListener(Executor executor,ChainDownloadStartedEventListener listener){ peersChainDownloadStartedEventListeners.add(new ListenerRegistration<ChainDownloadStartedEventListener>(checkNotNull(listener),executor)); for ( Peer peer : getConnectedPeers()) peer.addChainDownloadSt...
<p>Adds a listener that will be notified on the given executor when chain download starts.</p>
public static List<String> undoLocalFiles(final ServerContext context,final List<String> files){ final UndoCommand command=new UndoCommand(context,files); return command.runSynchronously(); }
This method undoes the list of local files passed in. This is a synchronous call so it should only be called on a background thread.