code stringlengths 10 174k | nl stringlengths 3 129k |
|---|---|
private void restoreSmsInformation(){
if (sSmsID == null) {
sSmsID=mKeyValueHelper.getIntegerValue(KeyValueHelper.KEY_SMS_ID);
if (sSmsID == null) {
mKeyValueHelper.addKey(KeyValueHelper.KEY_SMS_ID,"0");
mKeyValueHelper.addKey(KeyValueHelper.KEY_SINTENT,"0");
mKeyValueHelper.addKey(KeyValueH... | Restores the SMS information from the database Creates the smsMap object and fills it if there are any old SMS from the database |
public static byte[] analogControl(int address,boolean longAddr,int function,int value){
if (!addressCheck(address,longAddr)) {
return null;
}
byte[] retVal;
int arg1=0x3D;
if (longAddr) {
retVal=new byte[6];
retVal[0]=(byte)(192 + ((address / 256) & 0x3F));
retVal[1]=(byte)(address & 0xFF);
... | Provide an NMRA analog control instruction <P> Note that the NMRA draft of Fall 2004 only defines the value of "1" for the "function parameter", calling that the value for "volume control". However, DCC systems in the wild have been observed to use 0x7F for the function byte for volume control. |
static Object createObject(String factoryId,String propertiesFilename,String fallbackClassName) throws ConfigurationError {
Class factoryClass=lookUpFactoryClass(factoryId,propertiesFilename,fallbackClassName);
if (factoryClass == null) {
throw new ConfigurationError("Provider for " + factoryId + " cannot be fo... | Finds the implementation Class object in the specified order. The specified order is the following: <ol> <li>query the system property using <code>System.getProperty</code> <li>read <code>$java.home/lib/<i>propertiesFilename</i></code> file <li>read <code>META-INF/services/<i>factoryId</i></code> file <li>use fallback... |
int compile(String sourceFilename,String outputFilename,ClassProperties properties) throws IOException, InterruptedException {
LinkedList<String> command=new LinkedList<String>();
includeJavaPaths(properties,header);
String platform=Loader.getPlatform();
String compilerPath=properties.getProperty("platform.comp... | Launches and waits for the native compiler to produce a native shared library. |
public boolean hasNext(){
return index < co.size();
}
| Test whether there is a next value. |
public static void decodeToFile(String dataToDecode,String filename) throws java.io.IOException {
B64OutputStream bos=null;
try {
bos=new B64OutputStream(new java.io.FileOutputStream(filename),Base64.DECODE);
bos.write(dataToDecode.getBytes(PREFERRED_ENCODING));
}
catch ( java.io.IOException e) {
th... | Convenience method for decoding data to a file. <p>As of v 2.3, if there is a error, the method will throw an java.io.IOException. <b>This is new to v2.3!</b> In earlier versions, it just returned false, but in retrospect that's a pretty poor way to handle it.</p> |
public Vector3f add(Vector3f vec){
if (null == vec) {
logger.warning("Provided vector is null, null returned.");
return null;
}
return new Vector3f(x + vec.x,y + vec.y,z + vec.z);
}
| Add adds a provided vector to this vector creating a resultant vector which is returned. If the provided vector is null, null is returned. |
@Override public BlockSnapshotBulkRep queryBulkResourceReps(List<URI> ids){
Iterator<BlockSnapshot> _dbIterator=_dbClient.queryIterativeObjects(getResourceClass(),ids);
return new BlockSnapshotBulkRep(BulkList.wrapping(_dbIterator,MapBlockSnapshot.getInstance(_dbClient)));
}
| Retrieve BlockSnapshot representations based on input ids. |
private void returnData(Object ret){
if (myHost != null) {
myHost.returnData(ret);
}
}
| Used to communicate a return object from a plugin tool to the main Whitebox user-interface. |
public PackInHandler(){
setupHandlers();
}
| PackInHandler Handler |
public final FastSet<E> union(Set<? extends E> other){
FastSet<E> tmp=new FastSet<E>(this);
tmp.addAll(other);
return tmp;
}
| Returns a new set which is the union of this set and the other set given. Both original sets are unchanged by this operation. |
private static PduPart findPart(final Context context,PduBody pb,String src,ArrayList<String> srcs){
PduPart result=null;
if (src != null) {
src=unescapeXML(src);
if (contentIdSrc(src)) {
result=pb.getPartByContentId("<" + src.substring("cid:".length()) + ">");
if (result == null) {
bool... | This method is meant to identify the part in the given PduBody that corresponds to the given src string. Essentially, a SMIL MMS is formatted as follows: 1. A smil/application part, which contains XML-like formatting for images, text, audio, slideshows, videos, etc. 2. One or more parts that correspond to one of the el... |
private void writeQNameAttribute(java.lang.String namespace,java.lang.String attName,javax.xml.namespace.QName qname,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
java.lang.String attributeNamespace=qname.getNamespaceURI();
java.lang.String attributePrefix=xmlWriter.getPre... | Util method to write an attribute without the ns prefix |
public Iterator<E> descendingIterator(){
return m.descendingKeySet().iterator();
}
| Returns an iterator over the elements in this set in descending order. |
public void readItem(AttributeSet attrs){
TypedArray a=mContext.obtainStyledAttributes(attrs,R.styleable.SherlockMenuItem);
itemId=a.getResourceId(R.styleable.SherlockMenuItem_android_id,defaultItemId);
final int category=a.getInt(R.styleable.SherlockMenuItem_android_menuCategory,groupCategory);
final int order... | Called when the parser is pointing to an item tag. |
public static boolean canRename(DownloadFileInfo downloadFileInfo){
if (!DownloadFileUtil.isLegal(downloadFileInfo)) {
return false;
}
if (isDownloadingStatus(downloadFileInfo)) {
return false;
}
return true;
}
| whether the download file can rename |
public CConnectionEditor(){
super();
setName("ConnectionEditor");
CConnectionEditor_MouseListener ml=new CConnectionEditor_MouseListener();
m_text.setEditable(false);
m_text.setBorder(null);
m_text.addMouseListener(ml);
m_server.setIcon(new ImageIcon(getClass().getResource("Server16.gif")));
m_server.se... | Connection Editor creating new Connection |
private void writeColumnSortInfo() throws IOException {
boolean isNotNull=null != columnSortInfo.getSort_index() && null != columnSortInfo.sort_index_inverted;
if (isNotNull) {
initPath();
String folderContainingFile=CarbonTablePath.getFolderContainingFile(this.sortIndexFilePath);
boolean created=Carbon... | Initialize the sortIndexFilePath and open writing stream for dictionary sortIndex file thrif writer write the column sort info to the store when both sort index and sort index inverted are populated. existing sort index file has to be overwritten with new sort index data columnSortInfo having null sortIndex and invert... |
public boolean isShiftAllocation(){
Object oo=get_Value(COLUMNNAME_IsShiftAllocation);
if (oo != null) {
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
| Get Shift Allocation. |
public FacebookException(){
super();
}
| Constructs a new FacebookException. |
public void addSeries(final String title,final Double[] values){
int cnt=1;
for ( double value : values) {
String category=(cnt > this.categories.length ? Integer.toString(cnt) : this.categories[cnt - 1]);
this.dataset.addValue(value,title,category);
cnt++;
}
}
| Adds a new data series to the chart with the specified title. |
public MType build(){
isClean=true;
return getMessage();
}
| Builds the message and returns it. |
public static void pack(final File sourceDir,final File targetZip,final int compressionLevel) throws IOException {
Preconditions.checkArgument(sourceDir != null && sourceDir.exists() && sourceDir.isDirectory(),"Source directory is not exist: %s",sourceDir.getAbsolutePath());
long startTime=System.currentTimeMillis(... | Compresses the given directory and all its sub-directories into a ZIP file with specified compress level. <p> The ZIP file must not be a directory. |
private void testAlterTableAlterColumnWithConstraint() throws SQLException {
stat.execute("create table test(id int check(id in (1,2)) )");
stat.execute("alter table test alter id rename to id2");
conn.close();
conn=getConnection();
stat=conn.createStatement();
stat.execute("insert into test values(1)");
... | Tests a bug we used to have where altering the name of a column that had a check constraint that referenced itself would result in not being able to re-open the DB. |
public static void main(String[] args){
JCudaDriverTextureTest.PRINT_LOG_MESSAGES=true;
JCudaDriverTextureTest t=new JCudaDriverTextureTest();
t.testTextures();
}
| Entry point to run this as an application |
public boolean needsRegistration(){
return !registered;
}
| This value is always false if we authenticate the player with a cracked authentication |
private void returnData(Object ret){
if (myHost != null) {
myHost.returnData(ret);
}
}
| Used to communicate a return object from a plugin tool to the main Whitebox user-interface. |
public static VectorClock incrementT(long timestamp,VectorClock clock,int... nodes){
for ( int n : nodes) clock=clock.incremented((short)n,timestamp);
return clock;
}
| Record events for the given sequence of nodes |
@Override public long clearOldEntries(long cacheExpirationMs){
long oldestRemainingEntryAgeMs=0L;
synchronized (mLock) {
try {
long now=mClock.now();
DiskStorage storage=mStorageSupplier.get();
Collection<DiskStorage.Entry> allEntries=storage.getEntries();
int itemsRemovedCount=0;
lo... | Deletes old cache files. |
public static ExceptionBuilder unavailable(){
return new ExceptionBuilder(Status.SERVICE_UNAVAILABLE);
}
| Creates a builder for a unavailable service |
public static void sort(Comparable[] pq){
int n=pq.length;
for (int k=n / 2; k >= 1; k--) sink(pq,k,n);
while (n > 1) {
exch(pq,1,n--);
sink(pq,1,n);
}
}
| Rearranges the array in ascending order, using the natural order. |
public SensorMatrixEditorException(final Throwable cause){
super(cause);
}
| Create a new sensor matrix editor exception with the specified cause. |
public void pop(StepSingle stepSingle){
checkDumpStep();
parentLevel=stepSingle.parent;
process(stepSingle);
}
| (syn: pullAndAddStep) add the step already leveled and decrease one level(to lower level). |
public void clear(){
super.clear();
header.before=header.after=header;
}
| Removes all mappings from this map. |
private ConsumerLogMessages(){
}
| No object - utility class |
public Vector2d negate(){
x=-x;
y=-y;
return this;
}
| Negate this vector. |
public Object transform(Object vo){
DocumentoVitalPO po=new DocumentoVitalPO();
POUtils.copyVOProperties(po,vo);
return po;
}
| Transforma un objeto en otro. |
@DSSafe(DSCat.SAFE_LIST) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2014-08-13 13:14:12.597 -0400",hash_original_method="B59F3780435E1D82A9BC71252DB81041",hash_generated_method="A33E77749A78F60ECA6DC727ABB6C535") @Override public void reset() throws IOException {
synchronized (lock) {
su... | Resets this reader to the last marked location. It also resets the line count to what is was when this reader was marked. This implementation resets the source reader. |
public static int addToConstantPool(String s){
int i=constantPool.indexOf(s);
if (i < 0) {
constantPool.add(s);
return constantPool.size() - 1;
}
return i;
}
| Adds the given string to the hardcoded constant pool strings returns the offset in the pool |
public void clearRangeMarkers(){
if (this.rangeMarkers != null) {
this.rangeMarkers.clear();
fireChangeEvent();
}
}
| Clears all the range markers. |
public void generate(CompilationUnit unit,TypeTable typeTable){
CompilerContext flexCx=unit.getContext();
Context cx=flexCx.getAscContext();
ProgramNode node=(ProgramNode)unit.getSyntaxTree();
if (unit.topLevelDefinitions.first() == null) {
return;
}
String className=NameFormatter.toDot(unit.topLevelDef... | The DocComments for each compilation are processed and organized into a class table. It also checks if a class needs to not be processed (and skips those classes). Some examples are cases where the class contains an [ExcludeClass] metadata or if it is mentioned in the exclude class list |
public static <T>T parseJsonToObject(Context context,String jsonName,Class<T> clazz){
String json=getTextFromAssets(context,jsonName);
return JsonUtils.jsonToObject(json,clazz);
}
| Parse a json file in the assets to Bean |
public boolean delete(int token,boolean deleteTaskFile){
Task task=tasksDataSource.getTaskInfo(token);
if (task.url != null) {
List<Chunk> taskChunks=chunksDataSource.chunksRelatedTask(task.id);
for ( Chunk chunk : taskChunks) {
FileUtils.delete(task.save_address,String.valueOf(chunk.id));
ch... | delete download task from db and if you set deleteTaskFile as true it's go to saved folder and delete that file |
public MorrisLecarRulePanel(){
super();
this.add(tabbedPane);
JTextField tfCMembrane=createTextField(null,null);
JTextField tfV_M1=createTextField(null,null);
JTextField tfV_M2=createTextField(null,null);
JTextField tfThreshold=createTextField(null,null);
JTextField tfI_Bg=createTextField(null,null);
La... | Construct the panel. |
protected void doAdd(Object key,BufferedImage image){
Entry entry=this.entryMap.remove(key);
if (entry != null) {
this.doRemove(entry);
}
Rect rect=new Rect(0,0,image.getWidth() + 2,image.getHeight() + 2,null);
entry=new Entry(key,rect,1,1,image.getWidth(),image.getHeight());
this.markUsed(entry);
thi... | Adds a new element to this texture atlas with the specified key and image. |
public void endTag(String elName) throws IOException {
_indentLevel--;
_writeIndent();
_writeLn("</" + elName + ">");
}
| Writes an end tag. |
public boolean isProcessing(){
Object oo=get_Value(COLUMNNAME_Processing);
if (oo != null) {
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
| Get Process Now. |
public boolean isSet(_Fields field){
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case HEADER:
return isSetHeader();
case NODE:
return isSetNode();
}
throw new IllegalStateException();
}
| Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise |
public T caseAnonymous_concreteMethodDeclaration_1_(Anonymous_concreteMethodDeclaration_1_ object){
return null;
}
| Returns the result of interpreting the object as an instance of '<em>Anonymous concrete Method Declaration 1</em>'. <!-- begin-user-doc --> This implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc --> |
private Coord calculatePlacemarkPosition(final Link l){
Coord coordFrom=l.getFromNode().getCoord();
Coord coordTo=l.getToNode().getCoord();
double xDiff=coordTo.getX() - coordFrom.getX();
double yDiff=coordTo.getY() - coordFrom.getY();
double length=Math.sqrt((xDiff * xDiff) + (yDiff * yDiff));
double scale... | Calculates the position of a placemark in a way that it is 40 % of the link length away from the node where the link starts. |
@PUT @Path("/internal/initstandby") @Consumes({MediaType.APPLICATION_XML,MediaType.APPLICATION_JSON}) @Produces({MediaType.APPLICATION_XML,MediaType.APPLICATION_JSON}) public Response initStandby(SiteConfigParam configParam){
try {
SiteParam activeSiteParam=configParam.getActiveSite();
ipsecConfig.setPreShare... | Initialize a to-be added/resumed target standby a) re-set all the latest site related info (persisted in ZK) in the target standby b) vdc properties would be changed accordingly c) the target standby reboot d) re-set zk/db data during the target standby reboot e) the target standby would connect with active and sync al... |
protected ByteVector write(final ClassWriter cw,final byte[] code,final int len,final int maxStack,final int maxLocals){
ByteVector v=new ByteVector();
v.data=value;
v.length=value.length;
return v;
}
| Returns the byte array form of this attribute. |
public void testDisjoint(){
Instances result=null;
m_Instances.setClassIndex(2);
try {
result=applyFilter(new Filter[]{new AllFilter(),new AllFilter()},new Range[]{new Range("1-2"),new Range("4-5")},false);
}
catch ( Exception e) {
fail("Problem applying the filter: " + e);
}
assertEquals(m_Instan... | tests two filters with disjoint ranges |
public void removeInterface(NetworkInterface ni){
GridCell c=ginterfaces.get(ni);
if (c != null) {
c.removeInterface(ni);
}
ginterfaces.remove(ni);
}
| Removes a network interface from the overlay grid |
public RenameJavaElementDescriptor(String id,String project,String description,String comment,Map arguments,int flags){
super(id,project,description,comment,arguments,flags);
Assert.isLegal(checkId(id),"Refactoring id is not a rename refactoring id");
fName=JavaRefactoringDescriptorUtil.getString(fArguments,ATTRI... | Creates a new refactoring descriptor. |
public static void dropTable(SQLiteDatabase db,boolean ifExists){
String sql="DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "'lookMyPrivate'";
db.execSQL(sql);
}
| Drops the underlying database table. |
public void datosTIFF(byte[] buffer) throws Exception {
try {
FileCacheSeekableStream in=new FileCacheSeekableStream(new ByteArrayInputStream(buffer));
TIFFDirectory td=new TIFFDirectory(in,0);
resX=td.getFieldAsFloat(TIFFImageDecoder.TIFF_X_RESOLUTION);
resY=td.getFieldAsFloat(TIFFImageDecoder.TIFF_Y... | ver datos de la imagen |
protected DeclaredVersionImpl(){
super();
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
public void printStat(JCTree tree) throws IOException {
if (isEmptyStat(tree)) {
}
else {
printExpr(tree,TreeInfo.notExpression);
}
}
| Derived visitor method: print statement tree. |
public Item(CharSequence text,Intent intent,Uri uri){
mText=text;
mHtmlText=null;
mIntent=intent;
mUri=uri;
}
| Create a complex Item, containing multiple representations of text, Intent, and/or URI. |
protected boolean FunctionCall() throws javax.xml.transform.TransformerException {
int opPos=m_ops.getOp(OpMap.MAPINDEX_LENGTH);
if (lookahead(':',1)) {
appendOp(4,OpCodes.OP_EXTFUNCTION);
m_ops.setOp(opPos + OpMap.MAPINDEX_LENGTH + 1,m_queueMark - 1);
nextToken();
consumeExpected(':');
m_ops.se... | FunctionCall ::= FunctionName '(' ( Argument ( ',' Argument)*)? ')' |
public void loadProfiles(String path){
try {
VSDFile vsdfile=new VSDFile(path);
if (vsdfile.isInitialized()) {
this.loadProfiles(vsdfile);
}
}
catch ( java.util.zip.ZipException e) {
log.error("ZipException loading VSDecoder from " + path);
}
catch ( java.io.IOException ioe) {
log.err... | Load Profiles from a VSD file Not deprecated anymore. used by the new ConfigDialog. |
public boolean hasPublishers(){
return hasRepeatingExtension(Publisher.class);
}
| Returns whether it has the publishers. |
public static String relativePath(IPath fullPath,int skipSegmentCount){
boolean hasTrailingSeparator=fullPath.hasTrailingSeparator();
String[] segments=fullPath.segments();
int length=0;
int max=segments.length;
if (max > skipSegmentCount) {
for (int i1=skipSegmentCount; i1 < max; i1++) {
length+=se... | Returns the toString() of the given full path minus the first given number of segments. The returned string is always a relative path (it has no leading slash) |
private void returnData(Object ret){
if (myHost != null) {
myHost.returnData(ret);
}
}
| Used to communicate a return object from a plugin tool to the main Whitebox user-interface. |
@Override public void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
setContentView(R.layout.nim_advanced_team_info_activity);
ToolBarOptions options=new ToolBarOptions();
setToolBar(R.id.toolbar,options);
parseIntentData();
findViews();
initActionbar();
initAdapter();
loadTe... | ***************************** Life cycle |
public static SizedInputStream openStream(String res,String err){
while (Mirror.getCurrent() != null) {
HttpURLConnection conn;
try {
conn=Mirror.getCurrent().getResource(res);
}
catch ( MalformedURLException e) {
Log.error("%s Is the mirror list broken?",err);
e.printStackTrace();
... | Tries to open an InputStream to the following remote resource. Automatically handles broken mirrors and other errors. |
public SerializableList(final Deserializer deserializer,final ObjectDeserializer<T> elementDeserializer,final String label){
super(deserializer,elementDeserializer,label);
}
| Deserializes a serializable list with a custom label. |
public void updateDis(double distance){
if (distance < 1000) {
distanceTV.setText(String.valueOf(Math.round(distance)));
distanceUnitTV.setText(R.string.meter);
}
else {
distanceTV.setText(String.format("%.2f",distance / 1000));
distanceUnitTV.setText(R.string.km);
}
}
| update distanceGraphSeries |
public boolean timeoutExtended(){
return mExtendedTimeout;
}
| Returns whether the timeout was extended for verification. |
public void addInvokeinterface(CtClass clazz,String name,String desc,int count){
addInvokeinterface(constPool.addClassInfo(clazz),name,desc,count);
}
| Appends INVOKEINTERFACE. |
@Override public Object eGet(int featureID,boolean resolve,boolean coreType){
switch (featureID) {
case ExpressionsPackage.NUMERICAL_ADD_SUBTRACT_EXPRESSION__LEFT_OPERAND:
return getLeftOperand();
case ExpressionsPackage.NUMERICAL_ADD_SUBTRACT_EXPRESSION__OPERATOR:
return getOperator();
case ExpressionsPackage.NU... | <!-- begin-user-doc --> <!-- end-user-doc --> |
public Boolean isNestedHVEnabled(){
return nestedHVEnabled;
}
| Gets the value of the nestedHVEnabled property. |
@DSComment("Package priviledge") @DSBan(DSCat.DEFAULT_MODIFIER) @DSSink({DSSinkKind.SYSTEM_SETTINGS}) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:59:01.611 -0500",hash_original_method="B076A318D7F3CB7E259ECDC99FDB3D0D",hash_generated_method="0A44E08571681D07EC93C75BDC2D40E8") bo... | Sets the "current" field in the telephony provider according to the build-time operator numeric property |
public static void updateValueDescription(Properties ctx,final String where,String trxName){
List<MAccount> accounts=new Query(ctx,MAccount.Table_Name,where,trxName).setOrderBy(MAccount.COLUMNNAME_C_ValidCombination_ID).list();
for ( MAccount account : accounts) {
account.setValueDescription();
account.sav... | Update Value/Description after change of account element value/description. |
public static List<ServiceUsage> findServiceUsage(ServiceDetailDescriptor descriptor){
return new ServiceUsageFinder().findServiceUsage(descriptor);
}
| Return list of Descriptor Detail for particular Service Usage |
public static String unformatString(String s){
StringBuffer result=new StringBuffer();
int i=0;
while (i < s.length()) {
char c=s.charAt(i++);
if ((c == '\\') && (i < s.length())) {
c=s.charAt(i++);
if ((c == 'u') && (i + 3 < s.length())) {
int value=0;
for (int j=0; j < 4; j++... | character unescaping. For example, "\u0041-\u0043" becomes "A-C". |
public static Date convertDate(Value value,Calendar calendar){
if (value == ValueNull.INSTANCE) {
return null;
}
ValueDate d=(ValueDate)value.convertTo(Value.DATE);
Calendar cal=(Calendar)calendar.clone();
cal.clear();
cal.setLenient(true);
long dateValue=d.getDateValue();
setCalendarFields(cal,year... | Convert the date to the specified time zone. |
public static void v(String tag,String msg,Throwable throwable){
if (sLevel > LEVEL_VERBOSE) {
return;
}
Log.v(tag,msg,throwable);
}
| Send a VERBOSE log message. |
public PnSignalingParams(List<PeerConnection.IceServer> iceServers){
this.iceServers=iceServers;
this.pcConstraints=defaultPcConstraints();
this.videoConstraints=defaultVideoConstraints();
this.audioConstraints=defaultAudioConstraints();
}
| Default media params, but specified Ice Servers |
protected final CharSequence charSequence(int from,int to){
int len=to - from;
if (len == 0) {
return emitStrings ? StringPool.EMPTY : EMPTY_CHAR_BUFFER;
}
return emitStrings ? new String(input,from,len) : CharBuffer.wrap(input,from,len);
}
| Creates char sub-sequence from the input. It may return a <code>String</code> of <code>CharBuffer</code>. Use <code>String</code> for DOM builder, but for visitor use <code>CharBuffer</code> for better performances. |
@Override public boolean eIsSet(int featureID){
switch (featureID) {
case TypesPackage.PARAMETERIZED_TYPE__PARAMETER:
return parameter != null && !parameter.isEmpty();
}
return super.eIsSet(featureID);
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
public ObjectFactory(){
}
| Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: oasis.names.tc.saml._2_0.conditions.delegation |
protected void adaptToInsert(){
int myStart=fPosition.offset;
int myEnd=fPosition.offset + fPosition.length - 1;
myEnd=Math.max(myStart,myEnd);
int yoursStart=fOffset;
int yoursEnd=fOffset + fReplaceLength - 1;
yoursEnd=Math.max(yoursStart,yoursEnd);
if (myEnd < yoursStart) return;
if (myStart < yours... | Adapts the currently investigated position to an insertion. |
public SignatureVisitor visitParameterType(){
return this;
}
| Visits the type of a method parameter. |
public boolean isReadOnly(){
Object oo=get_Value(COLUMNNAME_IsReadOnly);
if (oo != null) {
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
| Get Read Only. |
public String makeFieldPrompt(final String fieldName,final boolean defaultValue){
return String.format("%s [default: %s]: ",fieldName,defaultValue);
}
| Formats a prompt that shows a default value. |
public boolean isText(){
return true;
}
| This is true as this event represents a text token. Text tokens are required to provide a value only. So namespace details and the node name will always return null. |
private long waitFor(double permitsToAwait,long t){
long begin=t;
try {
while (permitsToAwait > 0) {
double currentRate=this.rate;
double nanosPerPermit=1000000000.0 / currentRate;
long done=t + ((long)(permitsToAwait * nanosPerPermit));
long now=System.nanoTime();
if (done > now) ... | MUST HOLD RATE LOCK |
public Tween targetRelative(float targetValue1,float targetValue2,float targetValue3){
isRelative=true;
targetValues[0]=isInitialized() ? targetValue1 + startValues[0] : targetValue1;
targetValues[1]=isInitialized() ? targetValue2 + startValues[1] : targetValue2;
targetValues[2]=isInitialized() ? targetValue3 +... | Sets the target values of the interpolation, relatively to the <b>values at start time (after the delay, if any)</b>. <p/> To sum-up:<br/> - start values: values at start time, after delay<br/> - end values: params + values at start time, after delay |
public void removeSheetListener(SheetListener l){
listenerList.remove(SheetListener.class,l);
}
| Removes a sheet listener. |
public synchronized void message(DCCppReply l){
if (log.isDebugEnabled()) {
log.debug("recieved message: " + l);
}
if (l.isSensorDefReply()) {
if (l.getSensorDefNumInt() == address) {
if (log.isDebugEnabled()) {
log.debug("Def Message for sensor " + systemName + " (Pin "+ address+ ")");
... | implementing classes will typically have a function/listener to get updates from the layout, which will then call public void firePropertyChange(String propertyName, Object oldValue, Object newValue) _once_ if anything has changed state (or set the commanded state directly) |
public static BufferedInputStream newInputStream(File file) throws FileNotFoundException {
return new BufferedInputStream(new FileInputStream(file));
}
| Creates a buffered input stream for this file. |
public boolean isPresent(){
return preferred != null;
}
| returns true is the header exists and contains a recognised scheme |
protected Label readLabel(int offset,Label[] labels){
if (labels[offset] == null) {
labels[offset]=new Label();
}
return labels[offset];
}
| Returns the label corresponding to the given offset. The default implementation of this method creates a label for the given offset if it has not been already created. |
public ConcurrentHashMap(int initialCapacity){
this(initialCapacity,DEFAULT_LOAD_FACTOR,DEFAULT_CONCURRENCY_LEVEL);
}
| Creates a new, empty map with the specified initial capacity, and with default load factor (0.75) and concurrencyLevel (16). |
protected void sequence_S_Action(ISerializationContext context,S_Action semanticObject){
genericSequencer.createSequence(context,semanticObject);
}
| Contexts: Statement returns S_Action S_Declaration returns S_Action S_Action returns S_Action GamlDefinition returns S_Action VarDefinition returns S_Action ActionDefinition returns S_Action Constraint: ( key='action' firstFacet='name:'? name=Valid_ID args=ActionArguments? facets+=Facet* block=Block? ) |
@Override public String encode(final byte[] data){
return new String(encodeHex(data));
}
| Converts an array of bytes into a String representing the hexadecimal values of each byte in order. The returned String will be double the length of the passed array, as it takes two characters to represent any given byte. |
public boolean isTeleclickEnabled(){
return has(TELECLICKMODE);
}
| Checks whether a player has teleclick enabled. |
@Override public void eSet(int featureID,Object newValue){
switch (featureID) {
case GamlPackage.STANDALONE_BLOCK__BLOCK:
setBlock((Block)newValue);
return;
}
super.eSet(featureID,newValue);
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.