code
stringlengths
10
174k
nl
stringlengths
3
129k
public List<UserMappingParam> prepareUserMappings(String openstackId){ AuthnProvider provider=getKeystoneProvider(); List<UserMappingParam> userMappings=new ArrayList<>(); List<String> values=new ArrayList<>(); values.add(openstackId); List<UserMappingAttributeParam> attributes=new ArrayList<>(); attributes...
Prepares userMappings with OpenStack Tenant ID for CoprHD Tenant.
@Override public int compare(PrintsRawMatch o1,PrintsRawMatch o2){ int comparison=o1.getSequenceIdentifier().compareTo(o2.getSequenceIdentifier()); if (comparison == 0) { if (o1.getEvalue() < o2.getEvalue()) comparison=-1; else if (o1.getEvalue() > o2.getEvalue()) comparison=1; } if (comparison...
This comparator is CRITICAL to the working of PRINTS post-processing, so it has been defined here rather than being the 'natural ordering' of PrintsRawMatch objects so it is not accidentally modified 'out of context'. Sorts the raw matches by: evalue (best first) model accession motif number (ascending) location start ...
public UncheckedExecutionException(@Nullable String message,@Nullable Throwable cause){ super(message,cause); }
Creates a new instance with the given detail message and cause.
public SQLProcessor(Delegator delegator,GenericHelperInfo helperInfo,Connection connection){ this.delegator=delegator; this.helperInfo=helperInfo; this._connection=connection; if (_connection != null) { _manualTX=false; } }
Construct an object with an connection given. The connection will not be closed by this SQLProcessor, but may be by some other.
private static String printClusterStats(Clusterer clusterer,String fileName) throws Exception { StringBuffer text=new StringBuffer(); int i=0; int cnum; double loglk=0.0; int cc=clusterer.numberOfClusters(); double[] instanceStats=new double[cc]; int unclusteredInstances=0; if (fileName.length() != 0) {...
Print the cluster statistics for either the training or the testing data.
@Override protected void doGet(HttpServletRequest request,HttpServletResponse response){ processGetRequest(request,response); }
Handles the HTTP <code>GET</code> method.
public DropDownTriangle(UpDirection upState,boolean down,final Window parent){ this(upState,down,"","",parent); }
Creates an unlabeled drop down triangle pointing either left or right in the "up" state and starting either "up" or down.
private void showFeedback(String message){ if (myHost != null) { myHost.showFeedback(message); } else { System.out.println(message); } }
Used to communicate feedback pop-up messages between a plugin tool and the main Whitebox user-interface.
public static void checkArgument(boolean expression,@Nullable Object errorMessage){ if (!expression) { throw new IllegalArgumentException(String.valueOf(errorMessage)); } }
Ensures the truth of an expression involving one or more parameters to the calling method.
@Override public String toString(){ StringBuilder sb=new StringBuilder(); sb.append("["); sb.append(getAgentLocation()); sb.append(", "); sb.append(getLocationState()); sb.append("]"); return sb.toString(); }
Return string representation of this percept.
default B addIcon(final MapIcon icon){ this.meta().addIcon(icon); return this.getBuilder(); }
Adds new map icon to this meta.
private void updateCities(WheelView city,String cities[][],int index){ ArrayWheelAdapter<String> adapter=new ArrayWheelAdapter<String>(this,cities[index]); adapter.setTextSize(18); city.setViewAdapter(adapter); city.setCurrentItem(cities[index].length / 2); }
Updates the city wheel
public ActionEvent(Command source,Component sourceComponent,int x,int y){ this.source=source; this.sourceComponent=sourceComponent; this.keyEvent=x; this.y=y; this.trigger=Type.Command; }
Creates a new instance of ActionEvent for a command
public WordDataReader(){ isTrainReading=false; }
Instantiates a new word data reader.
@Override public String toString(){ if (isLoaded()) { return String.format("Database '%s' [%d projects, %d modules]",getDescription(),getProjects().size(),getModules().size()); } else { return String.format("Database '%s' [Unloaded]",getDescription()); } }
Returns the string representation of the database.
@Override public void onCreate(Bundle savedInstanceState){ super.onCreate(savedInstanceState); setRetainInstance(true); }
Hook method called when a new instance of Fragment is created.
private void validatePartitionKey(final String partitionKey){ if (partitionKey == null) { throw new IllegalArgumentException("Partition key cannot be null"); } if (partitionKey.length() < PARTITION_KEY_MIN_LENGTH || partitionKey.length() > PARTITION_KEY_MAX_LENGTH) { throw new IllegalArgumentException("In...
Validate the partition key of an input Kinesis user record.
public String toValue(){ return value; }
Returns the value used in the XML.
public <T>void addEntry(Class<T> resource,RegistryEntry<? extends T> registryEntry){ resources.put(resource,registryEntry); logger.debug("Added resource {} to ResourceRegistry",resource.getName()); }
Adds a new resource definition to a registry.
public void preSerialize(){ if (selectedMap == null || maps.get(selectedMap) == null) { return; } for ( Route r : maps.get(selectedMap).getRoutes()) { r.preSerialize(); } }
Called prior to serialization to load the serializable data structure.
public BusinessObjectDefinitionEntity createBusinessObjectDefinition(){ String businessObjectDefinitionName="BusObjDefTest" + AbstractDaoTest.getRandomSuffix(); BusinessObjectDefinitionEntity businessObjectDefinitionEntity=new BusinessObjectDefinitionEntity(); businessObjectDefinitionEntity.setNamespace(namespace...
Creates and persists a new business object definition.
public static <T>T withObjectStreams(Socket socket,@ClosureParams(value=SimpleType.class,options={"java.io.ObjectInputStream","java.io.ObjectOutputStream"}) Closure<T> closure) throws IOException { InputStream input=socket.getInputStream(); OutputStream output=socket.getOutputStream(); ObjectOutputStream oos=new ...
Creates an InputObjectStream and an OutputObjectStream from a Socket, and passes them to the closure. The streams will be closed after the closure returns, even if an exception is thrown.
private Object[] createItem(RegularTimePeriod t,int dir,int force){ return new Object[]{new Long(t.getMiddleMillisecond()),new Integer(dir),new Integer(force)}; }
Creates an array representing one item in a series.
@DSComment("Private Method") @DSBan(DSCat.PRIVATE_METHOD) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:33:41.831 -0500",hash_original_method="3246A0B1468E43E22E475A6EAB25C98D",hash_generated_method="F89B5B48E6D65164DE427C517F844F7A") private boolean isClosed(){ return !mFD.vali...
Checks whether the memory file has been closed.
public static byte[] convertHexStringToBytes(String hexString){ return convertHexStringToBytes(hexString,0,hexString.length()); }
Convert the hex string to bytes.
public CipherParameters encrypt(byte[] out,int outOff,int keyLen) throws IllegalArgumentException { if (key.isPrivate()) { throw new IllegalArgumentException("Public key required for encryption"); } BigInteger n=key.getModulus(); BigInteger e=key.getExponent(); BigInteger r=BigIntegers.createRandomInRange...
Generate and encapsulate a random session key.
public int isNullable(int column) throws SQLException { if (!getField(column).isNotNull()) { return java.sql.ResultSetMetaData.columnNullable; } return java.sql.ResultSetMetaData.columnNoNulls; }
Can you put a NULL in this column?
public List<CompoundCurve3D> parseString(String pathString){ mPreviousPoint=new Vector3(); mStartPoint=new Vector3(); mPreviousControlPoint=new Vector3(); return pathStringToLine(pathString); }
Parses an SVG Path string
private void createRefreshJob(){ this.refreshJob=doCreateRefreshJob(); this.refreshJob.setSystem(true); }
Create the refresh job for the receiver.
public static byte[] createAndWriteBeanClass(String fqcn,List<TupleSchemaRegistry.SQLFieldInfo> fieldList) throws IOException, JSONException { return createAndWriteBeanClass(fqcn,fieldList,null); }
Creates a class from give field information and returns byte array of compiled class.
public static StringBuilder formatTo(StringBuilder buf,long[] d,String sep){ if (d == null) { return buf.append("null"); } if (d.length == 0) { return buf; } buf.append(d[0]); for (int i=1; i < d.length; i++) { buf.append(sep); buf.append(d[i]); } return buf; }
Formats the long array d.
public static int width(int typecode){ switch (typecode) { case LONGcode: case DOUBLEcode: return 2; case VOIDcode: return 0; default : return 1; } }
The width in bytes of objects of the type.
protected String toString(TrieNode node){ StringBuffer result; int i; StringBuffer indentation; result=new StringBuffer(); indentation=new StringBuffer(); for (i=0; i < node.getLevel(); i++) { indentation.append(" | "); } result.append(indentation.toString()); if (node.getChar() == null) { res...
returns the node as String
public PcMax(IndependenceTest independenceTest){ if (independenceTest == null) { throw new NullPointerException(); } this.independenceTest=independenceTest; }
Constructs a new PC search using the given independence test as oracle.
public static void main(String[] args) throws Exception { DirectProvider tp=new DirectProvider(); Topology t=tp.newTopology("PeriodicSource"); Random r=new Random(); TStream<Double> gaussian=t.poll(null,1,TimeUnit.SECONDS); gaussian=gaussian.peek(null); gaussian=gaussian.filter(null); TStream<String> gs=g...
Shows polling a data source to periodically obtain a value. Polls a random number generator for a new value every second and then prints out the raw value and a filtered and transformed stream.
private VisorIgfsSamplingStateJob(IgniteBiTuple<String,Boolean> arg,boolean debug){ super(arg,debug); }
Create job with given argument.
boolean shouldUseOldSyntax(){ return isJsLibrary; }
Returns if the import statement for this file should use the old 'goog:' namespace syntax
public ViewPropertyAnimator translationYBy(float value){ animatePropertyBy(TRANSLATION_Y,value); return this; }
This method will cause the View's <code>translationY</code> property to be animated by the specified value. Animations already running on the property will be canceled.
@Override public List<GetLineageByInstanceExecInfo> execute(String[] params){ List<GetLineageByInstanceExecInfo> lineageByInstanceExecInfos; try { CommandLine commandLine=getCommandLine(params,PARAMS_STRUCTURE); String eid=commandLine.getOptionValue("instance-exec-id"); LOGGER.debug("Instance exec id i...
This method gets list of all processes present in batch_consump_queue and archive_consump_queue linked to a particular instance exec id.
private boolean noTranspile(N4JSResource eResource){ ResourceType resourceType=ResourceType.getResourceType(eResource); return resourceType.equals(ResourceType.JS); }
Depending on the File-Extension determines if there should be any transformation.
public void runTest() throws Throwable { Document doc; Node element; Element ownerElement; Element parentElement; NodeList elementList; String ownerElementName; Attr attr; Node removedChild; NamedNodeMap nodeMap; String nullNS=null; doc=(Document)load("staffNS",true); elementList=doc.getElements...
Runs the test case.
public static String fromTag(LongTag tag){ return String.valueOf(tag.getValue()) + MojangsonToken.LONG_SUFFIX; }
Creates a Mojangson string from the given Long Tag.
protected void clearEvents(){ sCISafe.clearEvents(); sCIUser.clearEvents(); }
This method resets the incoming events (time events included).
protected void EMIT_Lea(Instruction s,RegisterOperand result,MemoryOperand mo){ if ((mo.index == null) && mo.disp.isZero()) { if (VM.VerifyAssertions) opt_assert(mo.scale == 0 && mo.base != null); EMIT(MIR_Move.mutate(s,IA32_MOV,result,mo.base)); } else if ((mo.index == null) && result.similar(mo.bas...
Create the MIR LEA instruction performing a few simplifications if possible
public boolean isDeltaCRLIndicatorEnabled(){ return deltaCRLIndicator; }
Returns if this selector must match CRLs with the delta CRL indicator extension set. Defaults to <code>false</code>.
public static byte[] calculateSignature(byte[] random,byte[] privateKey,byte[] message){ byte[] result=new byte[64]; if (curve_sigs.curve25519_sign(SHA512Provider,result,privateKey,message,message.length,random) != 0) { throw new IllegalArgumentException("Message exceeds max length!"); } return result; }
Calculating signature
@Override public IBinder onBind(Intent intent){ return mOperationsBinder; }
Provides a binder object that clients can use to perform actions on the queue of operations, except the addition of new operations.
public void reset(){ super.reset(); H1=0x67452301; H2=0xefcdab89; H3=0x98badcfe; H4=0x10325476; xOff=0; for (int i=0; i != X.length; i++) { X[i]=0; } }
reset the chaining variables to the IV values.
public void notifyPickedUp(Id<Carrier> carrierId,Id<Person> driverId,CarrierShipment shipment,double time){ processEvent(new ShipmentPickedUpEvent(carrierId,driverId,shipment,time)); }
Informs the world that a shipment has been picked up. <p>Is called by carrierAgent in charge of picking up shipments. It throws an ShipmentPickedupEvent which can be listened to with an ShipmentPickedUpListener.
public void putUTF8String(String s) throws IOException { writeString(s,DerValue.tag_UTF8String,"UTF8"); }
Marshals a string as a DER encoded UTF8String.
@Override public void write(byte[] b){ checkNotNull(b); }
Discards the specified byte array.
public static String readUserIPAddress(final PwmRequest pwmRequest) throws PwmUnrecoverableException { final Configuration config=pwmRequest.getConfig(); final boolean useXForwardedFor=config != null && config.readSettingAsBoolean(PwmSetting.USE_X_FORWARDED_FOR_HEADER); String userIP=""; if (useXForwardedFor) {...
Returns the IP address of the user. If there is an X-Forwarded-For header in the request, that address will be used. Otherwise, the source address of the request is used.
public static void scroll(Coordinate[] coordinates,Coordinate firstCoordinate){ int i=indexOf(firstCoordinate,coordinates); if (i < 0) return; Coordinate[] newCoordinates=new Coordinate[coordinates.length]; System.arraycopy(coordinates,i,newCoordinates,0,coordinates.length - i); System.arraycopy(coordinates...
Shifts the positions of the coordinates until <code>firstCoordinate</code> is first.
@Override public StreamBuilderImpl<T,U> filter(PredicateAsync<? super T> test){ return new FilterAsync<T,U>(this,test); }
filter() async
public static <T>T checkNotNull(T reference){ if (reference == null) { throw new NullPointerException(); } return reference; }
Ensures that an object reference passed as a parameter to the calling method is not null.
public static void generate(ClientCache cache,PrintWriter pw){ generate(cache,pw,true); }
Examines the given <code>Cache</code> and from it generates XML data that is written to the given <code>PrintWriter</code>.
public void testDrainTo(){ LinkedBlockingQueue q=populatedQueue(SIZE); ArrayList l=new ArrayList(); q.drainTo(l); assertEquals(q.size(),0); assertEquals(l.size(),SIZE); for (int i=0; i < SIZE; ++i) assertEquals(l.get(i),new Integer(i)); q.add(zero); q.add(one); assertFalse(q.isEmpty()); assertTrue...
drainTo(c) empties queue into another collection c
public static void fill(long[] a,long val){ fill(a,0,a.length,val); }
Assigns the specified long value to each element of the specified array of longs.
protected boolean beforeDelete(){ DB.executeUpdate("DELETE FROM AD_View_Column_Trl WHERE AD_View_Column_ID=? ",getAD_View_Column_ID(),get_TrxName()); return true; }
Before Delete
public boolean isStacked(){ return mStackSize > 1 ? true : false; }
Returns true if this DataSet is stacked (stacksize > 1) or not.
@Override public boolean eIsSet(int featureID){ switch (featureID) { case DatatypePackage.PRESENCE__MANDATORY: return mandatory != MANDATORY_EDEFAULT; } return super.eIsSet(featureID); }
<!-- begin-user-doc --> <!-- end-user-doc -->
public void addToken(char[] array,int start,int end,int tokenType,int startOffset){ super.addToken(array,start,end,tokenType,startOffset); zzStartRead=zzMarkedPos; }
Adds the token specified to the current linked list of tokens.
public final String toString(){ return image; }
Returns the image.
public static PublicKey generatePublicKey(String encodedPublicKey){ try { byte[] decodedKey=Base64.decode(encodedPublicKey); KeyFactory keyFactory=KeyFactory.getInstance(KEY_FACTORY_ALGORITHM); return keyFactory.generatePublic(new X509EncodedKeySpec(decodedKey)); } catch ( NoSuchAlgorithmException e) ...
Generates a PublicKey instance from a string containing the Base64-encoded public key.
public static void upto(Calendar self,Calendar to,Closure closure){ if (self.compareTo(to) <= 0) { for (Calendar i=(Calendar)self.clone(); i.compareTo(to) <= 0; i=next(i)) { closure.call(i); } } else throw new GroovyRuntimeException("The argument (" + to + ") to upto() cannot be earlier than the va...
Iterates from the date represented by this calendar up to the date represented by the given calendar, inclusive, incrementing by one day each time.
public long[] sort(int n){ while (--n >= 0) { long result=heap[1]; heap[1]=heap[size]; heap[size]=result; size--; downHeap(); } return heap; }
Pops the smallest n items from the heap, placing them in the internal array at arr[size] through arr[size-(n-1)] with the smallest (first element popped) being at arr[size]. The internal array is returned.
public BlockContainer(Arrangement arrangement){ ParamChecks.nullNotPermitted(arrangement,"arrangement"); this.arrangement=arrangement; this.blocks=new ArrayList(); }
Creates a new instance with the specified arrangement.
public boolean equalFilters(DBDDataFilter source){ if (anyConstraint != source.anyConstraint) { return false; } if (constraints.size() != source.constraints.size()) { return false; } for (int i=0; i < source.constraints.size(); i++) { if (!constraints.get(i).equalFilters(source.constraints.get(i))...
compares only filers (criteria and ordering)
public final LC alignX(String align){ setAlignX(ConstraintParser.parseUnitValueOrAlign(align,true,null)); return this; }
Same functionality as <code>setAlignX(ConstraintParser.parseUnitValueOrAlign(unitValue, true))</code> only this method returns <code>this</code> for chaining multiple calls. <p> For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
private void deleteChildren(Element container){ while (container.hasChildNodes()) { container.removeChild(container.getLastChild()); } }
Delete the children of the element.
public static boolean isComponentDefault(Context context,String componentClassName){ PackageManager pm=context.getPackageManager(); ComponentName componentName=new ComponentName(context.getPackageName(),componentClassName); return pm.getComponentEnabledSetting(componentName) == PackageManager.COMPONENT_ENABLED_ST...
get the component in our package default
public ConditionalTransferEntropyCalculatorKraskov(String calculatorName) throws InstantiationException, IllegalAccessException, ClassNotFoundException { super(calculatorName); if (calculatorName.equalsIgnoreCase(COND_MI_CALCULATOR_KRASKOV1)) { kraskovAlgorithmNumber=1; } else if (calculatorName.equalsIgno...
Creates a new instance of the Kraskov-Grassberger style conditional transfer entropy calculator, with the supplied conditional MI calculator name
public Chronology withZone(DateTimeZone zone){ if (zone == null) { zone=DateTimeZone.getDefault(); } if (zone == getZone()) { return this; } return getInstance(zone); }
Gets the Chronology in a specific time zone.
protected synchronized void requestResult(String url,String result,int responseCode,String stream){ StreamInfo streamInfo=getStreamInfo(stream); if (result == null) { LOGGER.warning("Error requesting stream data: " + result); if (responseCode == 404) { streamInfo.setExpiresAfter(UPDATE_STREAMINFO_DELA...
Parse result of the /streams/:channel/ request.
public static void checkAndSetStringParam(Element context,AVList params,String paramKey,String paramName,XPath xpath){ if (context == null) { String message=Logging.getMessage("nullValue.ElementIsNull"); Logging.logger().severe(message); throw new IllegalArgumentException(message); } if (params == nul...
Checks a parameter list for a specified key and if not present attempts to find a value for the key from an element matched by an XPath expression. If found, the key and value are added to the parameter list.
public static IntList catenate(IntList A,IntList B){ return null; }
Returns a list consisting of the elements of A followed by the * elements of B. May NOT modify items of A. Use 'new'.
public static void list(PrintStream out) throws IOException { prp.list(out); }
List the properties in the <code>Code</code>.
public XBeeAddress64(String addressStr){ address=new int[8]; if (addressStr.contains(" ")) { StringTokenizer st=new StringTokenizer(addressStr," "); for (int i=0; i < address.length; i++) { String byteStr=st.nextToken(); address[i]=Integer.parseInt(byteStr,16); } } else { for (int i=0...
Parses an 64-bit XBee address from a string representation May be contain spaces ## ## ## ## ## ## ## ## or without ################ but cannot use the 0x prefix ex: 0013A200408B98FF or 00 13 A2 00 40 8B 98 FF
public void loadAllImages(Component comp,MediaTracker tracker){ for (Iterator<HexEntry> i=bases.iterator(); i.hasNext(); ) { HexEntry entry=i.next(); if (entry.getImage() == null) { entry.loadImage(comp); } tracker.addImage(entry.getImage(),1); } for (Iterator<HexEntry> i=supers.iterator(); ...
Initializes all the images in this tileset and adds them to the tracker
public static boolean copyFileSafe(final Path srcFile,final Path destFile,boolean overwrite) throws IOException { if (srcFile == null) { throw new NullPointerException("Source must not be null"); } if (destFile == null) { throw new NullPointerException("Destination must not be null"); } if (!srcFile.t...
copy a file, preserving the attributes
public RibbonIterator(Geo v1,Geo v2,double radius,double rotationIntervalDist){ this.v1=v1; this.v2=v2; if (v1 == null || v2 == null || v1.equals(v2)) { this.point=v2; } else { this.distance=v1.distance(v2); this.radius=radius; this.gc=v1.crossNormalize(v2); this.rotator=new Rotation(gc,rot...
Return an iterator that returns Ribbons along the great circle between v1 and v2. The Ribbon points are radius radians apart, and each Ribbon is rotationIntervalDist apart.
public Where(){ super(KEY); }
Constructs an instance using the default key.
public RegisterOperand makeTempBoolean(){ return new RegisterOperand(getInteger(),TypeReference.Boolean); }
Make a temporary to hold a boolean (allocating a new register).
@Override public boolean equals(Object obj){ if (obj == this) { return true; } if (obj == null) { return false; } if (!(getClass() == obj.getClass())) { return false; } else { Block b=(Block)obj; if (!b.getSystemName().equals(this.getSystemName())) { return false; } } retu...
Note: this has to make choices about identity values (always the same) and operation values (can change as the block works). Might be missing some identity values.
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:28:17.088 -0500",hash_original_method="5C7CD09A9243ABC84BD76D8BB04AA3C5",hash_generated_method="B69FAA21AD101141AF546C1E595C2553") public static final CharSequence timeString(long millis){ synchronized (sLock) { initFormatStringsLo...
Format a time so it appears like it would in the status bar clock.
public static void main(String argv[]){ RingBuffer<String> ringBuffer=new RingBuffer<String>(6); for (int i=0; i < 4; i++) { String element=String.format("ELEMENT %d",i); ringBuffer.add(element); } System.out.println("SHOULD SHOW ONLY 4 ELEMENTS"); System.out.println(ringBuffer); ringBuffer=new Ring...
Quick and dirty unit test for this class.
public DocumentHandler(String rootElementName,TagHandler root){ this.root=root; this.rootElementName=rootElementName; }
Creates a new DocumentHandler which will use the given TagHandler to handle the root element.
public boolean isAbbrValid(String abbr){ if (abbr.length() > 3 || abbr.length() == 0) { return false; } if (abbr.contains(",") || abbr.contains(">") || abbr.contains("%")|| abbr.contains("\\")|| abbr.contains(" ")) { return false; } for (int i=0; i < teamList.size(); i++) { if (teamList.get(i).abb...
See if team abbr is in use, or has illegal characters, or is not 3 characters
public CSVReader(Reader reader,char separator,char quotechar,char escape,int line,boolean strictQuotes,boolean ignoreLeadingWhiteSpace){ this(reader,line,new CSVParser(separator,quotechar,escape,strictQuotes,ignoreLeadingWhiteSpace)); }
Constructs CSVReader with all data entered.
public static List<SubstringLabelerMatchRule> matchRulesFromInternal(String matchDetails,Instances inputStructure,String statusMessagePrefix,Logger log,Environment env){ List<SubstringLabelerMatchRule> matchRules=new ArrayList<SubstringLabelerMatchRule>(); String[] matchParts=matchDetails.split(MATCH_RULE_SEPARATOR...
Get a list of match rules from an internally encoded match specification
@Override public int hashCode(){ int hashCode=(Double.valueOf(this.getMinimum()).hashCode() + Double.valueOf(this.getMaximum()).hashCode() + Boolean.valueOf(isMinimumSet()).hashCode()+ Boolean.valueOf(isMaximumSet()).hashCode()); return (hashCode); }
<p class="changed_modified_2_3"> Overrides the default hash code method to take the minimum and maximum into account when generating the hash code. </p>
public void addPoly(double[] llpoints,int units,int lType,int nsegs,LinkProperties properties) throws IOException { LinkPoly.write(llpoints,units,lType,nsegs,properties,link.dos); }
Write a poly in the response.
public JSONObject(JSONObject jo,String[] names){ this(); for (int i=0; i < names.length; i+=1) { try { this.putOnce(names[i],jo.opt(names[i])); } catch ( Exception ignore) { } } }
Construct a JSONObject from a subset of another JSONObject. An array of strings is used to identify the keys that should be copied. Missing keys are ignored.
protected void putMetricData(String namespace,String metricName,Double metricValue) throws AmazonClientException, AmazonServiceException { PutMetricDataRequest putMetricDataRequest=new PutMetricDataRequest(); putMetricDataRequest.withNamespace(namespace).withMetricData(new MetricDatum().withMetricName(metricName).w...
<p> Publishes metric data points to Amazon CloudWatch. Amazon Cloudwatch associates the data points with the specified metric. If the specified metric does not exist, Amazon CloudWatch creates the metric. </p> <p> <b>IMPORTANT:</b> Although the Value parameter accepts numbers of type Double, Amazon CloudWatch truncates...
@Override protected void initViews(Bundle savedInstanceState){ this.startBT=this.findView(R.id.start_bt); }
Initialize the view in the layout
public void testNextIntBounded(){ for (int bound=2; bound < MAX_INT_BOUND; bound+=524959) { int f=ThreadLocalRandom.current().nextInt(bound); assertTrue(0 <= f && f < bound); int i=0; int j; while (i < NCALLS && (j=ThreadLocalRandom.current().nextInt(bound)) == f) { assertTrue(0 <= j && j < ...
nextInt(bound) returns 0 <= value < bound; repeated calls produce at least two distinct results
public DLSequence(ASN1Encodable obj){ super(obj); }
create a sequence containing one object
@VisibleForTesting void restoreState(){ boolean mustRewriteState=false; SharedPreferences preferences=mApplicationContext.getSharedPreferences(PREF_PACKAGE,Context.MODE_PRIVATE); Map<String,?> items=preferences.getAll(); long currentTime=mBackoffScheduler.getCurrentTime(); mTimestampForNewRequest=getLongFromM...
Reads the data back from the file it was saved to. Uses SharedPreferences to handle I/O. Sanity checks are performed on the timestamps to guard against clock changing.
public Object execute(Object o,InternalContextAdapter context) throws MethodInvocationException { VelMethod method=null; Object[] params=new Object[paramCount]; try { IntrospectionCacheData icd=context.icacheGet(this); Class c=o.getClass(); if (icd != null && icd.contextData == c) { for (int j=0...
invokes the method. Returns null if a problem, the actual return if the method returns something, or an empty string "" if the method returns void
final boolean isOwnedBy(AbstractQueuedLongSynchronizer sync){ return sync == AbstractQueuedLongSynchronizer.this; }
Returns true if this condition was created by the given synchronization object.