當前位置: 首頁>>代碼示例>>Java>>正文


Java NotImplementedException類代碼示例

本文整理匯總了Java中org.apache.commons.lang.NotImplementedException的典型用法代碼示例。如果您正苦於以下問題:Java NotImplementedException類的具體用法?Java NotImplementedException怎麽用?Java NotImplementedException使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


NotImplementedException類屬於org.apache.commons.lang包,在下文中一共展示了NotImplementedException類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: iterable

import org.apache.commons.lang.NotImplementedException; //導入依賴的package包/類
public static <T> Iterable<T> iterable(final T values[]) {
    return (new Iterable<T>() {
        @Override
        public Iterator<T> iterator() {
            return new Iterator<T>() {
                private int idx = 0;

                @Override
                public boolean hasNext() {
                    return (this.idx < values.length);
                }

                @Override
                public T next() {
                    return (values[this.idx++]);
                }

                @Override
                public void remove() {
                    throw new NotImplementedException();
                }
            };
        }
    });
}
 
開發者ID:s-store,項目名稱:sstore-soft,代碼行數:26,代碼來源:CollectionUtil.java

示例2: iterable

import org.apache.commons.lang.NotImplementedException; //導入依賴的package包/類
/**
 * Wrap an Iterable around an Enumeration
 * @param <T>
 * @param e
 * @return
 */
public static <T> Iterable<T> iterable(final Enumeration<T> e) {
    return (new Iterable<T>() {
        @Override
        public Iterator<T> iterator() {
            return new Iterator<T>() {
                @Override
                public boolean hasNext() {
                    return (e.hasMoreElements());
                }
                @Override
                public T next() {
                    return (e.nextElement());
                }
                @Override
                public void remove() {
                    throw new NotImplementedException();
                }
            };
        }
    });
}
 
開發者ID:faclc4,項目名稱:HTAPBench,代碼行數:28,代碼來源:CollectionUtil.java

示例3: remove

import org.apache.commons.lang.NotImplementedException; //導入依賴的package包/類
/**
 * Removes the table descriptor from the local cache and returns it.
 * If not in read only mode, it also deletes the entire table directory(!)
 * from the FileSystem.
 */
@Override
public HTableDescriptor remove(final TableName tablename)
throws IOException {
  if (fsreadonly) {
    throw new NotImplementedException("Cannot remove a table descriptor - in read only mode");
  }
  Path tabledir = getTableDir(tablename);
  if (this.fs.exists(tabledir)) {
    if (!this.fs.delete(tabledir, true)) {
      throw new IOException("Failed delete of " + tabledir.toString());
    }
  }
  HTableDescriptor descriptor = this.cache.remove(tablename);
  if (descriptor == null) {
    return null;
  } else {
    return descriptor;
  }
}
 
開發者ID:fengchen8086,項目名稱:ditb,代碼行數:25,代碼來源:FSTableDescriptors.java

示例4: createTableDescriptorForTableDirectory

import org.apache.commons.lang.NotImplementedException; //導入依賴的package包/類
/**
 * Create a new HTableDescriptor in HDFS in the specified table directory. Happens when we create
 * a new table or snapshot a table.
 * @param tableDir table directory under which we should write the file
 * @param htd description of the table to write
 * @param forceCreation if <tt>true</tt>,then even if previous table descriptor is present it will
 *          be overwritten
 * @return <tt>true</tt> if the we successfully created the file, <tt>false</tt> if the file
 *         already exists and we weren't forcing the descriptor creation.
 * @throws IOException if a filesystem error occurs
 */
