Rename Util to Values 86/3086/1
authorRobert Varga <rovarga@cisco.com>
Fri, 22 Nov 2013 06:16:46 +0000 (07:16 +0100)
committerRobert Varga <rovarga@cisco.com>
Tue, 26 Nov 2013 06:57:39 +0000 (07:57 +0100)
Change-Id: I5d480c0d18361ac5aa026c5118ea48824d66d201
Signed-off-by: Robert Varga <rovarga@cisco.com>
15 files changed:
bgp/parser-impl/src/main/java/org/opendaylight/protocol/bgp/parser/impl/message/BGPOpenMessageParser.java
bgp/parser-spi/src/main/java/org/opendaylight/protocol/bgp/parser/spi/pojo/SimpleAddressFamilyRegistry.java
bgp/parser-spi/src/main/java/org/opendaylight/protocol/bgp/parser/spi/pojo/SimpleAttributeRegistry.java
bgp/parser-spi/src/main/java/org/opendaylight/protocol/bgp/parser/spi/pojo/SimpleCapabilityRegistry.java
bgp/parser-spi/src/main/java/org/opendaylight/protocol/bgp/parser/spi/pojo/SimpleParameterRegistry.java
bgp/parser-spi/src/main/java/org/opendaylight/protocol/bgp/parser/spi/pojo/SimpleSubsequentAddressFamilyRegistry.java
pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/tlv/RSVPErrorSpecTlvParser.java
pcep/spi/src/main/java/org/opendaylight/protocol/pcep/spi/pojo/SimpleEROSubobjectHandlerRegistry.java
pcep/spi/src/main/java/org/opendaylight/protocol/pcep/spi/pojo/SimpleLabelHandlerRegistry.java
pcep/spi/src/main/java/org/opendaylight/protocol/pcep/spi/pojo/SimpleMessageHandlerRegistry.java
pcep/spi/src/main/java/org/opendaylight/protocol/pcep/spi/pojo/SimpleObjectHandlerRegistry.java
pcep/spi/src/main/java/org/opendaylight/protocol/pcep/spi/pojo/SimpleRROSubobjectHandlerRegistry.java
pcep/spi/src/main/java/org/opendaylight/protocol/pcep/spi/pojo/SimpleTlvHandlerRegistry.java
pcep/spi/src/main/java/org/opendaylight/protocol/pcep/spi/pojo/SimpleXROSubobjectHandlerRegistry.java
util/src/main/java/org/opendaylight/protocol/util/Values.java [moved from util/src/main/java/org/opendaylight/protocol/util/Util.java with 92% similarity]

index 4060b2a13c6d5b40d10a41207053f88cf0550cef..ddf0b171433c43432c3901a6a4efb418083659e7 100644 (file)
@@ -21,7 +21,7 @@ import org.opendaylight.protocol.bgp.parser.spi.MessageUtil;
 import org.opendaylight.protocol.bgp.parser.spi.ParameterRegistry;
 import org.opendaylight.protocol.concepts.Ipv4Util;
 import org.opendaylight.protocol.util.ByteArray;
-import org.opendaylight.protocol.util.Util;
+import org.opendaylight.protocol.util.Values;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.AsNumber;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Ipv4Address;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev130919.Open;
@@ -99,7 +99,7 @@ public final class BGPOpenMessageParser implements MessageParser, MessageSeriali
 
                // When our AS number does not fit into two bytes, we report it as AS_TRANS
                int openAS = open.getMyAsNumber();
