1/*2 * Licensed to the Apache Software Foundation (ASF) under one3 * or more contributor license agreements. See the NOTICE file4 * distributed with this work for additional information5 * regarding copyright ownership. The ASF licenses this file6 * to you under the Apache License, Version 2.0 (the7 * "License"); you may not use this file except in compliance8 * with the License. You may obtain a copy of the License at9 *10 * http://www.apache.org/licenses/LICENSE-2.011 *12 * Unless required by applicable law or agreed to in writing, software13 * distributed under the License is distributed on an "AS IS" BASIS,14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.15 * See the License for the specific language governing permissions and16 * limitations under the License.17 */18package org.apache.giraph.types.ops;
1920import org.apache.giraph.types.ops.collections.array.WBooleanArrayList;
21import org.apache.hadoop.io.BooleanWritable;
2223import java.io.DataInput;
24import java.io.IOException;
2526// AUTO-GENERATED class via class:27// org.apache.giraph.generate.GeneratePrimitiveClasses2829/**TypeOps implementation for working with BooleanWritable type */30public enum BooleanTypeOpsimplements31 PrimitiveTypeOps<BooleanWritable> {
32/** Singleton instance */33 INSTANCE;
3435 @Override
36public Class<BooleanWritable> getTypeClass() {
37return BooleanWritable.class;
38 }
3940 @Override
41public BooleanWritable create() {
42returnnew BooleanWritable();
43 }
4445 @Override
46public BooleanWritable createCopy(BooleanWritable from) {
47returnnew BooleanWritable(from.get());
48 }
4950 @Override
51publicvoid set(BooleanWritable to, BooleanWritable from) {
52 to.set(from.get());
53 }
5455 @Override
56publicWBooleanArrayList createArrayList() {
57returnnewWBooleanArrayList();
58 }
5960 @Override
61publicWBooleanArrayList createArrayList(int capacity) {
62returnnewWBooleanArrayList(capacity);
63 }
6465 @Override
66publicWBooleanArrayList readNewArrayList(DataInput in) throws IOException {
67return WBooleanArrayList.readNew(in);
68 }
69 }