test_class.declarator: GMT = TimeZone.getTimeZone("GMT")
test_class.modifier: private static final
test_class.original_string: private static final TimeZone GMT = TimeZone.getTimeZone("GMT");
test_class.type: TimeZone
test_class.var_name: GMT
test_class.declarator: CET = TimeZone.getTimeZone("CET")
test_class.modifier: private static final
test_class.original_string: private static final TimeZone CET = TimeZone.getTimeZone("CET");
test_class.type: TimeZone
test_class.var_name: CET
test_class.declarator: PST = TimeZone.getTimeZone("PST")
test_class.modifier: private static final
test_class.original_string: private static final TimeZone PST = TimeZone.getTimeZone("PST");
test_class.type: TimeZone
test_class.var_name: PST
test_class.file: oak-store-spi/src/test/java/org/apache/jackrabbit/oak/plugins/memory/PropertyStateValueTest.java
test_class.identifier: PropertyStateValueTest
test_case.body: @Test
      public void compareDates() {
          Calendar d1, d2;
          PropertyValue v1, v2;
  
          // same time zones.
          d1 = newCal(null);
          d2 = newCal(d1);
          v1 = newDate(format(d1)); 
          v2 = newDate(format(d2));
          assertEquals("v1 and v2 should be equals", 0, v1.compareTo(v2));
          assertEquals("v1 and v2 should be equals", 0, v2.compareTo(v1));
  
          d1 = newCal(null);
          d2 = newCal(d1, GMT, 1);
          v1 = newDate(format(d1)); 
          v2 = newDate(format(d2));
          assertTrue("v1 < v2", v1.compareTo(v2) < 0);
          assertTrue("v2 > v1", v2.compareTo(v1) > 0);
  
          d1 = newCal(null);
          d2 = newCal(d1, GMT, -1);
          v1 = newDate(format(d1)); 
          v2 = newDate(format(d2));
          assertTrue("v1 > v2", v1.compareTo(v2) > 0);
          assertTrue("v2 < v1", v2.compareTo(v1) < 0);
          
          // same time zone. Non Zulu.
          d1 = newCal(null, PST, 0);
          d2 = newCal(d1, PST, 0);
          v1 = newDate(format(d1)); 
          v2 = newDate(format(d2));
          assertEquals("v1 and v2 should be equals", 0, v1.compareTo(v2));
          assertEquals("v1 and v2 should be equals", 0, v2.compareTo(v1));
  
          d1 = newCal(null, PST, 0);
          d2 = newCal(d1, PST, 1);
          v1 = newDate(format(d1)); 
          v2 = newDate(format(d2));
          assertTrue("v1 < v2", v1.compareTo(v2) < 0);
          assertTrue("v2 > v1", v2.compareTo(v1) > 0);
  
          d1 = newCal(null, PST, 0);
          d2 = newCal(d1, PST, -1);
          v1 = newDate(format(d1)); 
          v2 = newDate(format(d2));
          assertTrue("v1 > v2", v1.compareTo(v2) > 0);
          assertTrue("v2 < v1", v2.compareTo(v1) < 0);
  
          // ahead time zone
          d1 = newCal(null);
          d2 = newCal(d1, CET, 0);
          v1 = newDate(format(d1)); 
          v2 = newDate(format(d2));
          assertEquals("v1 and v2 should be equals", 0, v1.compareTo(v2));
          assertEquals("v1 and v2 should be equals", 0, v2.compareTo(v1));
  
          d1 = newCal(null);
          d2 = newCal(d1, CET, 1);
          v1 = newDate(format(d1)); 
          v2 = newDate(format(d2));
          assertTrue("v1 < v2", v1.compareTo(v2) < 0);
          assertTrue("v2 > v1", v2.compareTo(v1) > 0);
  
          d1 = newCal(null);
          d2 = newCal(d1, CET, -1);
          v1 = newDate(format(d1)); 
          v2 = newDate(format(d2));
          assertTrue("v1 > v2", v1.compareTo(v2) > 0);
          assertTrue("v2 < v1", v2.compareTo(v1) < 0);
          
          // behind time zone
          d1 = newCal(null);
          d2 = newCal(d1, PST, 0);
          v1 = newDate(format(d1)); 
          v2 = newDate(format(d2));
          assertEquals("v1 and v2 should be equals", 0, v1.compareTo(v2));
          assertEquals("v1 and v2 should be equals", 0, v2.compareTo(v1));
  
          d1 = newCal(null);
          d2 = newCal(d1, PST, 1);
          v1 = newDate(format(d1)); 
          v2 = newDate(format(d2));
          assertTrue("v1 < v2", v1.compareTo(v2) < 0);
          assertTrue("v2 > v1", v2.compareTo(v1) > 0);
  
          d1 = newCal(null);
          d2 = newCal(d1, PST, -1);
          v1 = newDate(format(d1)); 
          v2 = newDate(format(d2));
          assertTrue("v1 > v2", v1.compareTo(v2) > 0);
          assertTrue("v2 < v1", v2.compareTo(v1) < 0);
      }