public boolean createTableDescriptorForTableDirectory(Path tableDir,
    HTableDescriptor htd, boolean forceCreation) throws IOException {
  if (fsreadonly) {
    throw new NotImplementedException("Cannot create a table descriptor - in read only mode");
  }
  FileStatus status = getTableInfoPath(fs, tableDir);
  if (status != null) {
    LOG.debug("Current tableInfoPath = " + status.getPath());
    if (!forceCreation) {
      if (fs.exists(status.getPath()) && status.getLen() > 0) {
        if (readTableDescriptor(fs, status, false).equals(htd)) {
          LOG.debug("TableInfo already exists.. Skipping creation");
          return false;
        }
      }
    }
  }
  Path p = writeTableDescriptor(fs, htd, tableDir, status);
  return p != null;
}
 
開發者ID:fengchen8086,項目名稱:ditb,代碼行數:32,代碼來源:FSTableDescriptors.java

示例5: iterator

import org.apache.commons.lang.NotImplementedException; //導入依賴的package包/類
@Override
public Iterator<T> iterator() {
  return new Iterator<T>() {
    private int returned = 0;

    @Override
    public boolean hasNext() {
      return this.returned < 2;
    }

    @Override
    public T next() {
      if (++this.returned == 1) return getFirst();
      else if (this.returned == 2) return getSecond();
      else throw new IllegalAccessError("this.returned=" + this.returned);
    }

    @Override
    public void remove() {
      throw new NotImplementedException();
    }
  };
}
 
開發者ID:fengchen8086,項目名稱:ditb,代碼行數:24,代碼來源:PairOfSameType.java

示例6: safeHandle

import org.apache.commons.lang.NotImplementedException; //導入依賴的package包/類
@Override
public AppiumResponse safeHandle(IHttpRequest request) {
    try {
        int requestedType = getPayload(request).getInt("type");
        NetworkConnectionEnum networkType = NetworkConnectionEnum.getNetwork(requestedType);
        switch (networkType) {
            case WIFI:
                return WifiHandler.toggle(true, getSessionId(request));
            case DATA:
            case AIRPLANE:
            case ALL:
            case NONE:
                return new AppiumResponse(getSessionId(request), WDStatus.UNKNOWN_ERROR, new NotImplementedException("Setting Network Connection to: " + networkType.getNetworkType() + " :is not implemented"));
            default:
                return new AppiumResponse(getSessionId(request), WDStatus.UNKNOWN_ERROR, new UiAutomator2Exception("Invalid Network Connection type: "+ requestedType));
        }
    } catch (JSONException e) {
        Logger.error("Exception while reading JSON: ", e);
        return new AppiumResponse(getSessionId(request), WDStatus.JSON_DECODER_ERROR, e);
    }
}
 
開發者ID:appium,項目名稱:appium-uiautomator2-server,代碼行數:22,代碼來源:NetworkConnection.java

示例7: gen

import org.apache.commons.lang.NotImplementedException; //導入依賴的package包/類
@Override
public Instruction gen(GeneratorContext ctx, Set_stmtContext rule)
throws OrcaException {
    if (rule.set_stmt_names() != null) {
        return genSetNames(ctx, rule.set_stmt_names());
    }
    if (rule.set_stmt_character_set() != null) {
        return genSetCharSet(ctx, rule.set_stmt_character_set());
    }
    else if (rule.set_stmt_variable() != null){
        return genSetVariables(ctx, rule.set_stmt_variable());
    }
    else {
        throw new NotImplementedException();
    }
}
 
開發者ID:waterguo,項目名稱:antsdb,代碼行數:17,代碼來源:Set_stmtGenerator.java

示例8: setColumnDefault

import org.apache.commons.lang.NotImplementedException; //導入依賴的package包/類
private static void setColumnDefault(ColumnAttributes attrs, Column_constraint_defaultContext rule) {
    if (rule.literal_value() != null) {
        String value = rule.literal_value().getText();
        if (value.equalsIgnoreCase("null")) {
            attrs.setDefaultValue(null);
        }
        else {
            attrs.setDefaultValue(value);
        }
    }
    else if (rule.signed_number() != null) {
        attrs.setDefaultValue(rule.signed_number().getText());
    }
    else {
        throw new NotImplementedException();
    }
}
 