-               if (openAS > Util.UNSIGNED_SHORT_MAX_VALUE) {
+               if (openAS > Values.UNSIGNED_SHORT_MAX_VALUE) {
                        openAS = AS_TRANS;
                }
 
index 463f172617731e4bbe5b6001394bb8c97f27ed15..40cc0748a1a4e9d722c243cba313dccd66156f11 100644 (file)
@@ -8,14 +8,14 @@
 package org.opendaylight.protocol.bgp.parser.spi.pojo;
 
 import org.opendaylight.protocol.bgp.parser.spi.AddressFamilyRegistry;
-import org.opendaylight.protocol.util.Util;
+import org.opendaylight.protocol.util.Values;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.AddressFamily;
 
 import com.google.common.base.Preconditions;
 
 final class SimpleAddressFamilyRegistry extends AbstractFamilyRegistry<AddressFamily, Integer> implements AddressFamilyRegistry {
        AutoCloseable registerAddressFamily(final Class<? extends AddressFamily> clazz, final int number) {
-               Preconditions.checkArgument(number >= 0 && number <= Util.UNSIGNED_SHORT_MAX_VALUE);
+               Preconditions.checkArgument(number >= 0 && number <= Values.UNSIGNED_SHORT_MAX_VALUE);
                return super.registerFamily(clazz, number);
        }
 
index 4a1ec7460e0900c6725938b205a018bb1e08aad9..b58463dd9e30cbc6b0002cb55935c8dba88a4463 100644 (file)
@@ -15,7 +15,7 @@ import org.opendaylight.protocol.bgp.parser.spi.AttributeRegistry;
 import org.opendaylight.protocol.bgp.parser.spi.AttributeSerializer;
 import org.opendaylight.protocol.concepts.HandlerRegistry;
 import org.opendaylight.protocol.util.ByteArray;
-import org.opendaylight.protocol.util.Util;
+import org.opendaylight.protocol.util.Values;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev130919.update.PathAttributes;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev130919.update.PathAttributesBuilder;
 import org.opendaylight.yangtools.yang.binding.DataContainer;
@@ -28,7 +28,7 @@ final class SimpleAttributeRegistry implements AttributeRegistry {
        private final HandlerRegistry<DataContainer, AttributeParser, AttributeSerializer> handlers = new HandlerRegistry<>();
 
        AutoCloseable registerAttributeParser(final int attributeType, final AttributeParser parser) {
-               Preconditions.checkArgument(attributeType >= 0 && attributeType <= Util.UNSIGNED_BYTE_MAX_VALUE);
+               Preconditions.checkArgument(attributeType >= 0 && attributeType <= Values.UNSIGNED_BYTE_MAX_VALUE);
                return this.handlers.registerParser(attributeType, parser);
        }
 
index 30f126f16be4cdf920373e5dd7a9389e2bf1e6e3..aed366e4114c2d1d4ea54e17d46793398ac3ee96 100644 (file)
@@ -13,7 +13,7 @@ import org.opendaylight.protocol.bgp.parser.spi.CapabilityParser;
 import org.opendaylight.protocol.bgp.parser.spi.CapabilityRegistry;
 import org.opendaylight.protocol.bgp.parser.spi.CapabilitySerializer;
 import org.opendaylight.protocol.concepts.HandlerRegistry;
-import org.opendaylight.protocol.util.Util;
+import org.opendaylight.protocol.util.Values;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev130919.open.bgp.parameters.CParameters;
 import org.opendaylight.yangtools.yang.binding.DataContainer;
 
@@ -23,7 +23,7 @@ final class SimpleCapabilityRegistry implements CapabilityRegistry {
        private final HandlerRegistry<DataContainer, CapabilityParser, CapabilitySerializer> handlers = new HandlerRegistry<>();
 
        AutoCloseable registerCapabilityParser(final int messageType, final CapabilityParser parser) {
-               Preconditions.checkArgument(messageType >= 0 && messageType <= Util.UNSIGNED_BYTE_MAX_VALUE);
+               Preconditions.checkArgument(messageType >= 0 && messageType <= Values.UNSIGNED_BYTE_MAX_VALUE);
                return this.handlers.registerParser(messageType, parser);
        }
 
index 14f3cb5aec0da65f62abc7db1aeea29764a2db97..e400a9ca8e626751039773ea183394fc72bded79 100644 (file)
@@ -13,7 +13,7 @@ import org.opendaylight.protocol.bgp.parser.spi.ParameterParser;
 import org.opendaylight.protocol.bgp.parser.spi.ParameterRegistry;
 import org.opendaylight.protocol.bgp.parser.spi.ParameterSerializer;
 import org.opendaylight.protocol.concepts.HandlerRegistry;
-import org.opendaylight.protocol.util.Util;
+import org.opendaylight.protocol.util.Values;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev130919.open.BgpParameters;
 import org.opendaylight.yangtools.yang.binding.DataContainer;
 
@@ -23,7 +23,7 @@ final class SimpleParameterRegistry implements ParameterRegistry {
        private final HandlerRegistry<DataContainer, ParameterParser, ParameterSerializer> handlers = new HandlerRegistry<>();
 
        AutoCloseable registerParameterParser(final int messageType, final ParameterParser parser) {
-               Preconditions.checkArgument(messageType >= 0 && messageType <= Util.UNSIGNED_BYTE_MAX_VALUE);
+               Preconditions.checkArgument(messageType >= 0 && messageType <= Values.UNSIGNED_BYTE_MAX_VALUE);
                return this.handlers.registerParser(messageType, parser);
        }
 
index b8ce1b81434cea47f557918c3d1d4bdabb2c98e2..f87a051c3fe0aa0c987eeefccec6303f6b196f25 100644 (file)
@@ -8,7 +8,7 @@
 package org.opendaylight.protocol.bgp.parser.spi.pojo;
 
 import org.opendaylight.protocol.bgp.parser.spi.SubsequentAddressFamilyRegistry;
-import org.opendaylight.protocol.util.Util;
+import org.opendaylight.protocol.util.Values;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.SubsequentAddressFamily;
 
 import com.google.common.base.Preconditions;
@@ -16,7 +16,7 @@ import com.google.common.base.Preconditions;
 final class SimpleSubsequentAddressFamilyRegistry extends AbstractFamilyRegistry<SubsequentAddressFamily, Integer> implements
                SubsequentAddressFamilyRegistry {
        AutoCloseable registerSubsequentAddressFamily(final Class<? extends SubsequentAddressFamily> clazz, final int number) {
-               Preconditions.checkArgument(number >= 0 && number <= Util.UNSIGNED_BYTE_MAX_VALUE);
+               Preconditions.checkArgument(number >= 0 && number <= Values.UNSIGNED_BYTE_MAX_VALUE);
                return super.registerFamily(clazz, number);
        }
 
index 3281a5bd027ce9f9c5b503c4647ade4ac2d5854b..df73f772a45c4b2ac4e97aa1aa6d025ec6e24502 100644 (file)
@@ -15,7 +15,7 @@ import org.opendaylight.protocol.pcep.spi.PCEPDeserializerException;
 import org.opendaylight.protocol.pcep.spi.TlvParser;
 import org.opendaylight.protocol.pcep.spi.TlvSerializer;
 import org.opendaylight.protocol.util.ByteArray;
-import org.opendaylight.protocol.util.Util;
+import org.opendaylight.protocol.util.Values;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.IpAddress;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.iana.rev130816.EnterpriseNumber;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.Tlv;
@@ -155,7 +155,7 @@ public final class RSVPErrorSpecTlvParser implements TlvParser, TlvSerializer {
                final BitSet flags = ByteArray.bytesToBitSet(ByteArray.subByte(valueBytes, byteOffset, FLAGS_F_LENGTH));
                byteOffset += FLAGS_F_LENGTH;
                builder.setFlags(new Flags(flags.get(IN_PLACE_FLAG_OFFSET), flags.get(NOT_GUILTY_FLAGS_OFFSET)));
-               final short errorCode = (short) (valueBytes[byteOffset] & Util.BYTE_MAX_VALUE_BYTES);
+               final short errorCode = (short) (valueBytes[byteOffset] & Values.BYTE_MAX_VALUE_BYTES);
                byteOffset += ERROR_CODE_F_LENGTH;
                builder.setCode(errorCode);
                final int errorValue = (ByteArray.bytesToShort(ByteArray.subByte(valueBytes, byteOffset, ERROR_VALUE_F_LENGTH)) & 0xFFFF);
index 5f81b0f3dd3e9b1519c1a451f5967abddfff182d..29950954671791874c6e14a9740f61194113016c 100644 (file)
@@ -11,7 +11,7 @@ import org.opendaylight.protocol.concepts.HandlerRegistry;
 import org.opendaylight.protocol.pcep.spi.EROSubobjectHandlerRegistry;
 import org.opendaylight.protocol.pcep.spi.EROSubobjectParser;
 import org.opendaylight.protocol.pcep.spi.EROSubobjectSerializer;
-import org.opendaylight.protocol.util.Util;
+import org.opendaylight.protocol.util.Values;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev130820.basic.explicit.route.subobjects.SubobjectType;
 import org.opendaylight.yangtools.yang.binding.DataContainer;
 
@@ -21,7 +21,7 @@ public final class SimpleEROSubobjectHandlerRegistry implements EROSubobjectHand
        private final HandlerRegistry<DataContainer, EROSubobjectParser, EROSubobjectSerializer> handlers = new HandlerRegistry<>();
 
        public AutoCloseable registerSubobjectParser(final int subobjectType, final EROSubobjectParser parser) {
-               Preconditions.checkArgument(subobjectType >= 0 && subobjectType <= Util.UNSIGNED_SHORT_MAX_VALUE);
+               Preconditions.checkArgument(subobjectType >= 0 && subobjectType <= Values.UNSIGNED_SHORT_MAX_VALUE);
                return this.handlers.registerParser(subobjectType, parser);
        }
 
@@ -32,7 +32,7 @@ public final class SimpleEROSubobjectHandlerRegistry implements EROSubobjectHand
 
        @Override
        public EROSubobjectParser getSubobjectParser(final int subobjectType) {
-               Preconditions.checkArgument(subobjectType >= 0 && subobjectType <= Util.UNSIGNED_SHORT_MAX_VALUE);
+               Preconditions.checkArgument(subobjectType >= 0 && subobjectType <= Values.UNSIGNED_SHORT_MAX_VALUE);
                return this.handlers.getParser(subobjectType);
        }
 
index e374d8118117069e6d5065e7f608e29cdcc6e07e..441343a93fcc71390dbfcfee5128a97e6b5caa70 100644 (file)
@@ -11,7 +11,7 @@ import org.opendaylight.protocol.concepts.HandlerRegistry;
 import org.opendaylight.protocol.pcep.spi.LabelHandlerRegistry;
 import org.opendaylight.protocol.pcep.spi.LabelParser;
 import org.opendaylight.protocol.pcep.spi.LabelSerializer;
-import org.opendaylight.protocol.util.Util;
+import org.opendaylight.protocol.util.Values;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev130820.label.subobject.LabelType;
 import org.opendaylight.yangtools.yang.binding.DataContainer;
 
@@ -21,7 +21,7 @@ public class SimpleLabelHandlerRegistry implements LabelHandlerRegistry {
        private final HandlerRegistry<DataContainer, LabelParser, LabelSerializer> handlers = new HandlerRegistry<>();
 
        public AutoCloseable registerLabelParser(final int cType, final LabelParser parser) {
-               Preconditions.checkArgument(cType >= 0 && cType <= Util.UNSIGNED_BYTE_MAX_VALUE);
+               Preconditions.checkArgument(cType >= 0 && cType <= Values.UNSIGNED_BYTE_MAX_VALUE);
                return this.handlers.registerParser(cType, parser);
        }
 
@@ -31,7 +31,7 @@ public class SimpleLabelHandlerRegistry implements LabelHandlerRegistry {
 
        @Override
        public LabelParser getLabelParser(final int cType) {
-               Preconditions.checkArgument(cType >= 0 && cType <= Util.UNSIGNED_BYTE_MAX_VALUE);
+               Preconditions.checkArgument(cType >= 0 && cType <= Values.UNSIGNED_BYTE_MAX_VALUE);
                return this.handlers.getParser(cType);
        }
 
index 74f6bb348a23b3ca82d7fe62c39e66575d7d8b21..79661bae81f7ff76767d051f2690f49894c24df7 100644 (file)
@@ -11,7 +11,7 @@ import org.opendaylight.protocol.concepts.HandlerRegistry;
 import org.opendaylight.protocol.pcep.spi.MessageHandlerRegistry;
 import org.opendaylight.protocol.pcep.spi.MessageParser;
 import org.opendaylight.protocol.pcep.spi.MessageSerializer;
-import org.opendaylight.protocol.util.Util;
+import org.opendaylight.protocol.util.Values;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.Message;
 import org.opendaylight.yangtools.yang.binding.DataContainer;
 
@@ -22,7 +22,7 @@ public final class SimpleMessageHandlerRegistry implements MessageHandlerRegistr
        private final HandlerRegistry<DataContainer, MessageParser, MessageSerializer> handlers = new HandlerRegistry<>();
 
        public AutoCloseable registerMessageParser(final int messageType, final MessageParser parser) {
-               Preconditions.checkArgument(messageType >= 0 && messageType <= Util.UNSIGNED_BYTE_MAX_VALUE);
+               Preconditions.checkArgument(messageType >= 0 && messageType <= Values.UNSIGNED_BYTE_MAX_VALUE);
                return this.handlers.registerParser(messageType, parser);
        }
 
@@ -32,7 +32,7 @@ public final class SimpleMessageHandlerRegistry implements MessageHandlerRegistr
 
        @Override
        public MessageParser getMessageParser(final int messageType) {
-               Preconditions.checkArgument(messageType >= 0 && messageType <= Util.UNSIGNED_BYTE_MAX_VALUE);
+               Preconditions.checkArgument(messageType >= 0 && messageType <= Values.UNSIGNED_BYTE_MAX_VALUE);
                return this.handlers.getParser(messageType);
        }
 
index cb812803a6271b4be462cb4e3cabb5e879239cf1..ba9af768b20da9baf20a716dff8e09c4f8a1587f 100644 (file)
@@ -13,7 +13,7 @@ import org.opendaylight.protocol.pcep.spi.ObjectParser;
 import org.opendaylight.protocol.pcep.spi.ObjectSerializer;
 import org.opendaylight.protocol.pcep.spi.PCEPErrors;
 import org.opendaylight.protocol.pcep.spi.UnknownObject;
-import org.opendaylight.protocol.util.Util;
+import org.opendaylight.protocol.util.Values;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.Object;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.ObjectHeader;
 import org.opendaylight.yangtools.yang.binding.DataContainer;
@@ -27,13 +27,13 @@ public final class SimpleObjectHandlerRegistry implements ObjectHandlerRegistry
        private final HandlerRegistry<DataContainer, ObjectParser, ObjectSerializer> handlers = new HandlerRegistry<>();
 
        private static int createKey(final int objectClass, final int objectType) {
-               Preconditions.checkArgument(objectClass >= 0 && objectClass <= Util.UNSIGNED_BYTE_MAX_VALUE);
+               Preconditions.checkArgument(objectClass >= 0 && objectClass <= Values.UNSIGNED_BYTE_MAX_VALUE);
                Preconditions.checkArgument(objectType >= 0 && objectType <= 15);
                return (objectClass << 4) | objectType;
        }
 
        public AutoCloseable registerObjectParser(final int objectClass, final int objectType, final ObjectParser parser) {
-               Preconditions.checkArgument(objectClass >= 0 && objectClass <= Util.UNSIGNED_BYTE_MAX_VALUE);
+               Preconditions.checkArgument(objectClass >= 0 && objectClass <= Values.UNSIGNED_BYTE_MAX_VALUE);
                Preconditions.checkArgument(objectType >= 0 && objectType <= 15);
                return this.handlers.registerParser(createKey(objectClass, objectType), parser);
        }
index 5412c89941f2c9263a6bf8fce2914dbd2d8931ed..b4aa770e0ec79ae6be11b095533564ec1d06fde3 100644 (file)
@@ -11,7 +11,7 @@ import org.opendaylight.protocol.concepts.HandlerRegistry;
 import org.opendaylight.protocol.pcep.spi.RROSubobjectHandlerRegistry;
 import org.opendaylight.protocol.pcep.spi.RROSubobjectParser;
 import org.opendaylight.protocol.pcep.spi.RROSubobjectSerializer;
-import org.opendaylight.protocol.util.Util;
+import org.opendaylight.protocol.util.Values;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev130820.record.route.subobjects.SubobjectType;
 import org.opendaylight.yangtools.yang.binding.DataContainer;
 
@@ -21,13 +21,13 @@ public final class SimpleRROSubobjectHandlerRegistry implements RROSubobjectHand
        private final HandlerRegistry<DataContainer, RROSubobjectParser, RROSubobjectSerializer> handlers = new HandlerRegistry<>();
 
        public AutoCloseable registerSubobjectParser(final int subobjectType, final RROSubobjectParser parser) {
-               Preconditions.checkArgument(subobjectType >= 0 && subobjectType <= Util.UNSIGNED_SHORT_MAX_VALUE);
+               Preconditions.checkArgument(subobjectType >= 0 && subobjectType <= Values.UNSIGNED_SHORT_MAX_VALUE);
                return this.handlers.registerParser(subobjectType, parser);
        }
 
        @Override
        public RROSubobjectParser getSubobjectParser(final int subobjectType) {
-               Preconditions.checkArgument(subobjectType >= 0 && subobjectType <= Util.UNSIGNED_SHORT_MAX_VALUE);
+               Preconditions.checkArgument(subobjectType >= 0 && subobjectType <= Values.UNSIGNED_SHORT_MAX_VALUE);
                return this.handlers.getParser(subobjectType);
        }
 
index 94f00a97647c4acee1ed1df3a6b0531e15fd7d36..9a08f7992145e5b14f8f29e35de25964d872f7d6 100644 (file)
@@ -11,7 +11,7 @@ import org.opendaylight.protocol.concepts.HandlerRegistry;
 import org.opendaylight.protocol.pcep.spi.TlvHandlerRegistry;
 import org.opendaylight.protocol.pcep.spi.TlvParser;
 import org.opendaylight.protocol.pcep.spi.TlvSerializer;
-import org.opendaylight.protocol.util.Util;
+import org.opendaylight.protocol.util.Values;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.Tlv;
 import org.opendaylight.yangtools.yang.binding.DataContainer;
 
@@ -24,7 +24,7 @@ public final class SimpleTlvHandlerRegistry implements TlvHandlerRegistry {
        private final HandlerRegistry<DataContainer, TlvParser, TlvSerializer> handlers = new HandlerRegistry<>();
 
        public AutoCloseable registerTlvParser(final int tlvType, final TlvParser parser) {
-               Preconditions.checkArgument(tlvType >= 0 && tlvType < Util.UNSIGNED_SHORT_MAX_VALUE);
+               Preconditions.checkArgument(tlvType >= 0 && tlvType < Values.UNSIGNED_SHORT_MAX_VALUE);
                return this.handlers.registerParser(tlvType, parser);
        }
 
index 7f6781dd17d2ee893b3f00049076f408eeb54712..a206bddc116721dd36050df23da3f324c1e0a6e0 100644 (file)
@@ -11,7 +11,7 @@ import org.opendaylight.protocol.concepts.HandlerRegistry;
 import org.opendaylight.protocol.pcep.spi.XROSubobjectHandlerRegistry;
 import org.opendaylight.protocol.pcep.spi.XROSubobjectParser;
 import org.opendaylight.protocol.pcep.spi.XROSubobjectSerializer;
-import org.opendaylight.protocol.util.Util;
+import org.opendaylight.protocol.util.Values;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev130820.basic.explicit.route.subobjects.SubobjectType;
 import org.opendaylight.yangtools.yang.binding.DataContainer;
 
@@ -21,7 +21,7 @@ public final class SimpleXROSubobjectHandlerRegistry implements XROSubobjectHand
        private final HandlerRegistry<DataContainer, XROSubobjectParser, XROSubobjectSerializer> handlers = new HandlerRegistry<>();
 
        public AutoCloseable registerSubobjectParser(final int subobjectType, final XROSubobjectParser parser) {
-               Preconditions.checkArgument(subobjectType >= 0 && subobjectType <= Util.UNSIGNED_SHORT_MAX_VALUE);
+               Preconditions.checkArgument(subobjectType >= 0 && subobjectType <= Values.UNSIGNED_SHORT_MAX_VALUE);
                return this.handlers.registerParser(subobjectType, parser);
        }
 
@@ -32,7 +32,7 @@ public final class SimpleXROSubobjectHandlerRegistry implements XROSubobjectHand
 
        @Override
        public XROSubobjectParser getSubobjectParser(final int subobjectType) {
-               Preconditions.checkArgument(subobjectType >= 0 && subobjectType <= Util.UNSIGNED_SHORT_MAX_VALUE);
+               Preconditions.checkArgument(subobjectType >= 0 && subobjectType <= Values.UNSIGNED_SHORT_MAX_VALUE);
                return this.handlers.getParser(subobjectType);
        }
 
similarity index 92%
rename from util/src/main/java/org/opendaylight/protocol/util/Util.java
rename to util/src/main/java/org/opendaylight/protocol/util/Values.java
index 9d9c2a59c04c8f854bb5d269a20748e2434a9f86..4cf963680eb410d2592a1d584c97dfae388d7b2f 100644 (file)
@@ -7,9 +7,9 @@
  */
 package org.opendaylight.protocol.util;
 
-public class Util {
+public class Values {
 
-       private Util() {
+       private Values() {
        }
 
        public static final int UNSIGNED_SHORT_MAX_VALUE = 65535;