test_case.class_method_signature: PropertyStateValueTest.compareDates()
test_case.full_signature: @Test public void compareDates()
test_case.identifier: compareDates
test_case.invocations: newCal newCal newDate format newDate format assertEquals compareTo assertEquals compareTo newCal newCal newDate format newDate format assertTrue compareTo assertTrue compareTo newCal newCal newDate format newDate format assertTrue compareTo assertTrue compareTo newCal newCal newDate format newDate format assertEquals compareTo assertEquals compareTo newCal newCal newDate format newDate format assertTrue compareTo assertTrue compareTo newCal newCal newDate format newDate format assertTrue compareTo assertTrue compareTo newCal newCal newDate format newDate format assertEquals compareTo assertEquals compareTo newCal newCal newDate format newDate format assertTrue compareTo assertTrue compareTo newCal newCal newDate format newDate format assertTrue compareTo assertTrue compareTo newCal newCal newDate format newDate format assertEquals compareTo assertEquals compareTo newCal newCal newDate format newDate format assertTrue compareTo assertTrue compareTo newCal newCal newDate format newDate format assertTrue compareTo assertTrue compareTo
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void compareDates()
focal_class.declarator: ps
focal_class.modifier: private final
focal_class.original_string: private final PropertyState ps;
focal_class.type: PropertyState
focal_class.var_name: ps
focal_class.file: oak-store-spi/src/main/java/org/apache/jackrabbit/oak/plugins/memory/PropertyStateValue.java
focal_class.identifier: PropertyStateValue
focal_class.interfaces: implements PropertyValue
focal_class.class_method_signature: PropertyStateValue.PropertyStateValue(PropertyState ps)
focal_class.full_signature:   PropertyStateValue(PropertyState ps)
focal_class.identifier: PropertyStateValue
focal_class.parameters: (PropertyState ps)
focal_class.signature:  PropertyStateValue(PropertyState ps)
focal_class.class_method_signature: PropertyStateValue.isArray()
focal_class.full_signature: @Override public boolean isArray()
focal_class.identifier: isArray
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isArray()
focal_class.class_method_signature: PropertyStateValue.getType()
focal_class.full_signature: @Override @NotNull public Type<?> getType()
focal_class.identifier: getType
focal_class.modifiers: @Override @NotNull public
focal_class.parameters: ()
focal_class.return: Type<?>
focal_class.signature: Type<?> getType()
focal_class.class_method_signature: PropertyStateValue.getValue(Type<T> type)
focal_class.full_signature: @Override @NotNull public T getValue(Type<T> type)
focal_class.identifier: getValue
focal_class.modifiers: @Override @NotNull public
focal_class.parameters: (Type<T> type)
focal_class.return: T
focal_class.signature: T getValue(Type<T> type)
focal_class.class_method_signature: PropertyStateValue.getValue(Type<T> type, int index)
focal_class.full_signature: @Override @NotNull public T getValue(Type<T> type, int index)
focal_class.identifier: getValue
focal_class.modifiers: @Override @NotNull public
focal_class.parameters: (Type<T> type, int index)
focal_class.return: T
focal_class.signature: T getValue(Type<T> type, int index)
focal_class.class_method_signature: PropertyStateValue.size()
focal_class.full_signature: @Override public long size()
focal_class.identifier: size
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: long
focal_class.signature: long size()
focal_class.class_method_signature: PropertyStateValue.size(int index)
focal_class.full_signature: @Override public long size(int index)
focal_class.identifier: size
focal_class.modifiers: @Override public
focal_class.parameters: (int index)
focal_class.return: long
focal_class.signature: long size(int index)
focal_class.class_method_signature: PropertyStateValue.count()
focal_class.full_signature: @Override public int count()
focal_class.identifier: count
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int count()
focal_class.class_method_signature: PropertyStateValue.unwrap()
focal_class.full_signature: @Nullable public PropertyState unwrap()
focal_class.identifier: unwrap
focal_class.modifiers: @Nullable public
focal_class.parameters: ()
focal_class.return: PropertyState
focal_class.signature: PropertyState unwrap()
focal_class.class_method_signature: PropertyStateValue.compareTo(@NotNull PropertyValue p2)
focal_class.full_signature: @Override public int compareTo(@NotNull PropertyValue p2)
focal_class.identifier: compareTo
focal_class.modifiers: @Override public
focal_class.parameters: (@NotNull PropertyValue p2)
focal_class.return: int
focal_class.signature: int compareTo(@NotNull PropertyValue p2)
focal_class.class_method_signature: PropertyStateValue.compare(Iterable<T> p1,
              Iterable<T> p2)