開發者ID:waterguo,項目名稱:antsdb,代碼行數:18,代碼來源:Utils.java

示例9: createParameterNames

import org.apache.commons.lang.NotImplementedException; //導入依賴的package包/類
/**
 * Create parameter names for excluding the tags of the query. The returned parameters will
 * already be prefixed with a colon.
 * 
 * @param formula
 *            the formula to process
 * @return the comma separated list of parameter names
 */
protected String createParameterNames(LogicalTagFormula formula) {
    if (formula.isNegated()) {
        throw new NotImplementedException("Negated tag formulas cannot be used"
                + " in a RelatedRankedTagQuery");
    }
    StringBuilder sb = new StringBuilder();
    if (formula instanceof AtomicTagFormula) {
        sb.append(":");
        sb.append(createParameterName((AtomicTagFormula) formula));
    } else {
        String prefix = ":";
        CompoundTagFormula compoundFormula = (CompoundTagFormula) formula;
        for (AtomicTagFormula atom : compoundFormula.getPositiveAtoms()) {
            sb.append(prefix);
            sb.append(createParameterName(atom));
            prefix = ", :";
        }
    }

    return sb.toString();

}
 
開發者ID:Communote,項目名稱:communote-server,代碼行數:31,代碼來源:TagQueryParameters.java

示例10: eval

import org.apache.commons.lang.NotImplementedException; //導入依賴的package包/類
@Override
public long eval(VdmContext ctx, Heap heap, Parameters params, long pRecord) {
	long pValue = upstream.eval(ctx, heap, params, pRecord);
	if (pValue == 0) {
		return 0;
	}
	int type = Value.getType(heap, pValue);
	if (type == Value.TYPE_BYTES) {
		return pValue;
	}
	else if (type == Value.TYPE_BLOB) {
		return pValue;
	}
	else if (type == Value.TYPE_STRING) {
		long pBytes = FishObject.toBytes(heap, pValue);
		return pBytes;
	}
	else {
		throw new NotImplementedException();
	}
}
 
開發者ID:waterguo,項目名稱:antsdb,代碼行數:22,代碼來源:ToBytes.java

示例11: tagFormulaToString

import org.apache.commons.lang.NotImplementedException; //導入依賴的package包/類
/**
 * transform a tag formula to a string Note: only supports non negative conjunction, which will
 * result in a comma separated list
 *
 * @param f
 *            the formula
 * @param separator
 *            the separator used during tag parsing
 * @return the string representation
 */
public String tagFormulaToString(LogicalTagFormula f, String separator) {
    if (f instanceof AtomicTagFormula) {
        return ((AtomicTagFormula) f).getTag();
    }
    CompoundTagFormula cf = (CompoundTagFormula) f;
    if (cf.isNegated() || cf.isDisjunction()) {
        throw new NotImplementedException("Creating string representation of disjunction or"
                + " negations is not supported.");
    }
    String prefix = "";
    StringBuilder sb = new StringBuilder();
    AtomicTagFormula[] atoms = cf.getPositiveAtoms();
    for (int i = 0; i < atoms.length; i++) {
        sb.append(prefix);
        sb.append(atoms[i].getTag());
        prefix = separator + " ";
    }
    return sb.toString();
}
 
開發者ID:Communote,項目名稱:communote-server,代碼行數:30,代碼來源:FilterParameterResolver.java

示例12: run

import org.apache.commons.lang.NotImplementedException; //導入依賴的package包/類
@Override
public Object run(VdmContext ctx, Parameters params) {
	TableMeta table = Checks.tableExist(ctx.getSession(), this.tableName);
	try {
		ctx.getSession().lockTable(table.getId(), LockLevel.EXCLUSIVE, false);
        // copy the table over to a new one
        
        ObjectName newName = ctx.getMetaService().findUniqueName(ctx.getTransaction(), this.tableName);
        new CreateTable(newName).run(ctx, params);
        
        // ..... more more to be implemented
        
        throw new NotImplementedException();
	}
	finally {
		ctx.getSession().unlockTable(table.getId());
	}
}
 
