List of usage examples for com.google.common.primitives Longs asList
public static List<Long> asList(long... backingArray)
From source file:org.dishevelled.bio.feature.BedRecord.java
@Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(chrom);/*from ww w . j av a 2s .c o m*/ sb.append("\t"); sb.append(start); sb.append("\t"); sb.append(end); switch (format) { case BED3: break; case BED4: sb.append("\t"); sb.append(name); break; case BED5: sb.append("\t"); sb.append(name); sb.append("\t"); sb.append(score); break; case BED6: sb.append("\t"); sb.append(name); sb.append("\t"); sb.append(score); sb.append("\t"); sb.append(strand); break; case BED12: sb.append("\t"); sb.append(name); sb.append("\t"); sb.append(score); sb.append("\t"); sb.append(strand); sb.append("\t"); sb.append(thickStart); sb.append("\t"); sb.append(thickEnd); sb.append("\t"); sb.append(itemRgb); sb.append("\t"); sb.append(blockCount); sb.append("\t"); sb.append(Joiner.on(",").join(Longs.asList(blockSizes))); sb.append("\t"); sb.append(Joiner.on(",").join(Longs.asList(blockStarts))); break; default: break; } return sb.toString(); }
From source file:org.apache.jackrabbit.oak.spi.security.privilege.PrivilegeBits.java
@Nonnull public PropertyState asPropertyState(String name) { return PropertyStates.createProperty(name, Longs.asList(d.longValues()), Type.LONGS); }
From source file:net.conquiris.lucene.search.Queries.java
/** * Creates a boolean query.// w w w. ja v a 2s. c o m * @param occur Specifies how clauses are to occur in matching documents. * @param field Schema item to use to build the clauses. * @param values Values to use to build the clauses. * @return The provided boolean query. * @throws IllegalArgumentException if the queries argument is empty. */ public static BooleanQuery booleanQuery(Occur occur, LongSchemaItem field, long... values) { return booleanQuery(occur, field, Longs.asList(values)); }
From source file:org.spongepowered.api.util.Coerce.java
private static List<?> primitiveArrayToList(Object obj) { if (obj instanceof boolean[]) { return Booleans.asList((boolean[]) obj); } else if (obj instanceof char[]) { return Chars.asList((char[]) obj); } else if (obj instanceof byte[]) { return Bytes.asList((byte[]) obj); } else if (obj instanceof short[]) { return Shorts.asList((short[]) obj); } else if (obj instanceof int[]) { return Ints.asList((int[]) obj); } else if (obj instanceof long[]) { return Longs.asList((long[]) obj); } else if (obj instanceof float[]) { return Floats.asList((float[]) obj); } else if (obj instanceof double[]) { return Doubles.asList((double[]) obj); }/*from w w w . j a v a 2 s. c o m*/ return Collections.<Object>emptyList(); }
From source file:com.b2international.snowowl.snomed.importer.rf2.util.ImportUtil.java
private ImmutableList<String> getAsStringList(final LongSet longIds) { final long[] longIdArray = longIds.toArray(); Arrays.sort(longIdArray);//from w w w . j a va2 s . c o m return FluentIterable.from(Longs.asList(longIdArray)).transform(new Function<Long, String>() { @Override public String apply(Long input) { return String.valueOf(input); } }).toList(); }
From source file:org.apache.cloudstack.storage.datastore.util.SolidFireUtil.java
private static long createVag(SolidFireConnection sfConnection, String vagName, String[] iqns, long[] volumeIds) { CreateVolumeAccessGroupRequest request = CreateVolumeAccessGroupRequest.builder().name(vagName) .optionalInitiators(iqns)//from www . j a v a 2 s. c o m .optionalVolumes(Longs.asList(volumeIds).toArray(new Long[volumeIds.length])).build(); return getSolidFireElement(sfConnection).createVolumeAccessGroup(request).getVolumeAccessGroupID(); }
From source file:org.apache.cloudstack.storage.datastore.util.SolidFireUtil.java
public static void modifyVag(SolidFireConnection sfConnection, long vagId, String[] iqns, long[] volumeIds) { ModifyVolumeAccessGroupRequest request = ModifyVolumeAccessGroupRequest.builder().volumeAccessGroupID(vagId) .optionalInitiators(iqns)//from w w w. j a va 2 s. c o m .optionalVolumes(Longs.asList(volumeIds).toArray(new Long[volumeIds.length])).build(); getSolidFireElement(sfConnection).modifyVolumeAccessGroup(request); }