Creates a new {@code MemberMap} including given members.

@param version version
@param members members
@return a new {@code MemberMap}
324083
static MemberMap createNew(int version, MemberImpl... members) {
        Map<Address, MemberImpl> addressMap = createLinkedHashMap(members.length);
        Map<String, MemberImpl> uuidMap = createLinkedHashMap(members.length);

        for (MemberImpl member : members) {
            putMember(addressMap, uuidMap, member);
        }

        return new MemberMap(version, addressMap, uuidMap);
    }
756076
public long addAll(final String... members) {
        return doWithJedis(new JedisCallable<Long>() {
            @Override
            public Long call(Jedis jedis) {
                return jedis.sadd(getKey(), members);
            }
        });
    }
294193
public AnnotationValueBuilder<T> member(String name, @Nullable AnnotationValue<?>... annotations) {
        if (annotations != null) {
            values.put(name, annotations);
        }
        return this;
    }
595494
@SuppressWarnings("unchecked")
  protected static GroupMembershipProtocol buildMembershipProtocol(ClusterConfig config) {
    return config.getProtocolConfig().getType().newProtocol(config.getProtocolConfig());
  }
1025524
public Obj buildObject(Object... members) {
		Obj o = newObject();
		for (int i = 0; i < members.length; i+=2) {
			o.put((String)members[i], members[i+1]);
		}
		return o;
	}
62725
public static TableKey versioned(@NonNull ArrayView key, long version) {
        Preconditions.checkArgument(version >= 0 || version == NOT_EXISTS || version == NO_VERSION, "Version must be a non-negative number.");
        return new TableKey(key, version);
    }
1117868
static MembersView cloneAdding(MembersView source, Collection<MemberInfo> newMembers) {
        List<MemberInfo> list = new ArrayList<>(source.size() + newMembers.size());
        list.addAll(source.getMembers());
        int newVersion = max(source.version, source.size());
        for (MemberInfo newMember : newMembers) {
            MemberInfo m = new MemberInfo(newMember.getAddress(), newMember.getUuid(), newMember.getAttributes(),
                    newMember.isLiteMember(), newMember.getVersion(), ++newVersion, newMember.getAddressMap());
            list.add(m);
        }

        return new MembersView(newVersion, unmodifiableList(list));
    }
255513
public JSType createUnionType(JSType... variants) {
    UnionTypeBuilder builder = UnionTypeBuilder.create(this);
    for (JSType type : variants) {
      builder.addAlternate(type);
    }
    return builder.build();
  }
1115037
public static MemberSummaryBuilder getInstance(
            AnnotationTypeWriter annotationTypeWriter, Context context)
            throws Exception {
        MemberSummaryBuilder builder = new MemberSummaryBuilder(context,
                annotationTypeWriter.getAnnotationTypeDoc());
        builder.memberSummaryWriters =
                new MemberSummaryWriter[VisibleMemberMap.NUM_MEMBER_TYPES];
        WriterFactory wf = context.configuration.getWriterFactory();
        for (int i = 0; i < VisibleMemberMap.NUM_MEMBER_TYPES; i++) {
                builder.memberSummaryWriters[i] =
                    builder.visibleMemberMaps[i].noVisibleMembers()?
                        null :
                        wf.getMemberSummaryWriter(
                        annotationTypeWriter, i);
        }
        return builder;
    }
1273441
public static Version copy(Version version) {
        if (version == null) {
            return null;
        }
        Version result = new Version();
        result.labels = new LinkedList<String>(version.labels);
        result.numbers = new LinkedList<Integer>(version.numbers);
        result.snapshot = version.snapshot;
        return result;
    }
600632
@Override
	public SimpleOrderedMap<Object> create(ComponentVersion version, Boolean encode) throws IOException {
		return getVersion();
	}
650068
public synchronized void setMembers(String[] urls) {
		HashMap<String,RangeMember> newMembers = 
			new HashMap<String,RangeMember>();
		
		for(int i=0; i < urls.length; i++) {
			if(members.containsKey(urls[i])) {
				newMembers.put(urls[i],members.get(urls[i]));
			} else {
				RangeMember newMember = new RangeMember();
				newMember.setUrlBase(urls[i]);
				newMembers.put(urls[i],newMember);
			}
		}
		members = newMembers;
	}
1075696
private Node createNewMembershipTypeNode(Session session, MembershipTypeImpl mType) throws Exception
   {
      Node storageTypesNode = utils.getMembershipTypeStorageNode(session);
      return storageTypesNode.addNode(mType.getName());
   }
507709
public VarSetBuilder members( IVarDef... members)
    {
    for( IVarDef member : members)
      {
      varSet_.addMember( member);
      }
    return this;
    }
585312
public MultimapJoiner useForNull(final String nullText) {
		return new MultimapJoiner(entryJoiner.useForNull(nullText), separator, keyValueSeparator) {
			@Override
			protected CharSequence toString(Object part) {
				return (part == null) ? nullText : MultimapJoiner.this.toString(part);
			}

			@Override
			public MultimapJoiner useForNull(String nullText) {
				throw new UnsupportedOperationException("already specified useForNull");
			}

			@Override
			public MultimapJoiner skipNulls() {
				throw new UnsupportedOperationException("already specified useForNull");
			}
		};
	}
1087557
public static MemberSummaryBuilder getInstance(
            ClassWriter classWriter, Context context) {
        MemberSummaryBuilder builder = new MemberSummaryBuilder(context,
                classWriter.getTypeElement());
        WriterFactory wf = context.configuration.getWriterFactory();
        for (VisibleMemberMap.Kind kind : VisibleMemberMap.Kind.values()) {
            MemberSummaryWriter msw =  builder.getVisibleMemberMap(kind).noVisibleMembers()
                    ? null
                    : wf.getMemberSummaryWriter(classWriter, kind);
            builder.memberSummaryWriters.put(kind, msw);
        }
        return builder;
    }
1202122
public <U> Leadership<U> map(Function<T, U> mapper) {
    return new Leadership<>(
        leader != null ? leader.map(mapper) : null,
        candidates.stream().map(mapper).collect(Collectors.toList()));
  }