+
+ public GraphBundle(String name, Supplier<TransferableGraph1> source, int hashCode, String id, String version) {
+ Matcher m = ID_PATTERN.matcher(id);
+ if (!m.matches())
+ throw new IllegalArgumentException("Illegal Id, got \""+id+"\"");
+ m = VERSION_PATTERN.matcher(version);
+ if (!m.matches())
+ throw new IllegalArgumentException("Illegal Version, got \""+id+"\", <id>/<major.minor.micro.qualifier> is expected.");
+ this.name = name;
+ this.graphSource = source;
+ this.hashcode = hashCode;
+ this.id = id;
+ this.major = Integer.valueOf( m.group(1) );
+ this.minor = Integer.valueOf( m.group(2) );
+ this.service = Integer.valueOf( m.group(3) );
+ if (m.group(4) != null) {
+ this.qualifier = m.group(4);
+ }
+ }
+
+ private int hash(TransferableGraph1 data) throws BindingException {
+ return data == null ? 0 : TransferableGraph1.BINDING.hashValue( data );
+ }
+