開發者ID:waterguo,項目名稱:antsdb,代碼行數:19,代碼來源:ModifyPrimaryKey.java

示例13: sendChunkChange

import org.apache.commons.lang.NotImplementedException; //導入依賴的package包/類
@Override
public boolean sendChunkChange(Location loc, int sx, int sy, int sz, byte[] data) {
    if (getHandle().playerNetServerHandler == null) return false;

    /*
    int x = loc.getBlockX();
    int y = loc.getBlockY();
    int z = loc.getBlockZ();

    int cx = x >> 4;
    int cz = z >> 4;

    if (sx <= 0 || sy <= 0 || sz <= 0) {
        return false;
    }

    if ((x + sx - 1) >> 4 != cx || (z + sz - 1) >> 4 != cz || y < 0 || y + sy > 128) {
        return false;
    }

    if (data.length != (sx * sy * sz * 5) / 2) {
        return false;
    }

    Packet51MapChunk packet = new Packet51MapChunk(x, y, z, sx, sy, sz, data);

    getHandle().playerConnection.sendPacket(packet);

    return true;
    */

    throw new NotImplementedException("Chunk changes do not yet work"); // TODO: Chunk changes.
}
 
開發者ID:UraniumMC,項目名稱:Uranium,代碼行數:34,代碼來源:CraftPlayer.java

示例14: getTypeForClass

import org.apache.commons.lang.NotImplementedException; //導入依賴的package包/類
@Nullable
private static Object getTypeForClass(Class clazz, String input, @Nullable CommandSender sender) throws InputException {
    if (clazz == null) {
        throw new IllegalArgumentException("Cannot determine input type for null class");
    }

    if (clazz.equals(String.class)) {
        return input;
    } else if (clazz.isPrimitive()) {
        return getPrimitive(clazz, input);
    } else if (clazz.equals(Class.class)) {
        return getBukkitClass(input);
    } else if (clazz.equals(Material.class)) {
        return getMaterial(input);
    } else if (clazz.equals(MaterialData.class)) {
        return getMaterialData(input);
    } else if (clazz.equals(Location.class)) {
        return getLocation(input, sender);
    } else if (clazz.equals(Entity.class)) {
        return getEntity(input, sender);
    } else if (clazz.equals(UUID.class)) {
        return getUUID(input, sender);
    } else if (clazz.equals(GameMode.class)) {
        return getGameMode(input);
    } else if (clazz.equals(Difficulty.class)) {
        return getDifficulty(input);
    } else if (Enum.class.isAssignableFrom(clazz)) { // Do not use for all enum types, lacks magic value support
        return getValueFromEnum(clazz, input);
    } else if (clazz.equals(ItemStack.class)) {
        return getItemStack(input, sender);
    } else if (clazz.equals(Class[].class)) {
        return getBukkitClasses(input);
    }

    throw new InputException(new NotImplementedException("Input handling for class type " + clazz.getSimpleName() + " not implemented yet"));
}
 
開發者ID:zachbr,項目名稱:Debuggery,代碼行數:37,代碼來源:InputFormatter.java

示例15: clone

import org.apache.commons.lang.NotImplementedException; //導入依賴的package包/類
@Override
public IntegrityConstraint clone(){
	
	try {
		throw new NotImplementedException("The clone method should be implemented in the subtypes!");
	} catch (NotImplementedException e) {
		e.printStackTrace();
	}
	return null;	
}
 
開發者ID:faclc4,項目名稱:HTAPBench,代碼行數:11,代碼來源:IntegrityConstraint.java


注:本文中的org.apache.commons.lang.NotImplementedException類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。