code
stringlengths
10
174k
nl
stringlengths
3
129k
public static <K extends Comparable<K>,V extends Comparable<V>>Map<K,V> createByValueSortedMap(Map<K,V> map){ return new ByValueSortingTreeMap<>(ByValueComparator.create(map)); }
Construct new sorted by values map using given map and natural order.
public Job configure(boolean isSecured,String metaStoreUris,String principal,String dbConnectionString,String dbUser,String dbPassword,String inputDatabase,String inputTable,String inputFilter,String storageEngine,String distributeBy,int numReducer,int commitSize,String[] anonFields,String exportSalt) throws Exception ...
This function takes all required parameters and returns a configured job object.
public final boolean isCoalescentOnly(){ for (int i=0; i < intervalCount; i++) { if (getCoalescentEvents(i) < 1) return false; } return true; }
Checks whether this set of coalescent intervals coalescent only (i.e. whether is has exactly one or more coalescent event in each subsequent interval)
public Location(){ super(); }
Generates a default location
private static void sendRegistrationMessage(Instantiator s){ InternalDistributedSystem system=InternalDistributedSystem.getAnyInstance(); if (system != null) { RegistrationMessage m=null; if (s.getContext() == null) { m=new RegistrationMessage(s); } else { m=new RegistrationContextMessage(s...
If we are connected to a distributed system, send a message to other members telling them about a newly-registered instantiator.
public FileBinary(File file,String fileName){ this(file,fileName,null); }
File binary.
@Override protected boolean usesClusterTable(){ return true; }
Does this attack use the cluster hit table? necessary to determine how Aero damage should be applied
public static void main(String... a) throws Exception { TestBase.createCaller().init().test(); }
Run just this test.
public T peek(){ if (heap.size() > 0) return heap.elementAt(TOP); else return null; }
Returns the element at the top of the heap; does not alter the heap.
public Element selectElementMatchingXPath(String xpath,Element toSearch){ List<Element> results=selectElementsMatchingXPath(xpath,toSearch); if (results.isEmpty()) { throw new ElementNotFoundException(xpath,toSearch); } Element match=results.get(0); return match; }
The following will search the given element for the specified XPath and return any node that matches.
protected void addValuePropertyDescriptor(Object object){ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),getResourceLocator(),getString("_UI_FloatLiteral_value_feature"),getString("_UI_PropertyDescriptor_description","_UI_FloatLiteral_value...
This adds a property descriptor for the Value feature. <!-- begin-user-doc --> <!-- end-user-doc -->
public void testPutLast() throws InterruptedException { LinkedBlockingDeque q=new LinkedBlockingDeque(SIZE); for (int i=0; i < SIZE; ++i) { Integer I=new Integer(i); q.putLast(I); assertTrue(q.contains(I)); } assertEquals(0,q.remainingCapacity()); }
all elements successfully putLast are contained
@Override protected void initViews(Bundle savedInstanceState){ this.showBack(); this.setTitle(this.getString(R.string.about_title)); GlideUtils.displayCircleHeader(this.aboutAvatarIv,R.mipmap.ic_camnter); }
Initialize the view in the layout
@Override protected void initViews(Bundle savedInstanceState){ this.easyRV=(EasyRecyclerView)this.findViewById(R.id.recycler_view); }
Initialize the view in the layout
public int pauseDownload(long... ids){ initPauseMethod(); if (pauseDownload == null) { return -1; } try { return ((Integer)pauseDownload.invoke(downloadManager,ids)).intValue(); } catch ( Exception e) { e.printStackTrace(); } return -1; }
pause download
public void abortSharing() throws RcsPermissionDeniedException, RcsGenericException { try { mSharingInf.abortSharing(); } catch ( Exception e) { RcsPermissionDeniedException.assertException(e); throw new RcsGenericException(e); } }
Aborts the sharing
public void write(final PrintStream stream){ stream.print("time\ttime\tdepartures_all\tarrivals_all\tstuck_all\ten-route_all"); for ( String legMode : this.data.keySet()) { stream.print("\tdepartures_" + legMode + "\tarrivals_"+ legMode+ "\tstuck_"+ legMode+ "\ten-route_"+ legMode); } stream.print("\n"); ...
Writes the gathered data tab-separated into a text stream.
@Override public void run(){ amIActive=true; String inputHeader=null; String outputHeader=null; int row, col, x, y; double z; float progress=0; int a; double sum; int[] dX; int[] dY; double[] weights; int numPixelsInFilter; boolean absValuesOnly=false; boolean reflectAtBorders=true; String...
Used to execute this plugin tool.
public void resetLabels(){ AbstractInsnNode insn=first; while (insn != null) { if (insn instanceof LabelNode) { ((LabelNode)insn).resetLabel(); } insn=insn.next; } }
Reset all labels in the instruction list. This method should be called before reusing same instructions list between several <code>ClassWriter</code>s.
@Override public String globalInfo(){ return "Alphabetic string tokenizer, tokens are to be formed only from " + "contiguous alphabetic sequences."; }
Returns a string describing the stemmer
public SAXSVGDocumentFactory(String parser){ super(SVGDOMImplementation.getDOMImplementation(),parser); }
Creates a new SVGDocumentFactory object.
void startOptional(){ parsed.add(currentParsed().copy()); }
Starts the parsing of an optional segment of the input.
public boolean similar(Object other){ try { if (!(other instanceof JSONObject)) { return false; } Set<String> set=this.keySet(); if (!set.equals(((JSONObject)other).keySet())) { return false; } Iterator<String> iterator=set.iterator(); while (iterator.hasNext()) { String ...
Determine if two JSONObjects are similar. They must contain the same set of names which must be associated with similar values.
public VelocityContext(Map context,Context innerContext){ super(innerContext); this.context=(context == null ? new HashMap() : context); }
Initializes internal storage (never to <code>null</code>), and inner context.
public PersistentCookieStore(Context context){ cookiePrefs=context.getSharedPreferences(COOKIE_PREFS,0); cookies=new HashMap<String,ConcurrentHashMap<String,HttpCookie>>(); Map<String,?> prefsMap=cookiePrefs.getAll(); for ( Map.Entry<String,?> entry : prefsMap.entrySet()) { if (((String)entry.getValue()) !...
Construct a persistent cookie store.
public ECPoint multiply(ECPoint p,BigInteger k,PreCompInfo preCompInfo){ WNafPreCompInfo wnafPreCompInfo; if ((preCompInfo != null) && (preCompInfo instanceof WNafPreCompInfo)) { wnafPreCompInfo=(WNafPreCompInfo)preCompInfo; } else { wnafPreCompInfo=new WNafPreCompInfo(); } int m=k.bitLength(); byt...
Multiplies <code>this</code> by an integer <code>k</code> using the Window NAF method.
public GossipSeed(InetSocketAddress endpoint){ this(endpoint,""); }
Creates a new instance with the specified endpoint and empty host header.
public AbstractSimpleState(S id,Collection<E> deferred,Collection<? extends Action<S,E>> entryActions,Collection<? extends Action<S,E>> exitActions){ this(id,deferred,entryActions,exitActions,null); }
Instantiates a new abstract simple state.
public static Result dashboard(){ long now=System.currentTimeMillis(); long finishDate=now - DAY; if (now - _lastFetch > FETCH_DELAY) { _numJobsAnalyzed=AppResult.find.where().gt(AppResult.TABLE.FINISH_TIME,finishDate).findRowCount(); _numJobsCritical=AppResult.find.where().gt(AppResult.TABLE.FINISH_TIME,...
Controls the Home page of Dr. Elephant. Displays the latest jobs which were analysed in the last 24 hours.
public static LongChunks createExtensibleIndex(){ return new LongChunks(0,20); }
Create extensible long array
public final boolean equals(Object obj){ if (obj == this) { return true; } if (!(obj instanceof QName)) { return false; } if ((namespaceURI == ((QName)obj).namespaceURI) && (localPart == ((QName)obj).localPart)) { return true; } return false; }
Tests this QName for equality with another object. <p> If the given object is not a QName or is null then this method returns <tt>false</tt>. <p> For two QNames to be considered equal requires that both localPart and namespaceURI must be equal. This method uses <code>String.equals</code> to check equality of localPart ...
public SVGBuilder readFromAsset(AssetManager assetMngr,String svgPath) throws IOException { this.data=assetMngr.open(svgPath); return this; }
Parse SVG data from an Android application asset.
private void populateNewParents(){ boolean isReturn=true; if (isReturn) return; resetDBObjects(DBObject_Table.class); s_logger.log(Level.CONFIG,""); s_logger.log(Level.CONFIG,"populateNewParents",new Object[]{m_objectTypes,m_direction}); m_counterUpd=new Integer(0); m_totalUpd=new Integer(0); for (Ite...
populate newly created parent tables
public void onMissedCallVerificationStarted(){ if (ENABLED) { trackOpt("Started Missed Call Verification",null); } }
Send the event that the missed call verification was started
public boolean isSaveInHistoric(){ Object oo=get_Value(COLUMNNAME_IsSaveInHistoric); if (oo != null) { if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); return "Y".equals(oo); } return false; }
Get Save In Historic.
public static void sendMessage(SearchLoadAndWriteProcessor processor,String regionName,Object key,Object aCallbackArgument,InternalDistributedMember recipient,int timeoutMs,int ttl,int idleTime){ NetLoadRequestMessage msg=new NetLoadRequestMessage(); msg.initialize(processor,regionName,key,aCallbackArgument,timeout...
Using a new or pooled message instance, create and send the request for object value to the specified node.
public CloudSqlDao(final String url) throws SQLException { dataSource.setUrl(url); final String createTableSql="CREATE TABLE IF NOT EXISTS books4 ( id INT NOT NULL " + "AUTO_INCREMENT, author VARCHAR(255), createdBy VARCHAR(255), createdById VARCHAR(255), " + "description VARCHAR(255), publishedDate VARCHAR(255), t...
A data access object for Bookshelf using a Google Cloud SQL server for storage.
@SuppressWarnings("unchecked") public Object clone() throws CloneNotSupportedException { PivotDataset clone=(PivotDataset)super.clone(); clone.data=(List<IndicatorSeries>)ObjectUtilities.deepClone(this.data); return clone; }
Returns a clone of this instance.
private void showInView(IMarker marker){ BugCollectionAndInstance bci=marker == null ? null : MarkerUtil.findBugCollectionAndInstanceForMarker(marker); setContent(bci); }
Show the details of a FindBugs marker in the view. Brings the view to the foreground.
public static boolean equal(Object a,Object b){ return a == b || (a != null && a.equals(b)); }
Returns true if two possibly-null objects are equal.
public static void f(String tag,String msg){ if (sLevel > LEVEL_FATAL) { return; } Log.wtf(tag,msg); }
Send a FATAL ERROR log message
public AcceptLanguage acceptLanguage(){ return acceptLanguage; }
Gets the accept language.
private void validateRSetsRemoved(List<Long> resetIDsToValidate,ConsistencyGroupUID cgToValidate,List<String> volumeWWNs) throws RecoverPointException { try { String cgName=functionalAPI.getGroupName(cgToValidate); logger.info(String.format("Validating that all requested RSets have been removed from RP CG [%s...
Validate that the RSet(s) has been removed from the RP system by calling out to get all RSets for the CG and ensuring the one(s) we are trying to delete is gone. If we still see the RSet(s) being returned, wait and try again until max attempts is reached.
public static StateListDrawable btnSelector(float radius,int normalColor,int pressColor,int postion){ StateListDrawable bg=new StateListDrawable(); Drawable normal=null; Drawable pressed=null; if (postion == 0) { normal=cornerDrawable(normalColor,new float[]{0,0,0,0,0,0,radius,radius}); pressed=cornerDr...
set btn selector with corner drawable for special position
public void reset() throws IOException { m_structure=null; m_Buffer=null; setRetrieval(NONE); if ((m_File != null) && (new File(m_File)).isFile()) { setFile(new File(m_File)); } else if ((m_URL != null) && !m_URL.equals("http://")) { setURL(m_URL); } }
Resets the Loader ready to read a new data set.
public void clear(){ root=null; size=0; }
Remove all elements from the tree
public void removeJob(String jobId){ if (jobMap != null) { jobMap.remove(jobId); iterator=jobMap.values().iterator(); } }
This method removes the job from the map
public static GeohashCellQuery.Builder geoHashCellQuery(String name,String geohash){ return new GeohashCellQuery.Builder(name,geohash); }
A filter based on a bounding box defined by geohash. The field this filter is applied to must have <code>{&quot;type&quot;:&quot;geo_point&quot;, &quot;geohash&quot;:true}</code> to work.
public byte receiveOneByte(){ Log.d(TAG,"receiveOneByte() entrance"); try { acquireLock(); mServerSocket.receive(mReceivePacket); Log.d(TAG,"receive: " + (0 + mReceivePacket.getData()[0])); return mReceivePacket.getData()[0]; } catch ( IOException e) { e.printStackTrace(); } return Byte....
Receive one byte from the port and convert it into String
public static void makeDir(String pathString) throws IOException { makeDir(org.eclipse.core.runtime.Path.fromOSString(pathString)); }
Creates the named directory, including any needed parent directories.
public String toQuoted(){ return '\"' + toHuman() + '\"'; }
Gets the value as a human-oriented string, surrounded by double quotes.
public void forEachSubtract(Allocation ain,Allocation aout){ blend(35,ain,aout); }
Sets dst = max(dst - src, 0.0)
public DefaultRetryPolicy(){ this(DEFAULT_TIMEOUT_MS,DEFAULT_MAX_RETRIES,DEFAULT_BACKOFF_MULT); }
Constructs a new retry policy using the default timeouts.
private static Object run(String expr,Map<String,Object> variables){ StellarProcessor processor=new StellarProcessor(); Object ret=processor.parse(expr,null,StellarFunctions.FUNCTION_RESOLVER(),Context.EMPTY_CONTEXT()); byte[] raw=SerDeUtils.toBytes(ret); Object actual=SerDeUtils.fromBytes(raw,Object.class); ...
Runs a Stellar expression.
public boolean isValidFooterPartition(){ return ((this.footer_partition.equals(this.this_partition)) && (this.body_offset == 0) && (this.body_SID == 0)); }
Checks if this is a valid footer partition.
@Override public boolean dispatchPopulateAccessibilityEvent(AccessibilityEvent event){ if (event.getEventType() == AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED) { event.getText().clear(); int flags=DateUtils.FORMAT_SHOW_DATE | DateUtils.FORMAT_SHOW_YEAR | DateUtils.FORMAT_SHOW_WEEKDAY; String dateString=D...
Announce the currently-selected date when launched.
public static Border createEmptyBorder(int top,int left,int bottom,int right){ return new EmptyBorder(top,left,bottom,right); }
Creates an empty border that takes up space but which does no drawing, specifying the width of the top, left, bottom, and right sides.
public BasicArchImpl(){ _id=Defs.NULL_ID; _name=""; }
Construye un objeto de la clase.
public static String of(byte[] bytes){ if (bytes == null) { return null; } try { return UTF_8.newDecoder().decode(ByteBuffer.wrap(bytes)).toString(); } catch ( CharacterCodingException e) { return toHex(bytes); } }
Try to decode the bytes as UTF-8 string, and converted to HEX string if the bytes cannot be decoded, which probably means the bytes are binary data
public BCH_63_16_11(){ super(11); }
BCH( 63,16,11) decoder
public void resolvePending(){ Chain x=pendingJumps; pendingJumps=null; resolve(x,cp); }
Resolve any pending jumps.
public void click(ReadOnlyVector3 loc){ if (currentIndex < 0) { addWaypoint(loc,-1); } else { addWaypoint(loc,currentIndex + 1); currentIndex++; } }
The user has clicked in the scene. Add a way point.
double[] performRegression(ExampleSet exampleSet,Attribute[] usedAttributes,Attribute label,double ridge) throws UndefinedParameterError, ProcessStoppedException { Matrix independent=null; Matrix dependent=null; double[] weights=null; if (usedAttributes.length > 0) { independent=new Matrix(exampleSet.size()...
Calculate a linear regression only from the selected attributes. The method returns the calculated coefficients.
public Object[] toArray(){ return monitors.toArray(); }
Dumps monitors out as an array. Order is retained.
public void receiveStoreAndForwardNotificationSessionInvitation(TerminatingStoreAndForwardOneToOneChatNotificationSession session){ if (sLogger.isActivated()) { sLogger.debug("Handle event S&F notification session invitation"); } mChatService.receiveOneToOneChatInvitation(session); }
Handle store and forward notification session invitation
public DividedDateTimeField(RemainderDateTimeField remainderField,DateTimeFieldType type){ super(remainderField.getWrappedField(),type); int divisor=iDivisor=remainderField.iDivisor; iDurationField=remainderField.iRangeField; DateTimeField field=getWrappedField(); int i=field.getMinimumValue(); int min=(i >...
Construct a DividedDateTimeField that compliments the given RemainderDateTimeField.
public boolean isServerFullyStarted(){ return serverStarted; }
Wait before the server is fully started. This is workaround, because connections right on startup are not injected by ProtocolLib
public AboutPanel(SwingSet2 swingset){ this.swingset=swingset; aboutimage=swingset.createImageIcon("About.jpg","AboutBox.accessible_description"); setOpaque(false); }
Instantiates a new about panel.
public Repositories(String url) throws JAXBException { _dsDispatcher=new DSDispatcher(); _uriBuilder=new UriBuilder(); List<String> _matrixParamSet; _matrixParamSet=_uriBuilder.addPathSegment(url); _matrixParamSet=_uriBuilder.addPathSegment("repositories"); _templateAndMatrixParameterValues=new HashMap<Stri...
Create new instance
public void showProgress(){ hideRecycler(); if (mEmptyId != 0) mEmpty.setVisibility(View.INVISIBLE); mProgress.setVisibility(View.VISIBLE); }
Show the progressbar
public Object runSafely(Catbert.FastStack stack) throws Exception { return Sage.durFormatPrettyWithSeconds(getLong(stack)); }
Returns a formatted duration string according to SageTV's default duration formating, seconds is the most detailed resolution of this format
public String typeString(String id,boolean abbrev,boolean ret){ String s=null; switch (typeCode) { case TC_NULL: s="null"; break; case TC_VOID: s="void"; break; case TC_BOOLEAN: s="boolean"; break; case TC_BYTE: s="byte"; break; case TC_CHAR: s="char"; break; case TC_SHORT: s="short"; break; case TC_INT: s="int...
Convert a Type to a string, if abbrev is true class names are not fully qualified, if ret is true the return type is included.
public void testSinglePartitionWithThreeStatementPattern(){ final StatementPatternNode spn1=stmtPatternWithVar("x1"); final StatementPatternNode spn2=stmtPatternWithVar("x2"); final StatementPatternNode spn3Opt=stmtPatternWithVarOptional("x3"); final List<IGroupMemberNode> nodes=new ArrayList<IGroupMemberNode>(...
Test partition with three statement patterns, where the last one is optional.
public void cleanup(){ XDropTargetEventProcessor.reset(); if (targetXWindow != null) { notifyProtocolListener(targetXWindow,0,0,DnDConstants.ACTION_NONE,null,MouseEvent.MOUSE_EXITED); } if (sourceWindow != 0) { XToolkit.awtLock(); try { XErrorHandlerUtil.WITH_XERROR_HANDLER(XErrorHandler.Ignor...
Reset the state of the object.
public static void main(String[] args){ JFrame frame=new JFrame(TreeDemo.class.getAnnotation(DemoProperties.class).value()); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.getContentPane().add(new TreeDemo()); frame.setPreferredSize(new Dimension(800,600)); frame.pack(); frame.setLocationRelati...
main method allows us to run as a standalone demo.
public void analogWrite(int pin,int value){ if (!isConnected()) { onError(OneSheeldError.DEVICE_NOT_CONNECTED); return; } else if (isUpdatingFirmware()) { onError(OneSheeldError.FIRMWARE_UPDATE_IN_PROGRESS); return; } if (isPinDebuggingEnabled) Log.i("Device " + this.name + ": Analog write ...
Analog write to a specific pin.
public StackedXYAreaRenderer2(XYToolTipGenerator labelGenerator,XYURLGenerator urlGenerator){ super(labelGenerator,urlGenerator); this.roundXCoordinates=true; }
Constructs a new renderer.
@Override protected void addArgument(Object argument){ getOwner().addObject(argument); }
Adds the argument to the list of readed objects.
public static void sendPushMessageAsync(String token,String body,String deviceKey,boolean production,String googleAuthKey,String iosCertificateURL,String iosCertificatePassword){ NetworkManager.getInstance().addToQueue(createPushMessage(token,body,production,googleAuthKey,iosCertificateURL,iosCertificatePassword,"","...
Sends a push message and returns true if server delivery succeeded, notice that the push message isn't guaranteed to reach all devices. This method uses the new push servers
public void notifyHorizontalEdgeReached(int startX,int finalX,int overX){ mScrollerX.notifyEdgeReached(startX,finalX,overX); }
Notify the scroller that we've reached a horizontal boundary. Normally the information to handle this will already be known when the animation is started, such as in a call to one of the fling functions. However there are cases where this cannot be known in advance. This function will transition the current motion and ...
private void checkSortMissingFunction(final String field,final String low,final String high){ assertU(adoc("id","0")); assertU(adoc("id","1",field,low)); assertU(adoc("id","2",field,high)); assertU(commit()); assertQ(req("q","*:*","fl","e:exists(" + field + ")","sort","id asc"),"//result/doc[1]/bool[@name='e'...
function query based on missing
public TextView renderTextView(Context context){ Settings settings=new Settings(context); String textSize=settings.getTextSize(); TextView canvas=new TextView(context); canvas.setAutoLinkMask(Linkify.ALL); canvas.setLinksClickable(true); canvas.setLinkTextColor(COLOR_BLUE); canvas.setText(this.render(cont...
Render message as text view
@DSComment("constructor") @DSBan(DSCat.DEFAULT_MODIFIER) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:33:36.407 -0500",hash_original_method="DB07395F523937B25016D60988A66D69",hash_generated_method="DB07395F523937B25016D60988A66D69") Bundle(Parcel parcelledData){ readFromParcel(...
Constructs a Bundle whose data is stored as a Parcel. The data will be unparcelled on first contact, using the assigned ClassLoader.
protected ST(){ if (STGroup.trackCreationEvents) { if (debugState == null) debugState=new ST.DebugState(); debugState.newSTEvent=new ConstructionEvent(); } }
Used by group creation routine, not by users
@Override public String validate(Player player,RPAction action,ActionData data){ String playerName=action.get(targetAttribute); Player targetPlayer=SingletonRepository.getRuleProcessor().getPlayer(playerName); final String reply=targetPlayer.getIgnore(player.getName()); if (reply == null) { return null; }...
validates an RPAction.
public static Typeface ostrichDashed(Context context){ return FontSourceProcessor.process(R.raw.ostrich_dashed,context); }
Ostrich-Dashed font face
public static boolean compareResults(SolrServer controlServer,SolrServer cloudServer) throws SolrServerException { return compareResults(controlServer,cloudServer,null,null); }
Compares the results of the control and cloud clients.
private void saveConfigurationFiles(List<String> configurationFiles,String handleId,StartRequest request){ int i=0; if (configurationFiles == null || configurationFiles.size() == 0) { return; } for ( String filename : configurationFiles) { InputStream inputStream=request.getFile("configurationFileData_...
Save configuration files to the workspace.
public boolean next() throws SQLException { if (cursorPos < 0 || cursorPos >= numRows + 1) { throw new SQLException(resBundle.handleGetObject("cachedrowsetimpl.invalidcp").toString()); } boolean ret=this.internalNext(); notifyCursorMoved(); return ret; }
Moves the cursor down one row from its current position and returns <code>true</code> if the new cursor position is a valid row. The cursor for a new <code>ResultSet</code> object is initially positioned before the first row. The first call to the method <code>next</code> moves the cursor to the first row, making it th...
public void paintText(SynthContext ss,Graphics g,String text,Rectangle bounds,int mnemonicIndex){ paintText(ss,g,text,bounds.x,bounds.y,mnemonicIndex); }
Paints text at the specified location. This will not attempt to render the text as html nor will it offset by the insets of the component.
public void push(float value) throws IOException { print("push",new String[]{"float " + value}); }
Description of the Method
public void initFinish(){ if (DisplayLogic == null) DisplayLogic=""; if (DefaultValue == null) DefaultValue=""; if (FieldGroup == null) FieldGroup=""; if (FieldGroupType == null) FieldGroupType=""; if (Description == null) Description=""; if (Help == null) Help=""; if (Callout == null) Callo...
Validate Fields and create LookupInfo if required
public void replace(int offset,int length,View[] views){ super.replace(offset,length,views); invalidateGrid(); }
Change the child views. This is implemented to provide the superclass behavior and invalidate the grid so that rows and columns will be recalculated.
protected WifiP2pServiceInfo(List<String> queryList){ if (queryList == null) { throw new IllegalArgumentException("query list cannot be null"); } mQueryList=queryList; }
This is only used in subclass.
public void add(String key,Tool item,int index){ int orientation=getOrientation(); boolean hOrient=orientation == SwingConstants.HORIZONTAL; item.setOrientation(orientation); Container face=item.getFace(); if (face != null) { face.addComponentListener(this); items.put(key.intern(),item); if (autoS...
Add an item to the tool bar.
public Builder to(Date to){ this.to=to; return this; }
Sets the 'to' date.
public void writeRawVarint64(long value) throws IOException { while (true) { if ((value & ~0x7FL) == 0) { writeRawByte((int)value); return; } else { writeRawByte(((int)value & 0x7F) | 0x80); value>>>=7; } } }
Encode and write a varint.
public HttpRecoverableException(){ super(); }
Creates a new HttpRecoverableException with a <tt>null</tt> detail message.
public Object runSafely(Catbert.FastStack stack) throws Exception { Object o=stack.pop(); if (o instanceof MetaImage) { Object src=((MetaImage)o).getSource(); if (src instanceof java.io.File) return src; else return null; } return null; }
Returns the file path that a MetaImage was loaded from. Since not all MetaImage objects come from file paths, this will return null for any non-file based images.
public static String randomRealisticUnicodeString(Random r,int minLength,int maxLength){ final int end=nextInt(r,minLength,maxLength); final int block=r.nextInt(blockStarts.length); StringBuilder sb=new StringBuilder(); for (int i=0; i < end; i++) sb.appendCodePoint(nextInt(r,blockStarts[block],blockEnds[bloc...
Returns random string of length between min and max codepoints, all codepoints within the same unicode block.