focal_class.full_signature: private static int compare(Iterable<T> p1,
              Iterable<T> p2)
focal_class.identifier: compare
focal_class.modifiers: private static
focal_class.parameters: (Iterable<T> p1,
              Iterable<T> p2)
focal_class.return: int
focal_class.signature: int compare(Iterable<T> p1,
              Iterable<T> p2)
focal_class.class_method_signature: PropertyStateValue.compareBinaries(Iterable<Blob> p1, Iterable<Blob> p2)
focal_class.full_signature: private static int compareBinaries(Iterable<Blob> p1, Iterable<Blob> p2)
focal_class.identifier: compareBinaries
focal_class.modifiers: private static
focal_class.parameters: (Iterable<Blob> p1, Iterable<Blob> p2)
focal_class.return: int
focal_class.signature: int compareBinaries(Iterable<Blob> p1, Iterable<Blob> p2)
focal_class.class_method_signature: PropertyStateValue.compareAsDate(Iterable<String> p1, Iterable<String> p2)
focal_class.full_signature: private static int compareAsDate(Iterable<String> p1, Iterable<String> p2)
focal_class.identifier: compareAsDate
focal_class.modifiers: private static
focal_class.parameters: (Iterable<String> p1, Iterable<String> p2)
focal_class.return: int
focal_class.signature: int compareAsDate(Iterable<String> p1, Iterable<String> p2)
focal_class.class_method_signature: PropertyStateValue.getInternalString()
focal_class.full_signature: private String getInternalString()
focal_class.identifier: getInternalString
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getInternalString()
focal_class.class_method_signature: PropertyStateValue.hashCode()
focal_class.full_signature: @Override public int hashCode()
focal_class.identifier: hashCode
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int hashCode()
focal_class.class_method_signature: PropertyStateValue.equals(Object o)
focal_class.full_signature: @Override public boolean equals(Object o)
focal_class.identifier: equals
focal_class.modifiers: @Override public
focal_class.parameters: (Object o)
focal_class.return: boolean
focal_class.signature: boolean equals(Object o)
focal_class.class_method_signature: PropertyStateValue.toString()
focal_class.full_signature: @Override public String toString()
focal_class.identifier: toString
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String toString()
focal_method.body: @Override
      public int compareTo(@NotNull PropertyValue p2) {
          if (getType().tag() != p2.getType().tag()) {
              return Integer.signum(p2.getType().tag() - getType().tag());
          }
          switch (getType().tag()) {
          case PropertyType.BOOLEAN:
              return compare(getValue(Type.BOOLEANS), p2.getValue(Type.BOOLEANS));
          case PropertyType.DECIMAL:
              return compare(getValue(Type.DECIMALS), p2.getValue(Type.DECIMALS));
          case PropertyType.DOUBLE:
              return compare(getValue(Type.DOUBLES), p2.getValue(Type.DOUBLES));
          case PropertyType.LONG:
              return compare(getValue(Type.LONGS), p2.getValue(Type.LONGS));
          case PropertyType.BINARY:
              return compareBinaries(
                      getValue(Type.BINARIES), p2.getValue(Type.BINARIES));
          case PropertyType.DATE:
              return compareAsDate(
                      getValue(Type.STRINGS), p2.getValue(Type.STRINGS));
          default:
              return compare(getValue(Type.STRINGS), p2.getValue(Type.STRINGS));
          }
      }
focal_method.class_method_signature: PropertyStateValue.compareTo(@NotNull PropertyValue p2)
focal_method.full_signature: @Override public int compareTo(@NotNull PropertyValue p2)
focal_method.identifier: compareTo
focal_method.invocations: tag getType tag getType signum tag getType tag getType tag getType compare getValue getValue compare getValue getValue compare getValue getValue compare getValue getValue compareBinaries getValue getValue compareAsDate getValue getValue compare getValue getValue
focal_method.modifiers: @Override public
focal_method.parameters: (@NotNull PropertyValue p2)
focal_method.return: int
focal_method.signature: int compareTo(@NotNull PropertyValue p2)