code
stringlengths
10
174k
nl
stringlengths
3
129k
private void appendAffix(StringBuffer buffer,String affix,boolean localized){ boolean needQuote; if (localized) { needQuote=affix.indexOf(symbols.getZeroDigit()) >= 0 || affix.indexOf(symbols.getGroupingSeparator()) >= 0 || affix.indexOf(symbols.getDecimalSeparator()) >= 0 || affix.indexOf(symbols.getPercent())...
Append an affix to the given StringBuffer, using quotes if there are special characters. Single quotes themselves must be escaped in either case.
private void signalNotFull(){ final ReentrantLock putLock=this.putLock; putLock.lock(); try { notFull.signal(); } finally { putLock.unlock(); } }
Signals a waiting put. Called only from take/poll.
protected void removeTiposExecuteLogic(ActionMapping mapping,ActionForm form,HttpServletRequest request,HttpServletResponse response){ TipoDocumentoVitalForm frm=(TipoDocumentoVitalForm)form; ResultadoRegistrosVO res=getGestionDocumentosVitalesBI(request).deleteTiposDocumentosVitales(frm.getIdsSeleccionados()); i...
Elimina los tipos de documentos vitales seleccionados.
public static void close(final JGraphTab graphTab){ final List<CGraphPanel> graphs=new ArrayList<CGraphPanel>(); for (int i=0; i < graphTab.getTabCount(); i++) { graphs.add(((CGraphPanel)graphTab.getComponentAt(i))); } close(SwingUtilities.getWindowAncestor(graphTab),graphs); }
Closes a graph window. Before closing the graph window, the user is asked whether he wants to save modified graphs.
@Override protected EClass eStaticClass(){ return UmplePackage.eINSTANCE.getBoolExpr_(); }
<!-- begin-user-doc --> <!-- end-user-doc -->
public void reload(SolrCore core,SolrIndexSearcher searcher) throws IOException { LOG.info("reload()"); if (dictionary == null && storeDir != null) { FileInputStream is=new FileInputStream(new File(storeDir,factory.storeFileName())); try { if (lookup.load(is)) { return; } } finally...
Reloads the underlying Lucene Suggester
public void updatePrestamo(final PrestamoVO prestamo){ final String qual=new StringBuffer().append(" WHERE ").append(DBUtils.generateEQTokenField(CAMPO_ID,prestamo.getId())).toString(); updateVO(qual,TABLE_NAME,COLUMN_DEFINITIONS,prestamo); }
Actualiza un prestamo.
public void ignorableWhitespace(char ch[],int start,int length) throws SAXException { if (contentHandler != null) { contentHandler.ignorableWhitespace(ch,start,length); } }
Filter an ignorable whitespace event.
private String prepareTagRestriction() throws ObjectNotFoundException { String tagFilter=""; String filter=listCriteria.getFilter(); if (filter != null && filter.trim().length() > 0) { filter=filter.trim(); String[] parts=filter.split(",",2); String tagLocale=locale; if (parts.length == 2) { ...
Creates sql statement for where clause, to filter for a specific tag.
private static int availableCapacity(Buffer buffer){ return buffer.capacity() - buffer.limit(); }
Returns the number of elements between the limit and capacity.
public Minutes toStandardMinutes(){ return Minutes.minutes(FieldUtils.safeMultiply(getValue(),DateTimeConstants.MINUTES_PER_WEEK)); }
Converts this period in weeks to a period in minutes assuming a 7 day week, 24 hour day and 60 minute hour. <p> This method allows you to convert between different types of period. However to achieve this it makes the assumption that all weeks are 7 days long, all days are 24 hours long and all hours are 60 minutes lon...
protected static String bitsToHash(BitSet bits){ StringBuilder hash=new StringBuilder(); for (int i=0; i < bits.size(); i+=5) { int value=0; for (int j=0; j < 5; j++) { if (bits.get(i + j)) { value|=(0x1 << j); } } hash.insert(0,HASH_CHARS_ARRAY[value]); } return hash.toStrin...
Encodes an interleaved set of bits to its base-32 geohash.
public static void tenantsListJson(){ List<OpenStackTenantsDataTable.OpenStackTenant> tenants=Lists.newArrayList(); for ( OpenStackTenantParam tenant : OpenStackTenantsUtils.getOpenStackTenants()) { tenants.add(new OpenStackTenantsDataTable.OpenStackTenant(tenant)); } renderJSON(DataTablesSupport.createJSO...
Gets the list of tenants.
@NonNull protected Set<ActEvent> loadEventData(@NonNull Context context){ throw new UnsupportedOperationException(); }
Will be called when there is need for data deserialization.
public SQLTransactionRollbackException(Throwable cause){ super(cause); }
Creates an SQLTransactionRollbackException object. The Reason string is set to the null if cause == null or cause.toString() if cause!=null,and the cause Throwable object is set to the given cause Throwable object.
public static void stopInstances(VerificationHost host,Compute compute,String projectId,String zoneId,List<String> instanceNames,int batchSize,long interval) throws Throwable { if (batchSize <= 0) { throw new Exception("batch size cannot be less or equal to zero."); } if (interval <= 0) { throw new Except...
Stop the instances of specified project and zone.
private boolean doAkismet(final AkismetAction action,final Resource commentResource){ final Akismet akismet=new Akismet(HttpClients.createDefault()); final AkismetComment comment=getAkismetComment(commentResource); akismet.setApiKey(getApiKey()); akismet.setApiConsumer(getDomainName()); boolean result=false; ...
Perform Akismet actions
public Search sort(SortField... fields){ sort=add(sort,fields); return this; }
Sets the sorting fields.
public Code(MethodSymbol meth,boolean fatcode,Position.LineMap lineMap,boolean varDebugInfo,StackMapFormat stackMap,boolean debugCode,CRTable crt,Symtab syms,Types types,Pool pool){ this.meth=meth; this.fatcode=fatcode; this.lineMap=lineMap; this.lineDebugInfo=lineMap != null; this.varDebugInfo=varDebugInfo; ...
Construct a code object, given the settings of the fatcode, debugging info switches and the CharacterRangeTable.
public RouteLocation addLocation(Location location){ _IdNumber++; _sequenceNum++; String id=_id + "r" + Integer.toString(_IdNumber); log.debug("adding new location to ({}) id: {}",getName(),id); RouteLocation rl=new RouteLocation(id,location); rl.setSequenceId(_sequenceNum); Integer old=Integer.valueOf(_r...
Adds a location to the end of this route
public final void writeBoolean(boolean[] pa,int start,int n) throws IOException { for (int i=0; i < n; i++) { writeBoolean(pa[start + i]); } }
Write an array of booleans
@Override public int[] search(ASEvaluation ASEval,Instances data) throws Exception { m_totalEvals=0; if (!(ASEval instanceof SubsetEvaluator)) { throw new Exception(ASEval.getClass().getName() + " is not a " + "Subset evaluator!"); } if (ASEval instanceof UnsupervisedSubsetEvaluator) { m_hasClass=false;...
Searches the attribute subset space by best first search
public void initialize(){ if (connectionSource == null) { throw new IllegalStateException("dataSource was not set on " + getClass().getSimpleName()); } }
If you are using the Spring type wiring, this should be called after all of the set methods.
private void testEJB(String serverName,InitialContext context){ System.out.println(); System.out.println("Connecting to EJB server ..."); try { System.out.println(" Name=" + Status.JNDI_NAME); Status sta=(Status)context.lookup(Status.JNDI_NAME); System.out.println(" .. bean created"); System.out...
Test EJB
protected void rotateLocations(Position terrainPosition,List<LatLon> locations){ LatLon center=LatLon.getCenter(this.getWwd().getModel().getGlobe(),locations); Angle previousHeading=LatLon.greatCircleAzimuth(center,this.getPreviousPosition()); Angle deltaHeading=LatLon.greatCircleAzimuth(center,terrainPosition).s...
Rotates a shape's locations.
public static void deleteFileIfExistsWithRetry(Path path) throws IOException { try { if (Files.exists(path)) deleteFileWithRetry0(path); } catch ( InterruptedException x) { throw new IOException("Interrupted while deleting.",x); } }
Deletes a file, retrying if necessary. No exception thrown if file doesn't exist.
public final void removeAllHelperTextColorIds(@NonNull final int... resourceIds){ ensureNotNull(resourceIds,"The array may not be null"); for ( int resourceId : resourceIds) { removeHelperTextColorId(resourceId); } }
Removes all helper text colors, which are contained by a specific array.
public void fatal(Object message,Throwable exception){ log(Level.SEVERE,String.valueOf(message),exception); }
Logs a message with <code>java.util.logging.Level.SEVERE</code>.
public Surface begin(){ target.bind(); beginBatch(batch); return this; }
Starts a series of drawing commands to this surface.
public void initializeAndInitEditor() throws EditorInitException { reset(Scheduler.get()); ArgumentCaptor<EditorInitCallback> callBackCaptor=ArgumentCaptor.forClass(EditorInitCallback.class); ArgumentCaptor<WidgetInitializedCallback> widgetInitializedCallbackCaptor=ArgumentCaptor.forClass(WidgetInitializedCallbac...
This method initialize TextEditorPresenter for testing
public static UndertowFraction createDefaultAndEnableAJPFraction(){ return createDefaultFraction().enableAJP(); }
Create the default HTTP and AJP fraction.
public double dist(Vec x){ return dist(x,k.getQueryInfo(x)); }
Computes the Euclidean distance between this kernel point and the given input in the kernel space
public boolean isQuestion(){ return (type != null) && type.isQuestion(); }
Determine if the Expression consists of question words.
private int drain(byte[] b,int off,int len){ int remaining=Math.min(len,byteBuffer.remaining()); byteBuffer.get(b,off,remaining); return remaining; }
Copy as much of the byte buffer into the output array as possible, returning the (positive) number of characters copied.
default String renderValue(Generator gen,M model){ return ifelse(model.getValue(),null,""); }
Render the value of the model if it exists, else an empty string.
private static void intitializeHelpSet(Extension ext){ HelpBroker hb=ExtensionHelp.getHelpBroker(); if (hb == null) { return; } URL helpSetUrl=getExtensionHelpSetUrl(ext); if (helpSetUrl != null) { try { log.debug("Load help files for extension '" + ext.getName() + "' and merge with core help.")...
If there are help files within the extension, they are loaded and merged with existing help files if the core help was correctly loaded.
public void resetComponents(){ editDistribution=Boolean.FALSE; distNameTextField.clear(); distNameTextField.removeStyleName("v-textfield-error"); distVersionTextField.clear(); distVersionTextField.removeStyleName(SPUIStyleDefinitions.SP_TEXTFIELD_LAYOUT_ERROR_HIGHTLIGHT); distsetTypeNameComboBox.removeStyle...
clear all the fields.
public void startNewStream(Reader reader,boolean isInternalEntity){ StackedReader oldReader=this.currentReader; this.readers.push(this.currentReader); this.currentReader=new StackedReader(); if (isInternalEntity) { this.currentReader.lineReader=null; this.currentReader.pbReader=new PushbackReader(reader...
Starts a new stream from a Java reader. The new stream is used temporary to read data from. If that stream is exhausted, control returns to the parent stream.
public EColor fill(){ return self; }
get the filled representation of this object. <b>modifying this struct will modify the object that created it </b>
public void showDialog(Container container){ this.container=container; view.showDialog(); view.setAction(appContext.getDevMachine().getWsAgentBaseUrl() + "/project/upload/zipfolder" + container.getLocation()); }
Show dialog.
private static void bindLogger(InjectorImpl injector){ Key<Logger> key=Key.get(Logger.class); LoggerFactory loggerFactory=new LoggerFactory(); injector.state.putBinding(key,new ProviderInstanceBindingImpl<>(injector,key,SourceProvider.UNKNOWN_SOURCE,loggerFactory,Scoping.UNSCOPED,loggerFactory,ImmutableSet.<Injec...
The Logger is a special case because it knows the injection point of the injected member. It's the only binding that does this.
String prevNodesSerial(){ if (prevNodes.isEmpty()) return EMPTY; StringBuilder sb=new StringBuilder(); for ( Node<T> n : prevNodes) { sb.append(n.stringID).append(":"); } sb.setLength(sb.length() - 1); return sb.toString(); }
Returns the "prev nodes" as a string suitable for serializing.
@Override public boolean csConsistNeedsSeperateAddress(){ return false; }
Does a CS consist require a separate consist address?
public void writeFieldStop() throws TException { writeByteDirect(TType.STOP); }
Write the STOP symbol so we know there are no more fields in this struct.
private void addVolumesToConsistencyGroup(JobContext jobContext,List<URI> volumesIds) throws DeviceControllerException { if (volumesIds == null || volumesIds.isEmpty()) { return; } try { final DbClient dbClient=jobContext.getDbClient(); final List<Volume> volumes=dbClient.queryObject(Volume.class,volu...
This method will redirect to the appropriate SmiStorageDevice object to make the call to add the volumes to the consistency group. This operation should be done after the volumes has been successfully created (i.e., there's a deviceNativeId for the volumes).
@Override public String toString(){ if (eIsProxy()) return super.toString(); StringBuffer result=new StringBuffer(super.toString()); result.append(" (type: "); result.append(type); result.append(')'); return result.toString(); }
<!-- begin-user-doc --> <!-- end-user-doc -->
public static String leakInfo(Context context,HeapDump heapDump,AnalysisResult result){ PackageManager packageManager=context.getPackageManager(); String packageName=context.getPackageName(); PackageInfo packageInfo; try { packageInfo=packageManager.getPackageInfo(packageName,0); } catch ( PackageManage...
Returns a string representation of the result of a heap analysis.
private void _perform_version_check(InstalledApp app,String request_source){ Log.v(MainActivity.TAG,"Launching version check for " + app.get_display_name()); UpdateSource source=UpdateSource.get_source(app); if (source == null) { Log.v(MainActivity.TAG,"Could not find an update source for "); return; } ...
Performs the version check. The app's update source is queried (and detected if none is specified), then the regular expressions of the update source are applied and the app is updated with the new information.
public static <T,R>Cases<T,R> ofList(final List<Case<T,R>> cases){ return new Cases<>(cases.stream().map(null).reduce(ConsPStack.empty(),null),true); }
Construct a Cases instance from a list of Pattern Matching Cases Will execute sequentially when Match is called.
@Override protected void onSaveInstanceState(Bundle outState){ outState.putParcelable("location",myLocationOverlay.getLocation()); outState.putBoolean("tracking_mode",mTrackingMode); outState.putParcelable("start",startPoint); outState.putParcelable("destination",destinationPoint); outState.putParcelableArray...
callback to store activity status before a restart (orientation change for instance)
public final int indexOfLabel(int label){ if (label >= labelToIndex.size()) { return -1; } else { return labelToIndex.get(label); } }
Gets the index of the first item in the list with the given label, if any.
public void resetTimer(){ timer=0; }
Sets the timer to 0.
public static boolean endsWith(String str,char suffix){ return str != null && str.length() > 0 && str.charAt(str.length() - 1) == suffix; }
Tests if this string ends with the specified suffix.
public void addRPZone(final String region,final StendhalRPZone zone){ super.addRPZone(zone); if (!regionMap.containsKey(region)) { regionMap.put(region,new HashSet<StendhalRPZone>()); } regionMap.get(region).add(zone); }
Adds a zone to a certain region in this world
public Reader(){ setRPClass("sign"); put(Actions.TYPE,"sign"); put(Actions.ACTION,Actions.READ); put("class","transparent"); setResistance(0); }
Creates a Reader.
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:32:41.959 -0500",hash_original_method="DCDD00DDB3DA5C0826A1E2E2E5E3FA67",hash_generated_method="308B89FD1FC1D75CE1456429332393A4") public void pause(){ if (!mTimerPaused) { mTimerPaused=true; mHasDeferredTimers=false; } }
Pause all timers.
public GridTestSafeThreadFactory(String threadName,boolean interruptAll){ this.threadName=threadName; this.interruptAll=interruptAll; }
Constructs threads factory for safe test-threads management.
public boolean hasNext(){ currentToken=nextToken(); return currentToken != null; }
Iterator method to know if another token follows, or if we've reached the end of the stream.
public static UniformPair<Set<MultiKey<EventBean>>> flattenBatchJoin(List<UniformPair<Set<MultiKey<EventBean>>>> joinPostings){ if (joinPostings.isEmpty()) { return new UniformPair<Set<MultiKey<EventBean>>>(null,null); } if (joinPostings.size() == 1) { return new UniformPair<Set<MultiKey<EventBean>>>(join...
Flattens a list of pairs of join result sets.
public void testPreferencesChange() throws Exception { PreferencesUtils.setString(context,R.string.stats_rate_key,PreferencesUtils.STATS_RATE_DEFAULT); PreferencesUtils.setString(context,R.string.stats_units_key,PreferencesUtils.STATS_UNITS_DEFAULT); PreferencesUtils.setInt(context,R.string.recording_gps_accuracy...
Tests preferences change.
@Override protected void finalize() throws Throwable { try { synchronized (buf) { if (buf.isOpen()) { close(); if (log.isInfoEnabled()) log.info("Finalized temp store"); } } } catch ( Throwable t) { log.error("Ignoring: " + t,t); } super.finalize(); }
Closes the store if it gets GCd.
public TimeField(String name){ super(name,Field.Type.TIME); }
Creates a new TimeField with the given name.
@SuppressWarnings("unchecked") public static <E>Iterator<E> emptyIterator(){ return (Iterator<E>)INSTANCE; }
Get a typed empty iterator instance.
private static byte char64(char x){ if ((int)x < 0 || (int)x > index_64.length) return -1; return index_64[(int)x]; }
Look up the 3 bits base64-encoded by the specified character, range-checking againt conversion table
public static byte[] compress(String str) throws IOException { if (str == null || str.length() == 0) { return null; } ByteArrayOutputStream out=new ByteArrayOutputStream(); GZIPOutputStream gzip=new GZIPOutputStream(out); gzip.write(str.getBytes("UTF-8")); gzip.close(); byte[] outBytes=out.toByteArray...
Compresses a given String. It is encoded using ISO-8859-1, So any decompression of the compressed string should also use ISO-8859-1
synchronized void removeDeadNotifier(NotifierArgs info){ if (debug) { System.err.println("EventSupport.removeDeadNotifier: " + info.name); } notifiers.remove(info); }
package private; Called by NamingEventNotifier to remove itself when it encounters a NamingException.
private void loadNonLocalGateways() throws XMPPException { if (roster != null) { for ( RosterEntry entry : roster.getEntries()) { if (entry.getUser().equalsIgnoreCase(StringUtils.parseServer(entry.getUser())) && !entry.getUser().contains(connection.getHost())) { discoverGateway(entry.getUser()); ...
Loads all getways which are in the users roster, but are not supplied by the users server
public GlassFishInjectionProvider(){ theSwitch=Switch.getSwitch(); invokeMgr=theSwitch.getInvocationManager(); injectionManager=theSwitch.getInjectionManager(); }
<p>Constructs a new <code>GlassFishInjectionProvider</code> instance.</p>
public RestoreSnapshotRequest repository(String repository){ this.repository=repository; return this; }
Sets repository name
public boolean hasSubscribers(){ boolean nonEmpty=false; if (!closed) { synchronized (this) { for (BufferedSubscription<T> b=clients; b != null; ) { BufferedSubscription<T> next=b.next; if (b.isDisabled()) { b.next=null; b=clients=next; } else { nonEmpty=...
Returns true if this publisher has any subscribers.
public void dispose(){ m_graphSynchronizer.dispose(); }
Frees allocated resources.
protected int decrypt(int b,long fp){ b=b ^ (cryptoKeys[((int)(fp)) % 128]); b=(((b & 0x0F) << 4) | ((b & 0xF0) >> 4)); return b; }
Decrypt a single byte.
@Override public HttpClient retrieve(){ HttpClientOptions options; if (config != null) { options=new HttpClientOptions(config); } else { options=new HttpClientOptions(); } options.setDefaultPort(location.getPort()).setDefaultHost(location.getHost()); if (location.isSsl()) { options.setSsl(true)...
Gets a HTTP client to access the service.
public final SSLEngine createSSLEngine(String peerHost,int peerPort){ try { return contextSpi.engineCreateSSLEngine(peerHost,peerPort); } catch ( AbstractMethodError e) { UnsupportedOperationException unsup=new UnsupportedOperationException("Provider: " + getProvider() + " does not support this operation"...
Creates a new <code>SSLEngine</code> using this context using advisory peer information. <P> Applications using this factory method are providing hints for an internal session reuse strategy. <P> Some cipher suites (such as Kerberos) require remote hostname information, in which case peerHost needs to be specified.
public boolean changePrivilege(String user,int newPrivilege){ if (user == null) return false; String sql2="update " + APPUSER_TABLENAME + " set USER_PRIVILEGE=? where USERNAME=?"; Connection conn=null; PreparedStatement pstmt=null; try { conn=getConnection(); AppUser appUser=this.retrieveUserInfo(co...
Update user privilege
public static long[] hashToLongs(long datum,long seed){ long[] data={datum}; return hash(data,seed); }
Hash a long and long seed.
private void publishTemplateFile() throws Exception { InputStream is=null; OutputStream os=null; try { is=getClass().getClassLoader().getResourceAsStream(LOG4J_TEMPLATE); if (is == null) { logger.warn("Template file not found: " + LOG4J_TEMPLATE); } else { os=new FileOutputStream(logFile)...
Copy template file to default destination
public static boolean isWritable(final String file,final boolean makeDirs){ if (TextUtils.isEmpty(file)) { Log.e(FileUtils.class,"isWritable(): Null or Empty parameter given"); return false; } return isWritable(new File(file),makeDirs); }
Method checks if file could be written/deleted or created. Method will create path/mkdirs if makeDirs set to true and file's path doesn't exists.
public Boolean isWaitForHeartbeat(){ return waitForHeartbeat; }
Gets the value of the waitForHeartbeat property.
public void writeChar(int v){ try { dos.writeChar(v); } catch ( Exception e) { handleException(e); } }
Writes a <code>char</code> to the underlying output stream as a 2-byte value, high byte first.
public boolean remove(Object obj){ int index=index(obj); if (index >= 0) { removeAt(index); return true; } return false; }
Removes an existing object from the set.
public static String parseReleaseWithBuildNumber(){ ManifestParser manifest=new ManifestParser(); manifest.parse(); return manifest.getReleaseWithBuildNumber(); }
Convenience method for a single line call to get a representative string of release name, version and build number.
public static String stripOffLeadingZeros(final String s){ final int lastNullIdx=s.lastIndexOf('\0'); return lastNullIdx < 0 ? s : s.substring(lastNullIdx + 1); }
Strips off leading zero characters from the specified string. <p> Example: <code>"\0\0S2"</code> => <code>"S2"</code> </p>
public static void showOperationError(final Project project,final String operation,final String message){ Messages.showErrorDialog(project,message,GitBundle.message("error.occurred.during",operation)); }
Show error associated with the specified operation
@Singleton @Provides ObserveOn provideObserveOn(){ return (null); }
Provides the Scheduler which will be use for any Observable at the domain layer to observeOn
public void testRead3() throws Exception { byte[] data=new byte[]{-127,-100,-50,-10,-1,0,1,10,50,127}; TestInputStream tis=new TestInputStream(data); CipherInputStream cis=new CipherInputStream(tis,new NullCipher()); int expected=data.length; byte[] result=new byte[expected]; int skip=2; int ind=skip; c...
read(byte[] b, int off, int len) method testing. Tests that method returns the correct value (related to the InputStream), that it discards bytes in the case of null buffer, and that it returns -1 at the end of stream.
public Object trunc(InstanceScope scope,Object v){ if (v == null) return null; if (v instanceof List) { List<?> elems=(List<?>)v; if (elems.size() <= 1) return null; return elems.subList(0,elems.size() - 1); } v=convertAnythingIteratableToIterator(scope,v); if (v instanceof Iterator) { L...
Return all but the last element. <code>trunc(<i>x</i>)==null</code> if <code><i>x</i></code> is single-valued.
@Override public void run(){ amIActive=true; ShapeType shapeType; if (args.length <= 0) { showFeedback("Plugin parameters have not been set."); return; } String outputFile=args[0]; String shapeTypeStr=args[1].toLowerCase(); if (outputFile.isEmpty() || shapeTypeStr.isEmpty()) { showFeedback("On...
Used to execute this plugin tool.
@Override public void nextTile(){ if ((x+=TILE_SIZE) >= cache.bboxX1) { x=cache.bboxX0; y+=TILE_SIZE; if (y < cache.bboxY1) { this.rdr.endRendering(y); } } }
Skips the current tile and moves on to the next tile. Either this method, or the getAlpha() method should be called once per tile, but not both.
@SuppressWarnings("unchecked") final public void release(){ if (parent == null) return; if (--n == 0) { n=batchSize; synchronized (parent) { parent.add((T)this); } clear(); } parent.locks[threadHash].unlock(); }
Release the counters.
public boolean isUninstall(){ Object oo=get_Value(COLUMNNAME_Uninstall); if (oo != null) { if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); return "Y".equals(oo); } return false; }
Get Uninstall.
@Override public Object clone() throws CloneNotSupportedException { PiePlot clone=(PiePlot)super.clone(); clone.sectionPaintMap=(PaintMap)this.sectionPaintMap.clone(); clone.sectionOutlinePaintMap=(PaintMap)this.sectionOutlinePaintMap.clone(); clone.sectionOutlineStrokeMap=(StrokeMap)this.sectionOutlineStrokeMa...
Returns a clone of the plot.
private Map<String,BoundryWisePropUsgeBean> initPropTypeMap(Map<String,BoundryWisePropUsgeBean> propTypeMap){ LOGGER.debug("Entered into initPropTypeMap method"); LOGGER.debug("PropTypeMap : " + (propTypeMap != null ? propTypeMap : ZERO)); BoundryWisePropUsgeBean bean=new BoundryWisePropUsgeBean(); bean.setArrD...
Called locally to initialize the propTypeMap properties(arrDmd, currDmd, avAmt, totalDemand and propCount) to 0
@Override public int start_production(){ return 1; }
Indicates start production.
public OpenIntDoubleHashMap(int initialCapacity,double minLoadFactor,double maxLoadFactor){ setUp(initialCapacity,minLoadFactor,maxLoadFactor); }
Constructs an empty map with the specified initial capacity and the specified minimum and maximum load factor.
public void keyPressed(KeyEvent e){ }
KeyListener - nop
private ElementKey<?,?> calculateKey(ElementKey<?,?> key,ElementKey<?,?> sourceKey){ Class<?> keyType=key.getElementType(); Class<? extends Element> sourceType=sourceKey.getElementType(); if (keyType != sourceType && keyType.isAssignableFrom(sourceType)) { key=ElementKey.of(key.getId(),key.getDatatype(),sourc...
Calculates the actual key that should be used for adding an element. This uses the ID and datatype of the key, but if the element types are in the same type hierarchy the narrowest element type is used.
private boolean bothLinksHaveSameLinkStats(Link linkA,Link linkB){ boolean bothLinksHaveSameLinkStats=true; if (!linkA.getAllowedModes().equals(linkB.getAllowedModes())) { bothLinksHaveSameLinkStats=false; } if (linkA.getFreespeed() != linkB.getFreespeed()) { bothLinksHaveSameLinkStats=false; } if (...
Compare link attributes. Return whether they are the same or not.
private void updateDB(Map<Integer,List<Group>> parsedGroupsByType,List<Rule> parsedRules) throws AdeException { RulesQueryImpl.modifyRules(parsedRules); for ( GroupType groupType : GroupType.values()) { int groupTypeVal=groupType.getValue(); List<Group> groups=parsedGroupsByType.get(groupTypeVal); Grou...
Method for updating the database. Makes calls to methods in RulesQueryImpl for modifying the RULES table and the GROUPS table.
public static CloudFileWriter from(Snapshot snapshot,FileConfig fileConfig){ return new CloudFileWriter(FileDecrypter.create(),snapshot.keyBagManager(),SnapshotDirectory.from(snapshot,fileConfig),fileConfig.setLastModifiedTimestamp()); }
Returns a new instance.